Message ID | 20180517222118.14246-5-jose.souza@intel.com (mailing list archive) |
---|---|
State | New, archived |
Headers | show |
On Thu, 2018-05-17 at 15:21 -0700, José Roberto de Souza wrote: > Sink will interrupt source when it have any problem saving or reading > the remote frame buffer. > > v3: > disabling PSR instead of exiting on error > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com> > --- > drivers/gpu/drm/i915/intel_psr.c | 14 ++++++++++++++ > 1 file changed, 14 insertions(+) > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > b/drivers/gpu/drm/i915/intel_psr.c > index 60797c8f9f0e..f72e3f91809f 100644 > --- a/drivers/gpu/drm/i915/intel_psr.c > +++ b/drivers/gpu/drm/i915/intel_psr.c > @@ -1046,6 +1046,20 @@ void intel_psr_short_pulse(struct intel_dp > *intel_dp) > psr_disable(intel_dp); > } > > + if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PSR_ERROR_STATUS, > &val) != 1) { > + DRM_ERROR("PSR_ERROR_STATUS dpcd read failed\n"); > + goto exit; > + } > + > + if (val & DP_PSR_RFB_STORAGE_ERROR) { > + DRM_DEBUG_KMS("PSR RFB storage error, exiting > PSR\n"); > + psr_disable(intel_dp); > + } > + if (val & (DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR | > DP_PSR_LINK_CRC_ERROR)) > + DRM_ERROR("PSR_ERROR_STATUS not handled %x\n", val); > + /* clear status register */ > + drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_ERROR_STATUS, > val); > + > /* TODO: handle other PSR/PSR2 errors */ > exit: > mutex_unlock(&psr->lock);
diff --git a/drivers/gpu/drm/i915/intel_psr.c b/drivers/gpu/drm/i915/intel_psr.c index 60797c8f9f0e..f72e3f91809f 100644 --- a/drivers/gpu/drm/i915/intel_psr.c +++ b/drivers/gpu/drm/i915/intel_psr.c @@ -1046,6 +1046,20 @@ void intel_psr_short_pulse(struct intel_dp *intel_dp) psr_disable(intel_dp); } + if (drm_dp_dpcd_readb(&intel_dp->aux, DP_PSR_ERROR_STATUS, &val) != 1) { + DRM_ERROR("PSR_ERROR_STATUS dpcd read failed\n"); + goto exit; + } + + if (val & DP_PSR_RFB_STORAGE_ERROR) { + DRM_DEBUG_KMS("PSR RFB storage error, exiting PSR\n"); + psr_disable(intel_dp); + } + if (val & (DP_PSR_VSC_SDP_UNCORRECTABLE_ERROR | DP_PSR_LINK_CRC_ERROR)) + DRM_ERROR("PSR_ERROR_STATUS not handled %x\n", val); + /* clear status register */ + drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_ERROR_STATUS, val); + /* TODO: handle other PSR/PSR2 errors */ exit: mutex_unlock(&psr->lock);
Sink will interrupt source when it have any problem saving or reading the remote frame buffer. v3: disabling PSR instead of exiting on error Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com> Cc: Rodrigo Vivi <rodrigo.vivi@intel.com> Signed-off-by: José Roberto de Souza <jose.souza@intel.com> --- drivers/gpu/drm/i915/intel_psr.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+)