All of 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>
Cc: "Vivi, Rodrigo" <rodrigo.vivi@intel.com>
Subject: Re: [PATCH 8/9] drm/i915/psr: Set the right frames values
Date: Fri, 30 Nov 2018 21:18:29 +0000	[thread overview]
Message-ID: <7ebae6906aaf428b21a75005275125ef41be635b.camel@intel.com> (raw)
In-Reply-To: <1817b0b52f8923efc2d3f3079b1d3816ce0518d8.camel@intel.com>


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

On Fri, 2018-11-30 at 11:35 -0800, Dhinakaran Pandiyan wrote:
> On Thu, 2018-11-29 at 17:00 -0800, Souza, Jose wrote:
> > On Thu, 2018-11-29 at 15:33 -0800, Dhinakaran Pandiyan wrote:
> > > On Mon, 2018-11-26 at 16:37 -0800, José Roberto de Souza wrote:
> > > > EDP_PSR2_IDLE_FRAMES_TO_DEEP_SLEEP() was being set with the
> > > > number
> > > > of
> > > > frames that it should wait to enter PSR, what is wrong.
> > > > Here it is setting this field with the highest value to avoid
> > > > PSR2
> > > > exits frequently, as when HW exit deep sleep it needs to go to
> > > > idle
> > > > state causing a PSR exit for then waiting a few frames before
> > > > activate PSR2 again.
> > > > This will result in more power saving as the sleep state also
> > > > provide
> > > > some power savings by doing selective updates instead of full
> > > > screen
> > > > updates.
> > > > 
> > > > About EDP_PSR2_FRAMES_BEFORE_ACTIVATE() it is the number of
> > > > frames
> > > > (not idle frames) that PSR2 hardware will wait to activate
> > > > PSR2,
> > > > so
> > > > lets keep using the sink sync latency.
> > > > 
> > > > Cc: Rodrigo Vivi <rodrigo.vivi@intel.com>
> > > > 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 | 12 +++++-------
> > > >  1 file changed, 5 insertions(+), 7 deletions(-)
> > > > 
> > > > diff --git a/drivers/gpu/drm/i915/intel_psr.c
> > > > b/drivers/gpu/drm/i915/intel_psr.c
> > > > index ba7bbe3f8df2..6fd793fec5e9 100644
> > > > --- a/drivers/gpu/drm/i915/intel_psr.c
> > > > +++ b/drivers/gpu/drm/i915/intel_psr.c
> > > > @@ -482,13 +482,13 @@ static void hsw_activate_psr2(struct
> > > > intel_dp
> > > > *intel_dp)
> > > >  	struct i915_psr *psr = &dev_priv->psr;
> > > >  	u32 val;
> > > >  
> > > > -	/* Let's use 6 as the minimum to cover all known cases
> > > > including the
> > > > -	 * off-by-one issue that HW has in some cases.
> > > > +	/* sink_sync_latency of 8 means source has to wait for
> > > > more
> > > > than 8
> > > > +	 * frames, we'll go with 9 frames for now
> > > >  	 */
> > > > -	int idle_frames = max(6, dev_priv-
> > > > >vbt.psr.idle_frames);
> > > > +	val = EDP_PSR2_FRAMES_BEFORE_ACTIVATE(psr-
> > > > >sink_sync_latency +
> > > > 1);
> > > >  
> > > > -	idle_frames = max(idle_frames, psr->sink_sync_latency +
> > > > 1);
> > > > -	val = EDP_PSR2_IDLE_FRAMES_TO_DEEP_SLEEP(idle_frames);
> > > > +	/* Avoid deep sleep as much as possible to avoid PSR2
> > > > idle
> > > > state */
> > > > +	val |= EDP_PSR2_IDLE_FRAMES_TO_DEEP_SLEEP(15);
> > > 
> > > Avoid deep sleep as much as possible? Why? We get the best power
> > > savings in deep sleep, why make it harder to achieve that?
> > 
> > As said in commit message a small frame count to enter in deep
> > sleep
> > will cause frequent PSR exits and when HW comes back from deep
> > sleep
> > it
> > needs to go to idle state. So it will need to wait for
> > EDP_PSR2_FRAMES_BEFORE_ACTIVATE() frames before activate PSR again.
> > 
> > A regular productivity tools(Office and email) user would benefit
> > from
> > that as the mouse cursor blinking would make PSR2 go from deep
> > sleep
> > to
> > idle state and stay in idle as long as cursor is blinking. With 15
> > frames user will stay most of the time in PSR2 sleep state that
> > already
> > provide some power savings.
> 
> Do you have any numbers to justify that not entering deep sleep (just
> doing SU) is better than entering deep sleep and exiting?

I don't have power data, just stimations of how many frames it would
state in each state.

> 
> Even with a blinking cursor at 2 flips/second, there is enough time
> to
> wait for 9 idle frames (max currently), enter deep sleep and exit(~2
> frames) between flips.

2 flips per second is too low, lets take a 4 flips per seconds(user
will be typing faster than 2 keys per second):

# Base
Modeset at 60hz
9 frames to activate PSR2

# With 1 frame to enter deep sleep
36 frames of PSR2 idle
4 frames of sleep
20 frames of deep sleep
+ tranning at every PSR2 exit

# With 15 frames to enter deep sleep
9 frames of PSR2 idle
4 frames of sleep reading memory
47 frames of sleep without read memory
* It would not enter in deep sleep so in the next second it would be
4 frames of sleep reading memory
56 frames of sleep without read memory

