diff mbox

drm/i915/vlv: DP_SINK_COUNT is not reliable for branch device.

Message ID 1404097944-10935-1-git-send-email-quanxian.wang@intel.com (mailing list archive)
State New, archived
Headers show

Commit Message

Wang, Quanxian June 30, 2014, 3:12 a.m. UTC
Background:
Valleyview platform VTC1010 with a branch device DP2HDMI attached by a sink device
Giantec HDMI display.
Firstly changing to virtual console termial, after a while(10-20 minutes), connector
issues a faked dpms signal which cause kernel to power off the monitor. And kernel will
delete all allocated connecotr and encoder attached to this connector. This will cause
monitor could not be restored at all even if you press any key or mouse.

The root cause is that intel_dp_detect_dpcd funtion detects DP_SINK_COUNT from dpcd
to check how many sink devices are attached. If greater than 0, it will
be fine to keep connector alive. Otherwise the connector will be changed to be
disconnected. And then all things related with this connector will be deleted.

With testing, when SINK_COUNT is 0, drm_probe_ddc works and connector is still alive.

So this patch will ignore the condition of SINK_COUNT=0, and continue to check if
connector is really alive without touch others process.

Signed-off-by: Quanxian Wang <quanxian.wang@intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 23b62b0..9984d22 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -3414,8 +3414,8 @@  intel_dp_detect_dpcd(struct intel_dp *intel_dp)
 					    &reg, 1) < 0)
 			return connector_status_unknown;
 
-		return DP_GET_SINK_COUNT(reg) ? connector_status_connected
-					      : connector_status_disconnected;
+		if (DP_GET_SINK_COUNT(reg))
+			return connector_status_connected;
 	}
 
 	/* If no HPD, poke DDC gently */