[Intel-gfx] [PATCH v2 5/9] drm/i915/psr: Handle PSR RFB storage error

José Roberto de Souza jose.souza at intel.com
Wed Apr 18 22:43:07 UTC 2018


Sink will interrupt source when it have any problem saving or reading
the remote frame buffer.

Signed-off-by: José Roberto de Souza <jose.souza at intel.com>
Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan at intel.com>
Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
---

Changes from v1:
- printing a debug message when sink assert a error

 drivers/gpu/drm/i915/intel_psr.c | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c
index 4cb27faab707..558b08a43f9e 100644
--- a/drivers/gpu/drm/i915/intel_psr.c
+++ b/drivers/gpu/drm/i915/intel_psr.c
@@ -1156,6 +1156,18 @@ void intel_psr_hpd_short_pulse_handle(struct intel_dp *intel_dp)
 		intel_psr_exit(dev_priv);
 	}
 
+	if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PSR_ERROR_STATUS, &val) != 1) {
+		DRM_DEBUG_KMS("PSR_ERROR_STATUS read failed\n");
+		goto dpcd_error;
+	}
+
+	if (val & DP_PSR_RFB_STORAGE_ERROR) {
+		DRM_DEBUG_KMS("PSR RFB storage error, exiting PSR\n");
+		intel_psr_exit(dev_priv);
+	}
+	/* clear status register */
+	drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_ERROR_STATUS, val);
+
 	/* TODO: handle other PSR/PSR2 errors */
 dpcd_error:
 	intel_psr_schedule_activate_work(dev_priv);
-- 
2.17.0



More information about the Intel-gfx mailing list