Skip to content

Commit 11c7392

Browse files
committed
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 <[email protected]> Reviewed-by: Mitul Golani <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent d4e8379 commit 11c7392

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

drivers/gpu/drm/i915/display/skl_watermark.c

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2857,26 +2857,27 @@ static int skl_wm_add_affected_planes(struct intel_atomic_state *state,
28572857
static void
28582858
skl_program_dpkgc_latency(struct drm_i915_private *i915, bool enable_dpkgc)
28592859
{
2860+
struct intel_display *display = to_intel_display(&i915->drm);
28602861
u32 max_latency = LNL_PKG_C_LATENCY_MASK;
28612862
u32 clear, val;
28622863
u32 added_wake_time = 0;
28632864

2864-
if (DISPLAY_VER(i915) < 20)
2865+
if (DISPLAY_VER(display) < 20)
28652866
return;
28662867

28672868
if (enable_dpkgc) {
28682869
max_latency = skl_watermark_max_latency(i915, 1);
28692870
if (max_latency == 0)
28702871
max_latency = LNL_PKG_C_LATENCY_MASK;
28712872
added_wake_time = DSB_EXE_TIME +
2872-
i915->display.sagv.block_time_us;
2873+
display->sagv.block_time_us;
28732874
}
28742875

28752876
clear = LNL_ADDED_WAKE_TIME_MASK | LNL_PKG_C_LATENCY_MASK;
28762877
val = REG_FIELD_PREP(LNL_PKG_C_LATENCY_MASK, max_latency) |
28772878
REG_FIELD_PREP(LNL_ADDED_WAKE_TIME_MASK, added_wake_time);
28782879

2879-
intel_uncore_rmw(&i915->uncore, LNL_PKG_C_LATENCY, clear, val);
2880+
intel_de_rmw(display, LNL_PKG_C_LATENCY, clear, val);
28802881
}
28812882

28822883
static int

0 commit comments

Comments
 (0)