On Fri, Oct 26, 2018 at 05:53:47PM +0000, Souza, Jose wrote:
> On Thu, 2018-10-25 at 18:17 -0700, José Roberto de Souza wrote:
> > If a PSR error happened and the driver is reloaded, the EDP_PSR_IIR
> > will still keep the error set even after the reset done in the
> > irq_preinstall and irq_uninstall hooks.
> > And enabling in this situation cause the screen to freeze in the
> > first time that PSR HW tries to activate so lets keep PSR disabled
> > to avoid any rendering problems.
> > 
> > Cc: Dhinakaran Pandiyan <dhinakaran.pandi...@intel.com>
> > Signed-off-by: José Roberto de Souza <jose.so...@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_psr.c | 13 +++++++++++++
> >  1 file changed, 13 insertions(+)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_psr.c
> > b/drivers/gpu/drm/i915/intel_psr.c
> > index 68201cc24d25..718270da1061 100644
> > --- a/drivers/gpu/drm/i915/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/intel_psr.c
> > @@ -529,6 +529,19 @@ void intel_psr_compute_config(struct intel_dp
> > *intel_dp,
> >             return;
> >     }
> >  
> > +   /*
> > +    * If a PSR error happened and the driver is reloaded, the
> > EDP_PSR_IIR
> > +    * will still keep the error set even after the reset done in
> > the
> > +    * irq_preinstall and irq_uninstall hooks.
> > +    * And enabling in this situation cause the screen to freeze in
> > the
> > +    * first time that PSR HW tries to activate so lets keep PSR
> > disabled
> > +    * to avoid any rendering problems.
> > +    */
> > +   if (I915_READ(EDP_PSR_IIR) & EDP_PSR_ERROR(TRANSCODER_EDP)) {
> > +           DRM_DEBUG_KMS("PSR interruption error set\n");
> > +           return;
> > +   }
> > +
> >     if (IS_HASWELL(dev_priv) &&
> >         I915_READ(HSW_STEREO_3D_CTL(crtc_state->cpu_transcoder)) &
> >                   S3D_ENABLE) {
> 
> diff --git a/drivers/gpu/drm/i915/intel_psr.c
> b/drivers/gpu/drm/i915/intel_psr.c
> index 68201cc24d25..47af87f45e03 100644
> --- a/drivers/gpu/drm/i915/intel_psr.c
> +++ b/drivers/gpu/drm/i915/intel_psr.c
> @@ -529,6 +529,22 @@ void intel_psr_compute_config(struct intel_dp
> *intel_dp,
>                 return;
>         }
> 
> +       /*
> +        * If a PSR error happened and the driver is reloaded, the
> EDP_PSR_IIR
> +        * will still keep the error set even after the reset done in
> the
> +        * irq_preinstall and irq_uninstall hooks.
> +        * And enabling in this situation cause the screen to freeze in
> the
> +        * first time that PSR HW tries to activate so lets keep PSR
> disabled
> +        * to avoid any rendering problems.
> +        */
> +       intel_runtime_pm_get(dev_priv);
> +       if (I915_READ(EDP_PSR_IIR) & EDP_PSR_ERROR(TRANSCODER_EDP)) {
> +               intel_runtime_pm_put(dev_priv);
> +               DRM_DEBUG_KMS("PSR interruption error set\n");
> +               return;
> +       }
> +       intel_runtime_pm_put(dev_priv);

No hardware access in compute_config()

> +
>         if (IS_HASWELL(dev_priv) &&
>             I915_READ(HSW_STEREO_3D_CTL(crtc_state->cpu_transcoder)) &
>                       S3D_ENABLE) {

^
This is nonsense. Don't follow the bad example. Also pls send a patch to
kill this thing ;)

-- 
Ville Syrjälä
Intel
_______________________________________________
Intel-gfx mailing list
Intel-gfx@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/intel-gfx

Reply via email to