Intel-GFX Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/alpm: Fix swapped wake lines in LOBF late config
@ 2026-08-25  5:52 Animesh Manna
  2026-08-25  7:49 ` ✓ i915.CI.BAT: success for " Patchwork
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Animesh Manna @ 2026-08-25  5:52 UTC (permalink / raw)
  To: intel-gfx, intel-xe
  Cc: jouni.hogander, ankit.k.nautiyal, Animesh Manna, stable

intel_alpm_lobf_compute_config_late() selected the main-link wake time
with the two cases inverted: when aux-less wake was supported it used the
aux-wake io_wake_lines, and otherwise the aux_less_wake_lines. This is the
opposite of the mapping used in intel_psr_compute_config_late() and of the
underlying meaning of the two values.

As a result the LOBF enable decision (scl + guardband > first_sdp_position
+ waketime_in_lines) was computed against the wrong wake time, so LOBF
could be enabled or rejected incorrectly.

Use aux_less_wake_lines when aux-less wake is supported and io_wake_lines
otherwise, matching the PSR path.

Cc: Jouni Högander <jouni.hogander@intel.com>
Cc: Ankit Nautiyal <ankit.k.nautiyal@intel.com
Cc: stable@vger.kernel.org
Fixes: 9090fa44a6d45 ("drm/i915/alpm: Compute LOBF late after guardband is already determined")
Assisted-by: Claude:claude-opus-4-8
Signed-off-by: Animesh Manna <animesh.manna@intel.com>
---
 drivers/gpu/drm/i915/display/intel_alpm.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_alpm.c b/drivers/gpu/drm/i915/display/intel_alpm.c
index f1383764b702..559fe6d14c01 100644
--- a/drivers/gpu/drm/i915/display/intel_alpm.c
+++ b/drivers/gpu/drm/i915/display/intel_alpm.c
@@ -314,9 +314,9 @@ void intel_alpm_lobf_compute_config_late(struct intel_dp *intel_dp,
 	 */
 	first_sdp_position = adjusted_mode->crtc_vtotal - adjusted_mode->crtc_vsync_start;
 	if (intel_alpm_aux_less_wake_supported(intel_dp))
-		waketime_in_lines = crtc_state->alpm_state.io_wake_lines;
-	else
 		waketime_in_lines = crtc_state->alpm_state.aux_less_wake_lines;
+	else
+		waketime_in_lines = crtc_state->alpm_state.io_wake_lines;
 
 	crtc_state->has_lobf = (crtc_state->set_context_latency + crtc_state->vrr.guardband) >
 			       (first_sdp_position + waketime_in_lines);
-- 
2.29.0


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

end of thread, other threads:[~2026-09-03 13:48 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-25  5:52 [PATCH] drm/i915/alpm: Fix swapped wake lines in LOBF late config Animesh Manna
2026-08-25  7:49 ` ✓ i915.CI.BAT: success for " Patchwork
2026-08-25 12:13 ` ✗ i915.CI.Full: failure " Patchwork
2026-09-02  5:19 ` [PATCH] " Hogander, Jouni
2026-09-03 13:48 ` Nautiyal, Ankit K

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