aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorSuraj Kandpal <suraj.kandpal@intel.com>2024-12-03 14:17:01 +0530
committerSuraj Kandpal <suraj.kandpal@intel.com>2024-12-05 09:04:28 +0530
commit5105c803295e4c2004aad518713208fae42bfc33 (patch)
tree0ec8d63ca5ac0c7ea47919b2f510c1223f183edd
parentdrm/i915: Fix memory leak by correcting cache object name in error handler (diff)
downloadwireguard-linux-5105c803295e4c2004aad518713208fae42bfc33.tar.xz
wireguard-linux-5105c803295e4c2004aad518713208fae42bfc33.zip
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 <suraj.kandpal@intel.com> Reviewed-by: Mitul Golani <mitulkumar.ajitkumar.golani@intel.com> Link: https://patchwork.freedesktop.org/patch/msgid/20241203084706.2126189-1-suraj.kandpal@intel.com
-rw-r--r--drivers/gpu/drm/i915/display/skl_watermark.c5
1 files changed, 1 insertions, 4 deletions
diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index 1a4c1fa24820..c40e0173a5bd 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -2857,7 +2857,7 @@ static int skl_wm_add_affected_planes(struct intel_atomic_state *state,
static void
skl_program_dpkgc_latency(struct drm_i915_private *i915, bool enable_dpkgc)
{
- u32 max_latency = 0;
+ u32 max_latency = LNL_PKG_C_LATENCY_MASK;
u32 clear = 0, val = 0;
u32 added_wake_time = 0;
@@ -2870,9 +2870,6 @@ skl_program_dpkgc_latency(struct drm_i915_private *i915, bool enable_dpkgc)
max_latency = LNL_PKG_C_LATENCY_MASK;
added_wake_time = DSB_EXE_TIME +
i915->display.sagv.block_time_us;
- } else {
- max_latency = LNL_PKG_C_LATENCY_MASK;
- added_wake_time = 0;
}
clear |= LNL_ADDED_WAKE_TIME_MASK | LNL_PKG_C_LATENCY_MASK;