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 <[email protected]>
---
 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

_______________________________________________
Intel-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to