All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v1] drm/i915/dp: Modify DP lane count from DPCD reading
@ 2024-06-28  7:30 Ben Kao
  2024-06-28  7:36 ` Jani Nikula
  2024-06-28  9:45 ` ✗ Fi.CI.BAT: failure for " Patchwork
  0 siblings, 2 replies; 4+ messages in thread
From: Ben Kao @ 2024-06-28  7:30 UTC (permalink / raw)
  To: intel-gfx; +Cc: Ben Kao

We found that the external monitor would be failed to display
when hot-plug with dual Type-C USB cable on Dell WD19DC dock.
Due to the host would receive 2 lanes setting when the first HPD,
then receive 4 lanes setting later, but the host only sets 2 lanes
DP and skips to set 4 lanes DP. I modify DP lane count if the
current DP lane count is not the same as DPCD reading.

Signed-off-by: Ben Kao <ben.kao@intel.com>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 5b3b6ae1e3d7..a9b9023c6744 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5545,6 +5545,12 @@ intel_dp_detect_dpcd(struct intel_dp *intel_dp)
 	if (!intel_dp_get_dpcd(intel_dp))
 		return connector_status_disconnected;
 
+	/* lanes count changed */
+	if (intel_dp->lane_count != drm_dp_max_lane_count(intel_dp->dpcd)) {
+		intel_dp->lane_count = drm_dp_max_lane_count(intel_dp->dpcd);
+		return connector_status_disconnected;
+	}
+
 	intel_dp->mst_detect = intel_dp_mst_detect(intel_dp);
 
 	/* if there's no downstream port, we're done */
-- 
2.17.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2024-06-28  9:45 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-06-28  7:30 [PATCH v1] drm/i915/dp: Modify DP lane count from DPCD reading Ben Kao
2024-06-28  7:36 ` Jani Nikula
2024-06-28  7:52   ` Kao, Ben
2024-06-28  9:45 ` ✗ Fi.CI.BAT: failure for " Patchwork

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.