From patchwork Wed Dec 10 23:53:04 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Todd Previte X-Patchwork-Id: 5473291 Return-Path: X-Original-To: patchwork-intel-gfx@patchwork.kernel.org Delivered-To: patchwork-parsemail@patchwork1.web.kernel.org Received: from mail.kernel.org (mail.kernel.org [198.145.19.201]) by patchwork1.web.kernel.org (Postfix) with ESMTP id 89F419F1D4 for ; Wed, 10 Dec 2014 23:54:05 +0000 (UTC) Received: from mail.kernel.org (localhost [127.0.0.1]) by mail.kernel.org (Postfix) with ESMTP id AF97B2018E for ; Wed, 10 Dec 2014 23:54:04 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) by mail.kernel.org (Postfix) with ESMTP id BCE5720172 for ; Wed, 10 Dec 2014 23:54:03 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 30BCD6E703; Wed, 10 Dec 2014 15:54:03 -0800 (PST) X-Original-To: intel-gfx@lists.freedesktop.org Delivered-To: intel-gfx@lists.freedesktop.org Received: from mail-pa0-f47.google.com (mail-pa0-f47.google.com [209.85.220.47]) by gabe.freedesktop.org (Postfix) with ESMTP id 1B7D06E705 for ; Wed, 10 Dec 2014 15:54:02 -0800 (PST) Received: by mail-pa0-f47.google.com with SMTP id kq14so3813695pab.20 for ; Wed, 10 Dec 2014 15:54:01 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=ij21MFlTPBuRZLMblfsUYGi4wnk/HnOYMwXU0TP9aZo=; b=ZQA3auX3zGQS7E+g2Swk46z+nuvYzp/VHmzt9J8bc51eTCUaX6kOqY/30/lfPTXjeB kamQ3srAMCeAuKURYX9iHUeB5qm4HPzh4EP5zTVbv94hq8fCVI3qPiitivEeE6XK/YBH Cau6LJMkIuqRM8RwNl1sFDH3b6xpWOQfUXsBZQ+0MnVlJ2OU8g0tUFGuguTySo8f76Gl KZ3KHuZmkE+QqZGihy0FgCkY5YzcTdwRFtYnEFOqbgXV8bvU9GdKnYrbeaxQtIe4Q8bv FDyFgACAvXht0L8DVUwpJ7kSrFSKgbOVuIcvM9Zg+4GSYxk5NXyPX0yXiejFv3az3JkY CK2A== X-Received: by 10.68.135.197 with SMTP id pu5mr11467105pbb.105.1418255641948; Wed, 10 Dec 2014 15:54:01 -0800 (PST) Received: from localhost.localdomain (ip68-3-234-27.ph.ph.cox.net. [68.3.234.27]) by mx.google.com with ESMTPSA id gy10sm5164958pbd.67.2014.12.10.15.54.00 for (version=TLSv1.2 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 10 Dec 2014 15:54:00 -0800 (PST) From: Todd Previte To: intel-gfx@lists.freedesktop.org Date: Wed, 10 Dec 2014 16:53:04 -0700 Message-Id: <1418255597-4716-5-git-send-email-tprevite@gmail.com> X-Mailer: git-send-email 1.9.1 In-Reply-To: <1418255597-4716-1-git-send-email-tprevite@gmail.com> References: <1418255597-4716-1-git-send-email-tprevite@gmail.com> Subject: [Intel-gfx] [PATCH 04/17] drm/i915: Add debugfs information for Displayport compliance testing X-BeenThere: intel-gfx@lists.freedesktop.org X-Mailman-Version: 2.1.18 Precedence: list List-Id: Intel graphics driver community testing & development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: intel-gfx-bounces@lists.freedesktop.org Sender: "Intel-gfx" X-Spam-Status: No, score=-4.1 required=5.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED, FREEMAIL_FROM, RCVD_IN_DNSWL_MED, T_DKIM_INVALID, T_RP_MATCHES_RCVD, UNPARSEABLE_RELAY autolearn=unavailable version=3.3.1 X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on mail.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP This patch was part of "[PATCH 05/10] drm/i915: Add debugfs interface for Displayport debug and compliance testing". That patch has been split into smaller patches for ease of review and integration. This patch contains the definitions/declarations for some of the constants and data structures added to support debugfs output for Displayport compliance testing. Signed-off-by: Todd Previte --- drivers/gpu/drm/i915/i915_debugfs.c | 41 +++++++++++++++++++++++++++++++++++++ 1 file changed, 41 insertions(+) diff --git a/drivers/gpu/drm/i915/i915_debugfs.c b/drivers/gpu/drm/i915/i915_debugfs.c index 479e0c1..65b4f5e 100644 --- a/drivers/gpu/drm/i915/i915_debugfs.c +++ b/drivers/gpu/drm/i915/i915_debugfs.c @@ -33,6 +33,7 @@ #include #include #include +#include #include #include #include "intel_drv.h" @@ -51,6 +52,46 @@ static const char *yesno(int v) return v ? "yes" : "no"; } +#define DP_PARAMETER_COUNT 8 +#define MAX_DP_CONFIG_LINE_COUNT 64 + +enum dp_config_param { + DP_CONFIG_PARAM_INVALID = -1, + DP_CONFIG_PARAM_CONNECTOR = 0, + DP_CONFIG_PARAM_LINK_RATE, + DP_CONFIG_PARAM_LANE_COUNT, + DP_CONFIG_PARAM_VOLTAGE_SWING, + DP_CONFIG_PARAM_PREEMPHASIS, + DP_CONFIG_PARAM_HRES, + DP_CONFIG_PARAM_VRES, + DP_CONFIG_PARAM_BPP +}; + +struct dp_config { + enum dp_config_param type; + unsigned long value; +}; + +const char *dp_conf_tokens[DP_PARAMETER_COUNT] = { + "Connector", + "Link Rate", + "Lane Count", + "Voltage Swing Level", + "Preemphasis Level", + "Horizontal Resolution", + "Vertical Resolution", + "Bits Per Pixel" +}; +/* Strings for writing out dp_configs */ +#define DP_CONF_STR_CONNECTOR "Connector: %s\n" +#define DP_CONF_STR_LINKRATE "Link Rate: %02x\n" +#define DP_CONF_STR_LANES "Lane Count: %u\n" +#define DP_CONF_STR_VSWING "Voltage Swing Level: %u\n" +#define DP_CONF_STR_PREEMP "Preemphasis Level: %u\n" +#define DP_CONF_STR_HRES "Horizontal Resolution: %d\n" +#define DP_CONF_STR_VRES "Vertical Resolution: %d\n" +#define DP_CONF_STR_BPP "Bits Per Pixel: %u\n" + /* As the drm_debugfs_init() routines are called before dev->dev_private is * allocated we need to hook into the minor for release. */ static int