Skip to content

Commit 5105c80

Browse files
committed
drm/i915/wm: Initialize max_latency variable to appropriate value
Initialize max_latency variable to LNL_PKG_C_LATENCY_MASK which helps to eliminate the else block and make the whole code a lot cleaner. --v2 -Seprate patch to club variables together [Mitul] Signed-off-by: Suraj Kandpal <[email protected]> Reviewed-by: Mitul Golani <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 9bc5e7d commit 5105c80

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

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

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2857,7 +2857,7 @@ 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-
u32 max_latency = 0;
2860+
u32 max_latency = LNL_PKG_C_LATENCY_MASK;
28612861
u32 clear = 0, val = 0;
28622862
u32 added_wake_time = 0;
28632863

@@ -2870,9 +2870,6 @@ skl_program_dpkgc_latency(struct drm_i915_private *i915, bool enable_dpkgc)
28702870
max_latency = LNL_PKG_C_LATENCY_MASK;
28712871
added_wake_time = DSB_EXE_TIME +
28722872
i915->display.sagv.block_time_us;
2873-
} else {
2874-
max_latency = LNL_PKG_C_LATENCY_MASK;
2875-
added_wake_time = 0;
28762873
}
28772874

28782875
clear |= LNL_ADDED_WAKE_TIME_MASK | LNL_PKG_C_LATENCY_MASK;

0 commit comments

Comments
 (0)