> -----Original Message-----
> From: Intel-gfx <[email protected]> On Behalf Of
> Kandpal, Suraj
> Sent: Monday, November 17, 2025 3:16 PM
> To: Manna, Animesh <[email protected]>; intel-
> [email protected]; [email protected]; dri-
> [email protected]
> Cc: Nikula, Jani <[email protected]>; Hogander, Jouni
> <[email protected]>
> Subject: RE: [PATCH v4 06/10] drm/i915/alpm: Half LFPS cycle calculation
> 
> > Subject: [PATCH v4 06/10] drm/i915/alpm: Half LFPS cycle calculation
> >
> > Add support for half LFPS cycle calculation for DP2.1 ALPM as
> > dependent parameters got changed.
> >
> > v1: Initial version.
> > v2: Avoid returning early. [Jani]
> > v3: Use intel_crtc_has_type(). [Suraj]
> >
> > Cc: Jouni Högander <[email protected]>
> > Signed-off-by: Animesh Manna <[email protected]>

Also I did not find a correct place where this comment can be added hence 
commenting it here
I think you have missed LFPS Cycle count calculation and modification to the 
register bits
Have a look at that

Bspec: 71477

Regards,
Suraj Kandpal

> > ---
> >  drivers/gpu/drm/i915/display/intel_alpm.c | 18 +++++++++++++-----
> >  1 file changed, 13 insertions(+), 5 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c
> > b/drivers/gpu/drm/i915/display/intel_alpm.c
> > index 81472254ab73..33620f95ecc5 100644
> > --- a/drivers/gpu/drm/i915/display/intel_alpm.c
> > +++ b/drivers/gpu/drm/i915/display/intel_alpm.c
> > @@ -73,12 +73,20 @@ static int get_silence_period_symbols(const struct
> > intel_crtc_state *crtc_state)  static void
> > get_lfps_cycle_min_max_time(const struct intel_crtc_state *crtc_state,
> >                                     int *min, int *max)
> >  {
> > -   if (crtc_state->port_clock < 540000) {
> > -           *min = 65 * LFPS_CYCLE_COUNT;
> > -           *max = 75 * LFPS_CYCLE_COUNT;
> > +   struct intel_display *display = to_intel_display(crtc_state);
> > +
> > +   if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP)) {
> > +           if (crtc_state->port_clock < 540000) {
> > +                   *min = DISPLAY_VER(display) < 35 ? 65 *
> > LFPS_CYCLE_COUNT : 140;
> > +                   *max = DISPLAY_VER(display) < 35 ? 75 *
> > LFPS_CYCLE_COUNT : 800;
> > +           } else {
> > +                   *min = 140;
> > +                   *max = 800;
> > +           }
> >     } else {
> > -           *min = 140;
> > -           *max = 800;
> > +           *min = 320;
> > +           *max = 1600;
> > +           return;
> >     }
> 
> 
> This can be just
> struct intel_display *display = to_intel_display(crtc_state);
> 
> *min = 140;
> *max= 180;
> if (intel_crtc_has_type(crtc_state, INTEL_OUTPUT_EDP)) {
>       if (crtc_state->port_clock < 540000 && DISPLAY_VER < 540000) {
>               *min = 65 * LFPS_CYCLE_COUNT ;
>               *max = 75 * LFPS_CYCLE_COUNT;
>       } else {
>               *min = 320;
>               *max = 1600;
>               return;
>       }
> 
> Regards,
> Suraj Kandpal
> 
> >
> > --
> > 2.29.0

Reply via email to