On Wed, 2018-10-10 at 17:41 -0700, José Roberto de Souza wrote: > In the past we had hooks to configure HW for VLV/CHV too, in the drop > of VLV/CHV support the intel_psr_disable_source() code was not moved > to the caller, so doing it here. > > Suggested-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx> Reviewed-by: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx> Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@xxxxxxxxx> > Signed-off-by: José Roberto de Souza <jose.souza@xxxxxxxxx> > --- > drivers/gpu/drm/i915/intel_psr.c | 25 +++++++++---------------- > 1 file changed, 9 insertions(+), 16 deletions(-) > > diff --git a/drivers/gpu/drm/i915/intel_psr.c > b/drivers/gpu/drm/i915/intel_psr.c > index 16d0e3df7de0..70d4e26e17b5 100644 > --- a/drivers/gpu/drm/i915/intel_psr.c > +++ b/drivers/gpu/drm/i915/intel_psr.c > @@ -680,13 +680,20 @@ static void intel_psr_exit(struct > drm_i915_private *dev_priv) > dev_priv->psr.active = false; > } > > -static void > -intel_psr_disable_source(struct intel_dp *intel_dp) > +static void intel_psr_disable_locked(struct intel_dp *intel_dp) > { > struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); > i915_reg_t psr_status; > u32 psr_status_mask; > > + lockdep_assert_held(&dev_priv->psr.lock); > + > + if (!dev_priv->psr.enabled) > + return; > + > + DRM_DEBUG_KMS("Disabling PSR%s\n", > + dev_priv->psr.psr2_enabled ? "2" : "1"); > + > intel_psr_exit(dev_priv); The above lockdep_assert_held(&dev_priv->psr.lock) made me think we need one in inside psr_exit() too. Not in this though, could perhaps be added in patch 1. > > if (dev_priv->psr.psr2_enabled) { > @@ -701,20 +708,6 @@ intel_psr_disable_source(struct intel_dp > *intel_dp) > if (intel_wait_for_register(dev_priv, psr_status, > psr_status_mask, 0, > 2000)) > DRM_ERROR("Timed out waiting for PSR Idle State\n"); > -} > - > -static void intel_psr_disable_locked(struct intel_dp *intel_dp) > -{ > - struct drm_i915_private *dev_priv = dp_to_i915(intel_dp); > - > - lockdep_assert_held(&dev_priv->psr.lock); > - > - if (!dev_priv->psr.enabled) > - return; > - > - DRM_DEBUG_KMS("Disabling PSR%s\n", > - dev_priv->psr.psr2_enabled ? "2" : "1"); > - intel_psr_disable_source(intel_dp); > > /* Disable PSR on Sink */ > drm_dp_dpcd_writeb(&intel_dp->aux, DP_PSR_EN_CFG, 0); _______________________________________________ Intel-gfx mailing list Intel-gfx@xxxxxxxxxxxxxxxxxxxxx https://lists.freedesktop.org/mailman/listinfo/intel-gfx