[PATCH 4/6] drm/i915/wm: Use intel_display structure in DPKGC code
Kandpal, Suraj
suraj.kandpal at intel.com
Mon Dec 2 09:50:45 UTC 2024
> -----Original Message-----
> From: Golani, Mitulkumar Ajitkumar
> <mitulkumar.ajitkumar.golani at intel.com>
> Sent: Monday, December 2, 2024 3:08 PM
> To: Kandpal, Suraj <suraj.kandpal at intel.com>; intel-xe at lists.freedesktop.org;
> intel-gfx at lists.freedesktop.org
> Cc: Govindapillai, Vinod <vinod.govindapillai at intel.com>; Nikula, Jani
> <jani.nikula at intel.com>
> Subject: RE: [PATCH 4/6] drm/i915/wm: Use intel_display structure in DPKGC
> code
>
>
>
> > -----Original Message-----
> > From: Intel-gfx <intel-gfx-bounces at lists.freedesktop.org> On Behalf Of
> > Suraj Kandpal
> > Sent: 15 November 2024 21:31
> > To: intel-xe at lists.freedesktop.org; intel-gfx at lists.freedesktop.org
> > Cc: Govindapillai, Vinod <vinod.govindapillai at intel.com>; Nikula, Jani
> > <jani.nikula at intel.com>; Kandpal, Suraj <suraj.kandpal at intel.com>
> > Subject: [PATCH 4/6] drm/i915/wm: Use intel_display structure in DPKGC
> > code
> >
> > Use intel_display for DPKGC code wherever we can. While we are at it
> > also use intel_de_rmw instead of intel_uncore_rmw as we really don't
> > need the internal uncore_rmw_function.
> >
> > Signed-off-by: Suraj Kandpal <suraj.kandpal at intel.com>
> > ---
> > drivers/gpu/drm/i915/display/skl_watermark.c | 7 ++++---
> > 1 file changed, 4 insertions(+), 3 deletions(-)
> >
> > diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c
> > b/drivers/gpu/drm/i915/display/skl_watermark.c
> > index 9ce3b5580df4..2deb964daed3 100644
> > --- a/drivers/gpu/drm/i915/display/skl_watermark.c
> > +++ b/drivers/gpu/drm/i915/display/skl_watermark.c
> > @@ -2858,10 +2858,11 @@ static void
> > skl_program_dpkgc_latency(struct drm_i915_private *i915,
> > bool fixed_refresh_rate)
> > {
> > + struct intel_display *display = to_intel_display(&i915->drm);
> > u32 max_latency = LNL_PKG_C_LATENCY_MASK, added_wake_time =
> 0;
> > u32 clear, val;
> >
> > - if (DISPLAY_VER(i915) < 20)
> > + if (DISPLAY_VER(display) < 20)
> > return;
> >
> > if (fixed_refresh_rate) {
> > @@ -2869,14 +2870,14 @@ skl_program_dpkgc_latency(struct
> > drm_i915_private *i915,
> > if (max_latency == 0)
> > max_latency = LNL_PKG_C_LATENCY_MASK;
> > added_wake_time = DSB_EXE_TIME +
> > - i915->display.sagv.block_time_us;
> > + display->sagv.block_time_us;
> > }
> >
> > clear = LNL_ADDED_WAKE_TIME_MASK |
> > LNL_PKG_C_LATENCY_MASK;
> > val = REG_FIELD_PREP(LNL_PKG_C_LATENCY_MASK, max_latency) |
> > REG_FIELD_PREP(LNL_ADDED_WAKE_TIME_MASK,
> > added_wake_time);
> >
> > - intel_uncore_rmw(&i915->uncore, LNL_PKG_C_LATENCY, clear, val);
> > + intel_de_rmw(display, LNL_PKG_C_LATENCY, clear, val);
>
> I would always suggest to keep 1 change at a time, rest other things looks
> good, but still my suggestion is to separate it before you merge.
>
The change here had to be clubbed together since intel_uncore_rmw does not accept intel_display variable
Regards,
Suraj Kandpal
> Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani at intel.com>
>
> > }
> >
> > static int
> > --
> > 2.34.1
More information about the Intel-gfx
mailing list