All of lore.kernel.org
 help / color / mirror / Atom feed
From: Bob Paauwe <bob.j.paauwe@intel.com>
To: intel-gfx <intel-gfx@lists.freedesktop.org>
Subject: [RFC 05/10] drm/i915/config: Add init-time configuration of DP max link rate.
Date: Mon, 13 Apr 2015 13:51:06 -0700	[thread overview]
Message-ID: <1428958271-15653-6-git-send-email-bob.j.paauwe@intel.com> (raw)
In-Reply-To: <1428958271-15653-1-git-send-email-bob.j.paauwe@intel.com>

If the sink does not provide a maximum link rate, then check the
connector configuration before defaulting to the lowest allowed
link rate.

Signed-off-by: Bob Paauwe <bob.j.paauwe@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index b6944b9..b05ff6d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -129,6 +129,9 @@ static int
 intel_dp_max_link_bw(struct intel_dp  *intel_dp)
 {
 	int max_link_bw = intel_dp->dpcd[DP_MAX_LINK_RATE];
+	int cfg_max_link_bw = DP_LINK_BW_1_62;
+	struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
+	struct drm_device *dev = intel_dig_port->base.base.dev;
 
 	switch (max_link_bw) {
 	case DP_LINK_BW_1_62:
@@ -136,9 +139,15 @@ intel_dp_max_link_bw(struct intel_dp  *intel_dp)
 	case DP_LINK_BW_5_4:
 		break;
 	default:
-		WARN(1, "invalid max DP link bw val %x, using 1.62Gbps\n",
-		     max_link_bw);
-		max_link_bw = DP_LINK_BW_1_62;
+		intel_config_get_integer(to_i915(dev),
+					 CFG_CONNECTOR,
+					 intel_dp->attached_connector->base.name,
+					 "Maximum DPCD Rate",
+					 &cfg_max_link_bw);
+
+		WARN(1, "invalid max DP link bw val %x, using %x\n",
+		     max_link_bw, cfg_max_link_bw);
+		max_link_bw = cfg_max_link_bw;
 		break;
 	}
 	return max_link_bw;
-- 
2.1.0

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

  parent reply	other threads:[~2015-04-13 20:49 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-04-13 20:51 [RFC 00/10] i915 init-time configuration (v2) Bob Paauwe
2015-04-13 20:51 ` [RFC 01/10] drm/i915/config: Initial framework Bob Paauwe
2015-04-13 20:51 ` [RFC 02/10] drm/i915/config: Add init-time configuration of bits per color Bob Paauwe
2015-04-13 20:51 ` [RFC 03/10] drm/i915/config: Add init-time configuration of general connector properties Bob Paauwe
2015-04-13 20:51 ` [RFC 04/10] drm/i915/config: Add init-time configuration of dp panel fitter property Bob Paauwe
2015-04-13 20:51 ` Bob Paauwe [this message]
2015-04-13 20:51 ` [RFC 06/10] drm/i915/config: Add init-time configuration of eDP PPS delays Bob Paauwe
2015-04-13 20:51 ` [RFC 07/10] drm/i915/config: Add init-time configuration of eDP backlight settings Bob Paauwe
2015-04-13 20:51 ` [RFC 08/10] drm/i915: Add PPS delay values to debugfs Bob Paauwe
2015-04-13 20:51 ` [RFC 09/10] drm/i915: Add backlight max and level to debugfs output Bob Paauwe
2015-04-13 20:51 ` [RFC 10/10] drm/i915/config: An example/test ACPI property table Bob Paauwe

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=1428958271-15653-6-git-send-email-bob.j.paauwe@intel.com \
    --to=bob.j.paauwe@intel.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.