All of lore.kernel.org
 help / color / mirror / Atom feed
From: Todd Previte <tprevite@gmail.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 6/9] drm/i915: Update intel_dp_compute_config() to handle compliance test requests
Date: Wed, 18 Feb 2015 20:00:34 -0700	[thread overview]
Message-ID: <1424314837-32434-7-git-send-email-tprevite@gmail.com> (raw)
In-Reply-To: <1424314837-32434-1-git-send-email-tprevite@gmail.com>

Adds provisions in intel_dp_compute_config() to accommodate compliance
testing. Mostly this invovles circumventing the automatic link configuration
parameters and allowing the compliance code to set those parameters as
required by the tests.

V2:
- N/A
V3:
- Moved color range check down under the compliance_exit tag

Signed-off-by: Todd Previte <tprevite@gmail.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 38 +++++++++++++++++++++++++++-----------
 1 file changed, 27 insertions(+), 11 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e69cdad..2d83f13 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1191,6 +1191,21 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 	pipe_config->has_drrs = false;
 	pipe_config->has_audio = intel_dp->has_audio;
 
+	/* Compliance testing should skip most of this function */
+	if (!is_edp(intel_dp) && intel_dp->compliance_testing_active) {
+		bpp = intel_dp->compliance_config.bits_per_pixel;
+		lane_count = intel_dp->compliance_config.lane_count;
+		clock = intel_dp->compliance_config.link_rate >> 3;
+		/* Assign here and skip at the end - ensures correct values */
+		intel_dp->link_bw = bws[clock];
+		intel_dp->lane_count = lane_count;
+		pipe_config->pipe_bpp = bpp;
+		pipe_config->port_clock =
+			drm_dp_bw_code_to_link_rate(intel_dp->link_bw);
+
+		goto compliance_exit;
+	}
+
 	if (is_edp(intel_dp) && intel_connector->panel.fixed_mode) {
 		intel_fixed_panel_mode(intel_connector->panel.fixed_mode,
 				       adjusted_mode);
@@ -1251,6 +1266,18 @@ intel_dp_compute_config(struct intel_encoder *encoder,
 	return false;
 
 found:
+	intel_dp->link_bw = bws[clock];
+	intel_dp->lane_count = lane_count;
+	pipe_config->pipe_bpp = bpp;
+	pipe_config->port_clock = drm_dp_bw_code_to_link_rate(intel_dp->link_bw);
+
+	DRM_DEBUG_KMS("DP link bw %02x lane count %d clock %d bpp %d\n",
+		      intel_dp->link_bw, intel_dp->lane_count,
+		      pipe_config->port_clock, bpp);
+	DRM_DEBUG_KMS("DP link bw required %i available %i\n",
+		      mode_rate, link_avail);
+
+compliance_exit:
 	if (intel_dp->color_range_auto) {
 		/*
 		 * See:
@@ -1266,17 +1293,6 @@ found:
 	if (intel_dp->color_range)
 		pipe_config->limited_color_range = true;
 
-	intel_dp->link_bw = bws[clock];
-	intel_dp->lane_count = lane_count;
-	pipe_config->pipe_bpp = bpp;
-	pipe_config->port_clock = drm_dp_bw_code_to_link_rate(intel_dp->link_bw);
-
-	DRM_DEBUG_KMS("DP link bw %02x lane count %d clock %d bpp %d\n",
-		      intel_dp->link_bw, intel_dp->lane_count,
-		      pipe_config->port_clock, bpp);
-	DRM_DEBUG_KMS("DP link bw required %i available %i\n",
-		      mode_rate, link_avail);
-
 	intel_link_compute_m_n(bpp, lane_count,
 			       adjusted_mode->crtc_clock,
 			       pipe_config->port_clock,
-- 
1.9.1

_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
http://lists.freedesktop.org/mailman/listinfo/intel-gfx

  parent reply	other threads:[~2015-02-19  3:00 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-02-19  3:00 Displayport Compliance Testing V3 Todd Previte
2015-02-19  3:00 ` [PATCH 1/9] drm/i915: Add automated testing support for Displayport compliance testing Todd Previte
2015-02-19  3:00 ` [PATCH 2/9] drm/i915: Update intel_dp_check_link_status() " Todd Previte
2015-02-19  3:00 ` [PATCH 3/9] drm/i915: Add a delay in Displayport AUX transactions for " Todd Previte
2015-02-19  3:00 ` [PATCH 4/9] drm/i915: Add debugfs functions for Displayport " Todd Previte
2015-03-09 17:57   ` Jani Nikula
2015-03-11 17:19     ` Todd Previte
2015-02-19  3:00 ` [PATCH 5/9] drm/i915: Update the EDID automated compliance test function Todd Previte
2015-02-26 17:40   ` [PATCH 5/9 V4] " Todd Previte
2015-02-19  3:00 ` Todd Previte [this message]
2015-02-19  3:00 ` [PATCH 7/9] drm/i915: Update intel_dp_hpd_pulse() to check link status for non-MST operation Todd Previte
2015-03-05 18:22   ` [PATCH] " Todd Previte
2015-03-06 16:34     ` Daniel Vetter
2015-03-09 15:34       ` Jesse Barnes
2015-03-09 17:29         ` Daniel Vetter
2015-03-09 19:07           ` Jesse Barnes
2015-03-09 21:04             ` Ville Syrjälä
2015-03-11 18:37               ` Jesse Barnes
2015-03-11 19:10                 ` Ville Syrjälä
2015-03-11 19:38                   ` Daniel Vetter
2015-02-19  3:00 ` [PATCH 8/9] drm/i915: Add new debugfs file for Displaypor compliance test control Todd Previte
2015-02-19  3:00 ` [PATCH 9/9] drm/i915: Add debugfs write and test param parsing functions for DP " Todd Previte
2015-02-19  5:55   ` shuang.he

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1424314837-32434-7-git-send-email-tprevite@gmail.com \
    --to=tprevite@gmail.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.