Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH 1/6] drm/i915/wm: Initialize max_latency variable to appropriate value
@ 2024-11-15 16:01 Suraj Kandpal
  2024-11-15 16:01 ` [PATCH 2/6] drm/i915/wm: Refactor dpkgc value prepration Suraj Kandpal
                   ` (18 more replies)
  0 siblings, 19 replies; 31+ messages in thread
From: Suraj Kandpal @ 2024-11-15 16:01 UTC (permalink / raw)
  To: intel-xe, intel-gfx; +Cc: vinod.govindapillai, jani.nikula, Suraj Kandpal

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.
While we are at it group the initialized variable together.

Signed-off-by: Suraj Kandpal <suraj.kandpal@intel.com>
---
 drivers/gpu/drm/i915/display/skl_watermark.c | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/skl_watermark.c b/drivers/gpu/drm/i915/display/skl_watermark.c
index 1a4c1fa24820..a49e8915346e 100644
--- a/drivers/gpu/drm/i915/display/skl_watermark.c
+++ b/drivers/gpu/drm/i915/display/skl_watermark.c
@@ -2857,9 +2857,8 @@ 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, added_wake_time = 0;
 	u32 clear = 0, val = 0;
-	u32 added_wake_time = 0;
 
 	if (DISPLAY_VER(i915) < 20)
 		return;
@@ -2870,9 +2869,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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread
* [PATCH 1/6] drm/i915/wm: Initialize max_latency variable to appropriate value
@ 2024-12-03  8:47 Suraj Kandpal
  2024-12-05  1:35 ` Golani, Mitulkumar Ajitkumar
  0 siblings, 1 reply; 31+ messages in thread
From: Suraj Kandpal @ 2024-12-03  8:47 UTC (permalink / raw)
  To: intel-xe, intel-gfx; +Cc: mitulkumar.ajitkumar.golani, Suraj Kandpal

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>
---
 drivers/gpu/drm/i915/display/skl_watermark.c | 5 +----
 1 file changed, 1 insertion(+), 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;
-- 
2.34.1


^ permalink raw reply related	[flat|nested] 31+ messages in thread

end of thread, other threads:[~2024-12-05  1:36 UTC | newest]

Thread overview: 31+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-11-15 16:01 [PATCH 1/6] drm/i915/wm: Initialize max_latency variable to appropriate value Suraj Kandpal
2024-11-15 16:01 ` [PATCH 2/6] drm/i915/wm: Refactor dpkgc value prepration Suraj Kandpal
2024-11-15 16:01 ` [PATCH 3/6] drm/i915/wm: Rename enable_dpkgc variable Suraj Kandpal
2024-12-02  9:34   ` Golani, Mitulkumar Ajitkumar
2024-12-02  9:40     ` Kandpal, Suraj
2024-12-02  9:59     ` Kandpal, Suraj
2024-11-15 16:01 ` [PATCH 4/6] drm/i915/wm: Use intel_display structure in DPKGC code Suraj Kandpal
2024-12-02  9:38   ` Golani, Mitulkumar Ajitkumar
2024-12-02  9:50     ` Kandpal, Suraj
2024-11-15 16:01 ` [PATCH 5/6] drm/i915/display: Refactor DPKGC code to call it from atomic_commit_tail Suraj Kandpal
2024-12-02 12:38   ` Golani, Mitulkumar Ajitkumar
2024-11-15 16:01 ` [PATCH 6/6] drm/i915/wm: Modify latency programmed into PKG_C_LATENCY Suraj Kandpal
2024-12-03  8:04   ` Golani, Mitulkumar Ajitkumar
2024-12-03  8:38     ` Kandpal, Suraj
2024-11-15 16:07 ` ✓ CI.Patch_applied: success for series starting with [1/6] drm/i915/wm: Initialize max_latency variable to appropriate value Patchwork
2024-11-15 16:07 ` ✓ CI.checkpatch: " Patchwork
2024-11-15 16:09 ` ✓ CI.KUnit: " Patchwork
2024-11-15 16:18 ` ✗ CI.Build: failure " Patchwork
2024-11-18  4:00 ` ✓ CI.Patch_applied: success for series starting with [1/6] drm/i915/wm: Initialize max_latency variable to appropriate value (rev2) Patchwork
2024-11-18  4:00 ` ✓ CI.checkpatch: " Patchwork
2024-11-18  4:02 ` ✓ CI.KUnit: " Patchwork
2024-11-18  4:27 ` ✓ CI.Build: " Patchwork
2024-11-18  4:27 ` ✗ CI.Hooks: failure " Patchwork
2024-11-18  4:29 ` ✗ CI.checksparse: warning " Patchwork
2024-11-18  4:48 ` ✓ CI.BAT: success " Patchwork
2024-11-18  5:52 ` ✗ CI.FULL: failure " Patchwork
2024-12-02  9:15 ` [PATCH 1/6] drm/i915/wm: Initialize max_latency variable to appropriate value Golani, Mitulkumar Ajitkumar
2024-12-02  9:17   ` Kandpal, Suraj
2024-12-02  9:42 ` Jani Nikula
  -- strict thread matches above, loose matches on Subject: below --
2024-12-03  8:47 Suraj Kandpal
2024-12-05  1:35 ` Golani, Mitulkumar Ajitkumar

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox