[PATCH 05/10] drm/i915: Do not try to set DPMS if sink is disconnected

José Roberto de Souza jose.souza at intel.com
Mon Oct 1 22:25:35 UTC 2018


intel_dp_sink_dpms() is also called in the DP port disconnection
flow, causing the DPCD transactions to fail due obvious reaons.
So lets check the connector state before waste any time trying
to do DPCD in a disconnected sink.

Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
---
 drivers/gpu/drm/i915/intel_dp.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 2cd2dc564181..46ac603da91d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2818,6 +2818,10 @@ void intel_dp_sink_dpms(struct intel_dp *intel_dp, int mode)
 	if (intel_dp->dpcd[DP_DPCD_REV] < 0x11)
 		return;
 
+	if (intel_dp->attached_connector->base.status !=
+	    connector_status_connected)
+		return;
+
 	if (mode != DRM_MODE_DPMS_ON) {
 		if (downstream_hpd_needs_d0(intel_dp))
 			return;
-- 
2.19.0



More information about the Intel-gfx-trybot mailing list