Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
Subject: Re: [PATCH v4 8/9] drm/i915/psr: Set idle frames to maximum while getting pipe CRC
Date: Mon, 4 Mar 2019 20:56:25 +0000	[thread overview]
Message-ID: <5ae203b528cf8887e2a882d760bdf8d81cb13514.camel@intel.com> (raw)
In-Reply-To: <04eb0cd26a9820e2109457c6b0a353742fb7ae1e.camel@intel.com>


[-- Attachment #1.1: Type: text/plain, Size: 3608 bytes --]

On Mon, 2019-03-04 at 11:00 -0800, Dhinakaran Pandiyan wrote:
> On Mon, 2019-03-04 at 10:40 -0800, Souza, Jose wrote:
> > On Mon, 2019-03-04 at 10:31 -0800, Dhinakaran Pandiyan wrote:
> > > On Fri, 2019-03-01 at 17:34 -0800, José Roberto de Souza wrote:
> > > > Increase the idle frames to activate PSR1 to avoid CRC
> > > > timeouts,
> > > > as
> > > > soon as pipe CRC is enabled it will avoid PSR1 to activate but
> > > > if
> > > > PSR1 is activate before that, hardware goes to lower power
> > > > states
> > > > that inhibits CRC calculations causing CRC timeout errors in
> > > > IGT
> > > > tests.
> 
> Okay, so you are solving the case where PSR is already active when we
> want CRCs. How does modifying the idle frame count help if PSR is
> already active?

Exactly this sporadicts timeout should be caused by this:

- IGT test modify frontbuffer or do a flip
- IGT execution is preempted and it takes more than X idle frames
- PSR is activated
- IGT test start CRC capture
- CRC timeout

So increasing the idle frames should reduce the scenario above.

> 
> The commit also says PSR does not become active if CRCs were already
> enabled (idle count should not matter here). In that case, just
> disabling and re-enabling should be good, isn't it? Or perhaps, just
> doing a psr_flush() would do the same job?

Good suggestion, psr_flush() should do the same job I will test and
change to that.

> 
> > > > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > > > Cc: Ville Syrjälä <ville.syrjala@linux.intel.com>
> > > > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > > > ---
> > > >  drivers/gpu/drm/i915/i915_drv.h  |  1 +
> > > >  drivers/gpu/drm/i915/intel_psr.c | 17 +++++++++++++++--
> > > >  2 files changed, 16 insertions(+), 2 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/i915_drv.h
> > > > b/drivers/gpu/drm/i915/i915_drv.h
> > > > index 453af7438e67..e336f758e481 100644
> > > > --- a/drivers/gpu/drm/i915/i915_drv.h
> > > > +++ b/drivers/gpu/drm/i915/i915_drv.h
> > > > @@ -521,6 +521,7 @@ struct i915_psr {
> > > >  	bool sink_not_reliable;
> > > >  	bool irq_aux_error;
> > > >  	u16 su_x_granularity;
> > > > +	bool crc_enabled;
> > > >  };
> > > >  
> > > >  enum intel_pch {
> > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c
> > > > b/drivers/gpu/drm/i915/intel_psr.c
> > > > index d3e3996551c6..b237d96db277 100644
> > > > --- a/drivers/gpu/drm/i915/intel_psr.c
> > > > +++ b/drivers/gpu/drm/i915/intel_psr.c
> > > > @@ -452,6 +452,16 @@ static void hsw_activate_psr1(struct
> > > > intel_dp
> > > > *intel_dp)
> > > >  	 * frames, we'll go with 9 frames for now
> > > >  	 */
> > > >  	idle_frames = max(idle_frames, dev_priv-
> > > > >psr.sink_sync_latency
> > > > + 1);
> > > > +
> > > > +	/*
> > > > +	 * Increase the idle frames to active PSR1 to avoid CRC
> > > > timeouts, as
> > > > +	 * soon as pipe CRC is enabled it will avoid PSR1 to
> > > > activate
> > > > but if
> > > > +	 * PSR1 is activate before that, hardware goes to lower
> > > > power
> > > > states
> > > > +	 * that inhibits CRC calculations.
> > > > +	 */
> > > > +	if (dev_priv->psr.crc_enabled)
> > > > +		idle_frames = 0xf;
> > > 
> > > My understanding was only the enable bit can be changed when PSR
> > > is
> > > enabled. Does this work?
> > 
> > That is true, the additional changes in intel_psr_update() will
> > disable
> > and then enable PSR with this new idle_frames.
> > 
> > > > +
> > > >  	val |= idle_frames << EDP_PSR_IDLE_FRAME_SHIFT;

[-- Attachment #1.2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 488 bytes --]

[-- Attachment #2: Type: text/plain, Size: 159 bytes --]

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

  reply	other threads:[~2019-03-04 20:56 UTC|newest]

Thread overview: 23+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-02  1:34 [PATCH v4 1/9] drm/i915/psr: Remove PSR2 FIXME José Roberto de Souza
2019-03-02  1:34 ` [PATCH v4 2/9] drm/i915/psr: Only lookup for enabled CRTCs when forcing a fastset José Roberto de Souza
2019-03-02  1:34 ` [PATCH v4 3/9] drm/i915: Compute and commit color features in fastsets José Roberto de Souza
2019-03-02  1:34 ` [PATCH v4 4/9] drm/i915/psr: Drop test for EDP in CRTC when forcing commit José Roberto de Souza
2019-03-04 18:28   ` Rodrigo Vivi
2019-03-02  1:34 ` [PATCH v4 5/9] drm/i915/crc: Make IPS workaround generic José Roberto de Souza
2019-03-04 18:34   ` Rodrigo Vivi
2019-03-02  1:34 ` [PATCH v4 6/9] drm/i915: Disable PSR2 while getting pipe CRC José Roberto de Souza
2019-03-04 18:39   ` Rodrigo Vivi
2019-03-02  1:34 ` [PATCH v4 7/9] drm/i915: Drop redundant checks to update PSR state José Roberto de Souza
2019-03-04 18:42   ` Rodrigo Vivi
2019-03-04 18:54     ` Dhinakaran Pandiyan
2019-03-04 20:45       ` Souza, Jose
2019-03-02  1:34 ` [PATCH v4 8/9] drm/i915/psr: Set idle frames to maximum while getting pipe CRC José Roberto de Souza
2019-03-04 18:31   ` Dhinakaran Pandiyan
2019-03-04 18:40     ` Souza, Jose
2019-03-04 19:00       ` Dhinakaran Pandiyan
2019-03-04 20:56         ` Souza, Jose [this message]
2019-03-02  1:34 ` [PATCH v4 9/9] drm/i915: Enable PSR2 by default José Roberto de Souza
2019-03-04 18:43   ` Rodrigo Vivi
2019-03-02  2:34 ` ✗ Fi.CI.SPARSE: warning for series starting with [v4,1/9] drm/i915/psr: Remove PSR2 FIXME Patchwork
2019-03-02  2:51 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-02 13:38 ` ✓ Fi.CI.IGT: " 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=5ae203b528cf8887e2a882d760bdf8d81cb13514.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    /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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox