diff mbox series

[v6,14/26] dmr/i915/psr: Wake time is aux less wake time for Panel Replay

Message ID 20240605102553.187309-15-jouni.hogander@intel.com (mailing list archive)
State New, archived
Headers show
Series Panel Replay eDP support | expand

Commit Message

Hogander, Jouni June 5, 2024, 10:25 a.m. UTC
When checking vblank length used wake time is aux less wake time for eDP
Panel Replay (vblank length is not checked for DP2.0 Panel Replay).

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
---
 drivers/gpu/drm/i915/display/intel_psr.c | 8 ++++++--
 1 file changed, 6 insertions(+), 2 deletions(-)

Comments

Animesh Manna June 6, 2024, 1:26 p.m. UTC | #1
> -----Original Message-----
> From: Hogander, Jouni <jouni.hogander@intel.com>
> Sent: Wednesday, June 5, 2024 3:56 PM
> To: intel-gfx@lists.freedesktop.org
> Cc: Manna, Animesh <animesh.manna@intel.com>; Kahola, Mika
> <mika.kahola@intel.com>; Hogander, Jouni <jouni.hogander@intel.com>
> Subject: [PATCH v6 14/26] dmr/i915/psr: Wake time is aux less wake time for
> Panel Replay
> 
> When checking vblank length used wake time is aux less wake time for eDP
> Panel Replay (vblank length is not checked for DP2.0 Panel Replay).
> 
> Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> ---
>  drivers/gpu/drm/i915/display/intel_psr.c | 8 ++++++--
>  1 file changed, 6 insertions(+), 2 deletions(-)
> 
> diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> b/drivers/gpu/drm/i915/display/intel_psr.c
> index c9fcb25184ee..ccb7c022e364 100644
> --- a/drivers/gpu/drm/i915/display/intel_psr.c
> +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> @@ -1251,8 +1251,12 @@ static bool vblank_length_valid(struct intel_dp
> *intel_dp,
>  		crtc_state->hw.adjusted_mode.crtc_vblank_start;
>  	int wake_lines;
> 
> -	wake_lines = DISPLAY_VER(i915) < 20 ?
> psr2_block_count_lines(intel_dp) :
> -		intel_dp->alpm_parameters.io_wake_lines;
> +	if (crtc_state->has_panel_replay)
> +		wake_lines = intel_dp-
> >alpm_parameters.aux_less_wake_lines;

Existing code can take care for EDP panel replay as EDP panel replay is supported from LNL onwards.
Not sure why this change is needed.

Regards,
Animesh
  
> +	else
> +		wake_lines = DISPLAY_VER(i915) < 20 ?
> +			psr2_block_count_lines(intel_dp) :
> +			intel_dp->alpm_parameters.io_wake_lines;
> 
>  	if (crtc_state->req_psr2_sdp_prior_scanline)
>  		vblank -= 1;
> --
> 2.34.1
Hogander, Jouni June 6, 2024, 3:47 p.m. UTC | #2
On Thu, 2024-06-06 at 13:26 +0000, Manna, Animesh wrote:
> 
> 
> > -----Original Message-----
> > From: Hogander, Jouni <jouni.hogander@intel.com>
> > Sent: Wednesday, June 5, 2024 3:56 PM
> > To: intel-gfx@lists.freedesktop.org
> > Cc: Manna, Animesh <animesh.manna@intel.com>; Kahola, Mika
> > <mika.kahola@intel.com>; Hogander, Jouni <jouni.hogander@intel.com>
> > Subject: [PATCH v6 14/26] dmr/i915/psr: Wake time is aux less wake
> > time for
> > Panel Replay
> > 
> > When checking vblank length used wake time is aux less wake time
> > for eDP
> > Panel Replay (vblank length is not checked for DP2.0 Panel Replay).
> > 
> > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > ---
> >  drivers/gpu/drm/i915/display/intel_psr.c | 8 ++++++--
> >  1 file changed, 6 insertions(+), 2 deletions(-)
> > 
> > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > b/drivers/gpu/drm/i915/display/intel_psr.c
> > index c9fcb25184ee..ccb7c022e364 100644
> > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > @@ -1251,8 +1251,12 @@ static bool vblank_length_valid(struct
> > intel_dp
> > *intel_dp,
> >                 crtc_state->hw.adjusted_mode.crtc_vblank_start;
> >         int wake_lines;
> > 
> > -       wake_lines = DISPLAY_VER(i915) < 20 ?
> > psr2_block_count_lines(intel_dp) :
> > -               intel_dp->alpm_parameters.io_wake_lines;
> > +       if (crtc_state->has_panel_replay)
> > +               wake_lines = intel_dp-
> > > alpm_parameters.aux_less_wake_lines;
> 
> Existing code can take care for EDP panel replay as EDP panel replay
> is supported from LNL onwards.
> Not sure why this change is needed.

Panel Replay eDP --> aux less wake lines is used for the check

LunarLake PSR2 --> io wake lines is used for the check

Prior LunarLake PSR2 --> psr2_block_count_lines is used for the check

Existing code is taking care of last two cases. Change is taking care
of the first one.

BR,

Jouni Högander

> 
> Regards,
> Animesh
>   
> > +       else
> > +               wake_lines = DISPLAY_VER(i915) < 20 ?
> > +                       psr2_block_count_lines(intel_dp) :
> > +                       intel_dp->alpm_parameters.io_wake_lines;
> > 
> >         if (crtc_state->req_psr2_sdp_prior_scanline)
> >                 vblank -= 1;
> > --
> > 2.34.1
>
Animesh Manna June 7, 2024, 11:14 a.m. UTC | #3
> -----Original Message-----
> From: Hogander, Jouni <jouni.hogander@intel.com>
> Sent: Thursday, June 6, 2024 9:18 PM
> To: Manna, Animesh <animesh.manna@intel.com>; intel-
> gfx@lists.freedesktop.org
> Cc: Kahola, Mika <mika.kahola@intel.com>
> Subject: Re: [PATCH v6 14/26] dmr/i915/psr: Wake time is aux less wake time
> for Panel Replay
> 
> On Thu, 2024-06-06 at 13:26 +0000, Manna, Animesh wrote:
> >
> >
> > > -----Original Message-----
> > > From: Hogander, Jouni <jouni.hogander@intel.com>
> > > Sent: Wednesday, June 5, 2024 3:56 PM
> > > To: intel-gfx@lists.freedesktop.org
> > > Cc: Manna, Animesh <animesh.manna@intel.com>; Kahola, Mika
> > > <mika.kahola@intel.com>; Hogander, Jouni <jouni.hogander@intel.com>
> > > Subject: [PATCH v6 14/26] dmr/i915/psr: Wake time is aux less wake
> > > time for Panel Replay
> > >
> > > When checking vblank length used wake time is aux less wake time for
> > > eDP Panel Replay (vblank length is not checked for DP2.0 Panel
> > > Replay).
> > >
> > > Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
> > > ---
> > >  drivers/gpu/drm/i915/display/intel_psr.c | 8 ++++++--
> > >  1 file changed, 6 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/drivers/gpu/drm/i915/display/intel_psr.c
> > > b/drivers/gpu/drm/i915/display/intel_psr.c
> > > index c9fcb25184ee..ccb7c022e364 100644
> > > --- a/drivers/gpu/drm/i915/display/intel_psr.c
> > > +++ b/drivers/gpu/drm/i915/display/intel_psr.c
> > > @@ -1251,8 +1251,12 @@ static bool vblank_length_valid(struct
> > > intel_dp *intel_dp,
> > >                 crtc_state->hw.adjusted_mode.crtc_vblank_start;
> > >         int wake_lines;
> > >
> > > -       wake_lines = DISPLAY_VER(i915) < 20 ?
> > > psr2_block_count_lines(intel_dp) :
> > > -               intel_dp->alpm_parameters.io_wake_lines;
> > > +       if (crtc_state->has_panel_replay)
> > > +               wake_lines = intel_dp-
> > > > alpm_parameters.aux_less_wake_lines;
> >
> > Existing code can take care for EDP panel replay as EDP panel replay
> > is supported from LNL onwards.
> > Not sure why this change is needed.
> 
> Panel Replay eDP --> aux less wake lines is used for the check
> 
> LunarLake PSR2 --> io wake lines is used for the check
> 
> Prior LunarLake PSR2 --> psr2_block_count_lines is used for the check
> 
> Existing code is taking care of last two cases. Change is taking care of the first
> one.

Got it, thanks for clarifying.

Reviewed-by: Animesh Manna <animesh.manna@intel.com>

> 
> BR,
> 
> Jouni Högander
> 
> >
> > Regards,
> > Animesh
> >
> > > +       else
> > > +               wake_lines = DISPLAY_VER(i915) < 20 ?
> > > +                       psr2_block_count_lines(intel_dp) :
> > > +                       intel_dp->alpm_parameters.io_wake_lines;
> > >
> > >         if (crtc_state->req_psr2_sdp_prior_scanline)
> > >                 vblank -= 1;
> > > --
> > > 2.34.1
> >
diff mbox series

Patch

diff --git a/drivers/gpu/drm/i915/display/intel_psr.c b/drivers/gpu/drm/i915/display/intel_psr.c
index c9fcb25184ee..ccb7c022e364 100644
--- a/drivers/gpu/drm/i915/display/intel_psr.c
+++ b/drivers/gpu/drm/i915/display/intel_psr.c
@@ -1251,8 +1251,12 @@  static bool vblank_length_valid(struct intel_dp *intel_dp,
 		crtc_state->hw.adjusted_mode.crtc_vblank_start;
 	int wake_lines;
 
-	wake_lines = DISPLAY_VER(i915) < 20 ? psr2_block_count_lines(intel_dp) :
-		intel_dp->alpm_parameters.io_wake_lines;
+	if (crtc_state->has_panel_replay)
+		wake_lines = intel_dp->alpm_parameters.aux_less_wake_lines;
+	else
+		wake_lines = DISPLAY_VER(i915) < 20 ?
+			psr2_block_count_lines(intel_dp) :
+			intel_dp->alpm_parameters.io_wake_lines;
 
 	if (crtc_state->req_psr2_sdp_prior_scanline)
 		vblank -= 1;