All of lore.kernel.org
 help / color / mirror / Atom feed
From: "Souza, Jose" <jose.souza@intel.com>
To: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Cc: "intel-gfx@lists.freedesktop.org"
	<intel-gfx@lists.freedesktop.org>,
	"Runyan, Arthur J" <arthur.j.runyan@intel.com>,
	"Aigal, Pavana A" <pavana.a.aigal@intel.com>,
	"Pandiyan, Dhinakaran" <dhinakaran.pandiyan@intel.com>
Subject: Re: [PATCH] drm/i915: Fix PSR2 selective update corruption after PSR1 setup
Date: Tue, 12 Mar 2019 21:22:15 +0000	[thread overview]
Message-ID: <3904849eafb1ad15c71afa9c066448b984c25197.camel@intel.com> (raw)
In-Reply-To: <20190312205322.GY24277@intel.com>


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

On Tue, 2019-03-12 at 13:53 -0700, Rodrigo Vivi wrote:
> On Tue, Mar 12, 2019 at 01:42:17PM -0700, José Roberto de Souza
> wrote:
> > For some reason if the PSR1 EDP_PSR_TP1_TP3_SEL register is kept
> > set
> > while PSR2 is enabled, it causes some selective updates to fail
> > after
> > got back from DC6 for the first time.
> > So lets clear this register before enabled PSR2, as it could be set
> > by a previous i915 module, firmware/BIOS or by a previous mode that
> > is not compatible with PSR2.
> 
> Does it happen when you don't have DMC loaded?
> 
> Because It looks like a DMC bug for me...
> 

BINGO, it do not happens without DMC.

> If by removing DMC we don't see the issue, could we please file
> this bug to DMC while adding a FIXME with DMC bugged version on it?

It happens with GEN9 and GEN10 and reproduced with: icl_dmc_ver1_07.bin
and kbl_dmc_ver1_04.bin

So updating the comment and commit description to:

I will update the comment and commit description to:

For some reason if this register is set and when DMC restore the state
after a DC6 exit, it causes some PSR2 selective updates to fail,
corrupting screen.
So for now lets have this workaround until DMC is fixed.

> 
> Aa: Pavana
> 
> If it doesn't happen with DMC loaded than maybe a HSD would for hw
> team would be good anyway.

I filled a bug in BSpec but in future I will do a HSD instead.

> 
> Cc: Art.
> 
> Thanks,
> Rodrigo.
> 
> > Cc: Dhinakaran Pandiyan <dhinakaran.pandiyan@intel.com>
> > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
> > ---
> >  drivers/gpu/drm/i915/intel_psr.c | 12 ++++++++++--
> >  1 file changed, 10 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/intel_psr.c
> > b/drivers/gpu/drm/i915/intel_psr.c
> > index 7bab6a009e0d..ae62f8124558 100644
> > --- a/drivers/gpu/drm/i915/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/intel_psr.c
> > @@ -494,12 +494,20 @@ static void hsw_activate_psr2(struct intel_dp
> > *intel_dp)
> >  {
> >  	struct drm_i915_private *dev_priv = dp_to_i915(intel_dp);
> >  	u32 val;
> > +	int idle_frames;
> > +
> > +	/*
> > +	 * Keeping this PSR1 register set while PSR2 is enabled causes
> > some
> > +	 * PSR2 selective updates to fail, corrupting screen.
> > +	 */
> > +	val = I915_READ(EDP_PSR_CTL);
> > +	if (val & EDP_PSR_TP1_TP3_SEL)
> > +		I915_WRITE(EDP_PSR_CTL, val & ~EDP_PSR_TP1_TP3_SEL);
> >  
> >  	/* Let's use 6 as the minimum to cover all known cases
> > including the
> >  	 * off-by-one issue that HW has in some cases.
> >  	 */
> > -	int idle_frames = max(6, dev_priv->vbt.psr.idle_frames);
> > -
> > +	idle_frames = max(6, dev_priv->vbt.psr.idle_frames);
> >  	idle_frames = max(idle_frames, dev_priv->psr.sink_sync_latency
> > + 1);
> >  	val = idle_frames << EDP_PSR2_IDLE_FRAME_SHIFT;
> >  
> > -- 
> > 2.21.0
> > 

[-- 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

  parent reply	other threads:[~2019-03-12 21:22 UTC|newest]

Thread overview: 15+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-03-12 20:42 [PATCH] drm/i915: Fix PSR2 selective update corruption after PSR1 setup José Roberto de Souza
2019-03-12 20:53 ` Rodrigo Vivi
2019-03-12 21:14   ` Dhinakaran Pandiyan
2019-03-12 21:28     ` Souza, Jose
2019-03-12 21:46       ` Pandiyan, Dhinakaran
2019-03-12 22:07         ` Souza, Jose
2019-03-12 23:42       ` Runyan, Arthur J
2019-03-20 18:57         ` Runyan, Arthur J
2019-03-20 19:02           ` Pandiyan, Dhinakaran
2019-03-12 21:22   ` Souza, Jose [this message]
2019-03-13 15:01 ` ✗ Fi.CI.SPARSE: warning for " Patchwork
2019-03-13 16:06 ` ✗ Fi.CI.BAT: failure " Patchwork
2019-03-14  3:18 ` ✗ Fi.CI.SPARSE: warning for drm/i915: Fix PSR2 selective update corruption after PSR1 setup (rev2) Patchwork
2019-03-14  3:47 ` ✓ Fi.CI.BAT: success " Patchwork
2019-03-14 13:03 ` ✗ Fi.CI.IGT: 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=3904849eafb1ad15c71afa9c066448b984c25197.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=arthur.j.runyan@intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --cc=pavana.a.aigal@intel.com \
    --cc=rodrigo.vivi@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.