And when screen is realy idle like a savings screen it would still go
to deep sleep.

> 
> Why not leave EDP_PSR2_FRAMES_BEFORE_ACTIVATE as it is and reduce
> EDP_PSR2_IDLE_FRAMES_TO_DEEP_SLEEP to the minimum? But then again,
> I'd
> like to see some numbers if it's possible.

Other problem of leaving the number of frames to enter deep sleep to
minumum is that it would almost never do selective update it would be
like a PSR1.


> 
> -DK
> 
> > > 
> > > >  
> > > >  	/* FIXME: selective update is probably totally broken
> > > > because
> > > > it doesn't
> > > >  	 * mesh at all with our frontbuffer tracking. And the
> > > > hw alone
> > > > isn't
> > > > @@ -497,8 +497,6 @@ static void hsw_activate_psr2(struct
> > > > intel_dp
> > > > *intel_dp)
> > > >  	if (INTEL_GEN(dev_priv) >= 10 ||
> > > > IS_GEMINILAKE(dev_priv))
> > > >  		val |= EDP_Y_COORDINATE_ENABLE;
> > > >  
> > > > -	val |= EDP_PSR2_FRAMES_BEFORE_ACTIVATE(psr-
> > > > >sink_sync_latency +
> > > > 1);
> > > > -
> > > >  	if (dev_priv->vbt.psr.tp2_tp3_wakeup_time_us >= 0 &&
> > > >  	    dev_priv->vbt.psr.tp2_tp3_wakeup_time_us <= 50)
> > > >  		val |= EDP_PSR2_TP2_TIME_50us;

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

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

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

  reply	other threads:[~2018-11-30 21:18 UTC|newest]

Thread overview: 40+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-11-27  0:37 [PATCH 1/9] drm/i915: Disable PSR in Apple panels José Roberto de Souza
2018-11-27  0:37 ` [PATCH 2/9] drm/i915/psr: Don't tell sink that main link will be active while is active PSR2 José Roberto de Souza
2018-11-28 19:02   ` Rodrigo Vivi
2018-11-28 20:13     ` Souza, Jose
2018-11-30  1:09       ` Rodrigo Vivi
2018-11-27  0:37 ` [PATCH 3/9] drm/i915/psr: Enable sink to trigger a interruption on PSR2 CRC mismatch José Roberto de Souza
2018-11-29 22:04   ` Rodrigo Vivi
2018-11-29 23:37     ` Dhinakaran Pandiyan
2018-11-27  0:37 ` [PATCH 4/9] drm/i915/icl: Do not change reserved registers related to PSR2 José Roberto de Souza
2018-11-29 22:15   ` Rodrigo Vivi
2018-11-29 23:46     ` Souza, Jose
2018-11-30 21:21       ` Runyan, Arthur J
2018-11-27  0:37 ` [PATCH 5/9] drm: Add offset of PSR2 SU X granularity value José Roberto de Souza
2018-11-29 22:16   ` Rodrigo Vivi
2018-11-27  0:37 ` [PATCH 6/9] drm/i915/psr: Check if source supports sink specific SU granularity José Roberto de Souza
2018-11-29 23:03   ` Rodrigo Vivi
2018-11-30  0:00     ` Souza, Jose
2018-11-27  0:37 ` [PATCH 7/9] drm/i915/psr: Rename PSR2 macros to better match meaning José Roberto de Souza
2018-11-29 23:07   ` Rodrigo Vivi
2018-11-29 23:25     ` Dhinakaran Pandiyan
2018-11-30  0:17       ` Souza, Jose
2018-11-27  0:37 ` [PATCH 8/9] drm/i915/psr: Set the right frames values José Roberto de Souza
2018-11-29 23:10   ` Rodrigo Vivi
2018-11-30  0:48     ` Souza, Jose
2018-11-29 23:33   ` Dhinakaran Pandiyan
2018-11-30  1:00     ` Souza, Jose
2018-11-30 19:35       ` Dhinakaran Pandiyan
2018-11-30 21:18         ` Souza, Jose [this message]
2018-11-30 22:02           ` Dhinakaran Pandiyan
2018-11-27  0:37 ` [PATCH 9/9] drm/i915: Remove old PSR2 FIXME about frontbuffer tracking José Roberto de Souza
2018-11-29 23:11   ` Rodrigo Vivi
2018-11-29 23:26     ` Dhinakaran Pandiyan
2018-11-27  0:53 ` ✗ Fi.CI.CHECKPATCH: warning for series starting with [1/9] drm/i915: Disable PSR in Apple panels Patchwork
2018-11-27  0:57 ` ✗ Fi.CI.SPARSE: " Patchwork
2018-11-27  1:16 ` ✗ Fi.CI.BAT: failure " Patchwork
2018-11-27  7:05   ` Saarinen, Jani
2018-11-27 13:38 ` [PATCH 1/9] " Ville Syrjälä
2018-11-27 21:55   ` Souza, Jose
2018-11-29 23:44     ` Dhinakaran Pandiyan
2018-11-27 14:11 ` kbuild test robot

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=7ebae6906aaf428b21a75005275125ef41be635b.camel@intel.com \
    --to=jose.souza@intel.com \
    --cc=dhinakaran.pandiyan@intel.com \
    --cc=intel-gfx@lists.freedesktop.org \
    --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.