[Intel-gfx] [PATCH 04/15] drm/i915: Run psr_setup unconditionally

Rodrigo Vivi rodrigo.vivi at gmail.com
Tue Jun 17 02:03:02 CEST 2014


On Mon, Jun 16, 2014 at 10:51 AM, Daniel Vetter <daniel.vetter at ffwll.ch>
wrote:

> Due to runtime pm and system s/r we need to restore hw state every
> time we enable a pipe again. Hence trying to avoid that is just
> pointless book-keeping which Rodrigo then tried to work around by
> manually adding psr_setup calls to our resume code.
>
> Much simpler to just remove code instead.
>
> Cc: Rodrigo Vivi <rodrigo.vivi at intel.com>
> Signed-off-by: Daniel Vetter <daniel.vetter at ffwll.ch>
> ---
>  drivers/gpu/drm/i915/i915_drv.h | 1 -
>  drivers/gpu/drm/i915/intel_dp.c | 8 --------
>  2 files changed, 9 deletions(-)
>
> diff --git a/drivers/gpu/drm/i915/i915_drv.h
> b/drivers/gpu/drm/i915/i915_drv.h
> index 64d520f7e8d9..f5db29428406 100644
> --- a/drivers/gpu/drm/i915/i915_drv.h
> +++ b/drivers/gpu/drm/i915/i915_drv.h
> @@ -636,7 +636,6 @@ struct i915_drrs {
>  struct i915_psr {
>         bool sink_support;
>         bool source_ok;
> -       bool setup_done;
>         bool enabled;
>         bool active;
>         struct delayed_work work;
> diff --git a/drivers/gpu/drm/i915/intel_dp.c
> b/drivers/gpu/drm/i915/intel_dp.c
> index 8717d3b9667c..4ab4757fb53d 100644
> --- a/drivers/gpu/drm/i915/intel_dp.c
> +++ b/drivers/gpu/drm/i915/intel_dp.c
> @@ -1663,9 +1663,6 @@ static void intel_edp_psr_setup(struct intel_dp
> *intel_dp)
>         struct drm_i915_private *dev_priv = dev->dev_private;
>         struct edp_vsc_psr psr_vsc;
>
> -       if (dev_priv->psr.setup_done)
> -               return;
> -
>         /* Prepare VSC packet as per EDP 1.3 spec, Table 3.10 */
>         memset(&psr_vsc, 0, sizeof(psr_vsc));
>         psr_vsc.sdp_header.HB0 = 0;
> @@ -1677,8 +1674,6 @@ static void intel_edp_psr_setup(struct intel_dp
> *intel_dp)
>         /* Avoid continuous PSR exit by masking memup and hpd */
>         I915_WRITE(EDP_PSR_DEBUG_CTL(dev), EDP_PSR_DEBUG_MASK_MEMUP |
>                    EDP_PSR_DEBUG_MASK_HPD | EDP_PSR_DEBUG_MASK_LPSP);
> -
> -       dev_priv->psr.setup_done = true;
>  }
>
>  static void intel_edp_psr_enable_sink(struct intel_dp *intel_dp)
> @@ -1911,9 +1906,6 @@ void intel_edp_psr_exit(struct drm_device *dev, bool
> schedule_back)
>         if (!HAS_PSR(dev))
>                 return;
>
> -       if (!dev_priv->psr.setup_done)
> -               return;

-
>

I'd add here:
+       if (!dev_priv->psr.enabled)
+               return;



>         cancel_delayed_work_sync(&dev_priv->psr.work);
>
>         if (dev_priv->psr.active)
> --
> 2.0.0
>
> _______________________________________________
> Intel-gfx mailing list
> Intel-gfx at lists.freedesktop.org
> http://lists.freedesktop.org/mailman/listinfo/intel-g
> <http://lists.freedesktop.org/mailman/listinfo/intel-gfx>


with or without it:
Reviewed-by: Rodrigo Vivi <rodrigo.vivi at intel.com>

-- 
Rodrigo Vivi
Blog: http://blog.vivi.eng.br
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.freedesktop.org/archives/intel-gfx/attachments/20140616/5eb112c4/attachment.html>


More information about the Intel-gfx mailing list