All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jani Nikula <jani.nikula@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: jani.nikula@intel.com, dhinakaran.pandiyan@intel.com
Subject: [PATCH v4 06/11] drm/i915/mst: use max link not sink lane count
Date: Thu,  6 Apr 2017 16:44:14 +0300	[thread overview]
Message-ID: <cf59530acafaf9258fb643d321ad251b44f34e29.1491485983.git.jani.nikula@intel.com> (raw)
In-Reply-To: <cover.1491485983.git.jani.nikula@intel.com>
In-Reply-To: <cover.1491485983.git.jani.nikula@intel.com>

The source might not support as many lanes as the sink, or the link
training might have failed at higher lane counts. Take these into
account.

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
Cc: Manasi Navare <manasi.d.navare@intel.com>
Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Manasi Navare <manasi.d.navare@intel.com>
Signed-off-by: Jani Nikula <jani.nikula@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c     | 2 +-
 drivers/gpu/drm/i915/intel_dp_mst.c | 4 ++--
 drivers/gpu/drm/i915/intel_drv.h    | 1 +
 3 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index b3df2082eac9..95f2278700e3 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -177,7 +177,7 @@ static int intel_dp_max_common_lane_count(struct intel_dp *intel_dp)
 	return min(source_max, sink_max);
 }
 
-static int intel_dp_max_lane_count(struct intel_dp *intel_dp)
+int intel_dp_max_lane_count(struct intel_dp *intel_dp)
 {
 	return intel_dp->max_link_lane_count;
 }
diff --git a/drivers/gpu/drm/i915/intel_dp_mst.c b/drivers/gpu/drm/i915/intel_dp_mst.c
index c1f62eb07c07..3451e2abb23b 100644
--- a/drivers/gpu/drm/i915/intel_dp_mst.c
+++ b/drivers/gpu/drm/i915/intel_dp_mst.c
@@ -56,7 +56,7 @@ static bool intel_dp_mst_compute_config(struct intel_encoder *encoder,
 	 * for MST we always configure max link bw - the spec doesn't
 	 * seem to suggest we should do otherwise.
 	 */
-	lane_count = drm_dp_max_lane_count(intel_dp->dpcd);
+	lane_count = intel_dp_max_lane_count(intel_dp);
 
 	pipe_config->lane_count = lane_count;
 
@@ -343,7 +343,7 @@ intel_dp_mst_mode_valid(struct drm_connector *connector,
 	int max_rate, mode_rate, max_lanes, max_link_clock;
 
 	max_link_clock = intel_dp_max_link_rate(intel_dp);
-	max_lanes = drm_dp_max_lane_count(intel_dp->dpcd);
+	max_lanes = intel_dp_max_lane_count(intel_dp);
 
 	max_rate = intel_dp_max_data_rate(max_link_clock, max_lanes);
 	mode_rate = intel_dp_link_required(mode->clock, bpp);
diff --git a/drivers/gpu/drm/i915/intel_drv.h b/drivers/gpu/drm/i915/intel_drv.h
index f97603b74a28..5f6e1aad909d 100644
--- a/drivers/gpu/drm/i915/intel_drv.h
+++ b/drivers/gpu/drm/i915/intel_drv.h
@@ -1503,6 +1503,7 @@ void intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *co
 void intel_dp_mst_suspend(struct drm_device *dev);
 void intel_dp_mst_resume(struct drm_device *dev);
 int intel_dp_max_link_rate(struct intel_dp *intel_dp);
+int intel_dp_max_lane_count(struct intel_dp *intel_dp);
 int intel_dp_rate_select(struct intel_dp *intel_dp, int rate);
 void intel_dp_hot_plug(struct intel_encoder *intel_encoder);
 void intel_power_sequencer_reset(struct drm_i915_private *dev_priv);
-- 
2.1.4

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

  parent reply	other threads:[~2017-04-06 13:44 UTC|newest]

Thread overview: 28+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-06 13:44 [PATCH v4 00/11] drm/i915/dp: rest of refactoring, link rate fallback Jani Nikula
2017-04-06 13:44 ` [PATCH v4 01/11] drm/i915/dp: use the sink rates array for max sink rates Jani Nikula
2017-04-06 14:24   ` Ville Syrjälä
2017-04-06 13:44 ` [PATCH v4 02/11] drm/i915/dp: cache common rates with " Jani Nikula
2017-04-06 13:44 ` [PATCH v4 03/11] drm/i915/dp: do not limit rate seek when not needed Jani Nikula
2017-04-06 13:44 ` [PATCH v4 04/11] drm/i915/dp: don't call the link parameters sink parameters Jani Nikula
2017-04-06 13:44 ` [PATCH v4 05/11] drm/i915/dp: add functions for max common link rate and lane count Jani Nikula
2017-04-06 13:44 ` Jani Nikula [this message]
2017-04-06 13:44 ` [PATCH v4 07/11] drm/i915/dp: localize link rate index variable more Jani Nikula
2017-04-06 13:44 ` [PATCH v4 08/11] drm/i915/dp: use readb and writeb calls for single byte DPCD access Jani Nikula
2017-04-06 13:44 ` [PATCH v4 09/11] drm/i915/dp: read sink count to a temporary variable first Jani Nikula
2017-04-06 14:25   ` Ville Syrjälä
2017-04-11 14:19     ` Jani Nikula
2017-04-11 15:44       ` Navare, Manasi D
2017-04-06 13:44 ` [PATCH v4 10/11] drm/i915/dp: Validate cached link rate and lane count before retraining Jani Nikula
2017-04-06 14:31   ` Ville Syrjälä
2017-04-06 18:29     ` Manasi Navare
2017-04-06 20:43     ` [PATCH v5] " Manasi Navare
2017-04-06 21:00       ` [PATCH v6] " Manasi Navare
2017-04-12 14:00         ` Ville Syrjälä
2017-04-12 14:13           ` Jani Nikula
2017-04-12 16:50             ` Navare, Manasi D
2017-04-06 13:44 ` [PATCH v4 11/11] drm/i915: Implement Link Rate fallback on Link training failure Jani Nikula
2017-04-13 17:25   ` Manasi Navare
2017-04-13 19:16     ` Jani Nikula
2017-04-06 14:35 ` ✓ Fi.CI.BAT: success for drm/i915/dp: rest of refactoring, link rate fallback Patchwork
2017-04-06 20:42 ` ✗ Fi.CI.BAT: failure for drm/i915/dp: rest of refactoring, link rate fallback (rev2) Patchwork
2017-04-06 21:54 ` ✓ Fi.CI.BAT: success for drm/i915/dp: rest of refactoring, link rate fallback (rev3) Patchwork

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=cf59530acafaf9258fb643d321ad251b44f34e29.1491485983.git.jani.nikula@intel.com \
    --to=jani.nikula@intel.com \
    --cc=dhinakaran.pandiyan@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.