[PATCH 3/4] drm/i915: Cache sink_count for eDP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



For eDP panels all the DPCD and EDID data is cached when initializing
the eDP connector so in futher detection it do not call
intel_dp_detect_dpcd() for eDP.
The problem is on the first short pulse interruption it calls
intel_dp_get_dpcd() for eDP and DP and it will read and set the sink
count, causing a mismatch between old sink count and the new one
triggering a full detection without needed.

Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx>
Signed-off-by: José Roberto de Souza <jose.souza@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_dp.c | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 19f0c3f59cbe..4a1c31ec9065 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3926,6 +3926,7 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
 {
 	struct drm_i915_private *dev_priv =
 		to_i915(dp_to_dig_port(intel_dp)->base.base.dev);
+	u8 val;
 
 	/* this function is meant to be called only once */
 	WARN_ON(intel_dp->dpcd[DP_DPCD_REV] != 0);
@@ -3997,6 +3998,10 @@ intel_edp_init_dpcd(struct intel_dp *intel_dp)
 
 	intel_dp_set_common_rates(intel_dp);
 
+	if (drm_dp_dpcd_readb(&intel_dp->aux, DP_SINK_COUNT, &val) <= 0)
+		return false;
+	intel_dp->sink_count = DP_GET_SINK_COUNT(val);
+
 	return true;
 }
 
-- 
2.19.0

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




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux