All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Ville Syrjälä" <ville.syrjala@linux.intel.com>
To: "Souza, Jose" <jose.souza@intel.com>
Cc: "intel-gfx@lists.freedesktop.org" <intel-gfx@lists.freedesktop.org>
Subject: Re: [PATCH v3 09/10] drm/i915: Keep PSR disabled after a driver reload after a PSR error
Date: Mon, 29 Oct 2018 13:18:49 +0200	[thread overview]
Message-ID: <20181029111849.GJ9144@intel.com> (raw)
In-Reply-To: <fd90aefcec9cd0a5f6577105696613b1e50a42c7.camel@intel.com>

On Fri, Oct 26, 2018 at 07:34:42PM +0000, Souza, Jose wrote:
> On Fri, 2018-10-26 at 21:01 +0300, Ville Syrjälä wrote:
> > 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.pandiyan@intel.com>
> > > > Signed-off-by: José Roberto de Souza <jose.souza@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()
> 
> Oh did not know that, I will fix that.
> Thanks
> 
> > 
> > > +
> > >         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 ;)
> 
> Sure, I can't find any place setting HSW_STEREO_3D_CTL so I will just
> remove it.
> I guess we don't support stereo 3D at all.

Not this form of it.

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

  reply	other threads:[~2018-10-29 11:18 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-10-26  1:17 [PATCH v3 01/10] drm/i915/psr: Use intel_psr_exit() in intel_psr_disable_source() José Roberto de Souza
2018-10-26  1:17 ` [PATCH v3 02/10] drm/i915/psr: Always wait for idle state when disabling PSR José Roberto de Souza
2018-10-26 16:45   ` Rodrigo Vivi
2018-10-26 17:10     ` Souza, Jose
2018-10-26  1:17 ` [PATCH v3 03/10] drm/i915/psr: Move intel_psr_disable_source() code to intel_psr_disable_locked() José Roberto de Souza
2018-10-26  1:17 ` [PATCH v3 04/10] drm/i915: Avoid a full port detection in the first eDP short pulse José Roberto de Souza
2018-10-26  1:17 ` [PATCH v3 05/10] drm/i915: Check PSR errors instead of retrain while PSR is enabled José Roberto de Souza
2018-10-26  1:17 ` [PATCH v3 06/10] drm/i915: Unmask PSR interruptions before assert IIR José Roberto de Souza
2018-10-26 17:06   ` Ville Syrjälä
2018-10-26  1:17 ` [PATCH v3 07/10] drm/i915/icl: Reset PSR interruptions José Roberto de Souza
2018-10-26 17:13   ` Ville Syrjälä
2018-10-26  1:17 ` [PATCH v3 08/10] drm/i915: Disable PSR when a PSR aux error happen José Roberto de Souza
2018-10-26  1:17 ` [PATCH v3 09/10] drm/i915: Keep PSR disabled after a driver reload after a PSR error José Roberto de Souza
2018-10-26 17:53   ` Souza, Jose
2018-10-26 18:01     ` Ville Syrjälä
2018-10-26 19:34       ` Souza, Jose
2018-10-29 11:18         ` Ville Syrjälä [this message]
2018-10-31 23:45   ` Dhinakaran Pandiyan
2018-11-06  0:00     ` Souza, Jose
2018-10-26  1:17 ` [PATCH v3 10/10] drm/i915: Do not enable PSR in the next modeset after a error José Roberto de Souza
2018-10-26  1:26 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [v3,01/10] drm/i915/psr: Use intel_psr_exit() in intel_psr_disable_source() Patchwork
2018-10-26  1:29 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-10-26  1:47 ` ✗ Fi.CI.BAT: failure " Patchwork

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20181029111849.GJ9144@intel.com \
    --to=ville.syrjala@linux.intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=jose.souza@intel.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.