Intel-XE Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH] drm/i915/display: Run the selective fetch update after the crtc checks
@ 2026-11-02  8:07 Mika Kahola
  2026-11-02  8:17 ` ✓ CI.KUnit: success for " Patchwork
                   ` (4 more replies)
  0 siblings, 5 replies; 7+ messages in thread
From: Mika Kahola @ 2026-11-02  8:07 UTC (permalink / raw)
  To: intel-gfx, intel-xe; +Cc: jouni.hogander, Mika Kahola

intel_psr2_sel_fetch_update() computes the selective fetch area of all
the joined pipes from the joiner primary, but still runs from
intel_crtc_atomic_check(). The scaler ids it checks are only assigned
while the owning pipe is being checked, so the primary, checked first,
sees the secondary ids of the previous commit. A plane that starts
being scaled on the secondary then looks unscaled and the full update
fallback is skipped.

Run it in its own loop at the end of intel_atomic_check_crtcs(), once
every crtc has been checked. Nothing consumes the selective fetch
results before the planes are programmed.

Fixes: dd038a8d440a ("drm/i915/psr: Merge the selective fetch area across joined pipes")
Signed-off-by: Mika Kahola <mika.kahola@intel.com>
---
 drivers/gpu/drm/i915/display/intel_display.c | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 5e40487e9ab0..2eafcb1450aa 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -4550,10 +4550,6 @@ static int intel_crtc_atomic_check(struct intel_atomic_state *state,
 
 	}
 
-	ret = intel_psr2_sel_fetch_update(state, crtc);
-	if (ret)
-		return ret;
-
 	return 0;
 }
 
@@ -6096,6 +6092,19 @@ static int intel_atomic_check_crtcs(struct intel_atomic_state *state)
 		}
 	}
 
+	/* Selective fetch needs the scaler state of all the joined pipes. */
+	for_each_new_intel_crtc_in_state(state, crtc, crtc_state) {
+		int ret;
+
+		ret = intel_psr2_sel_fetch_update(state, crtc);
+		if (ret) {
+			drm_dbg_atomic(display->drm,
+				       "[CRTC:%d:%s] selective fetch check failed\n",
+				       crtc->base.base.id, crtc->base.name);
+			return ret;
+		}
+	}
+
 	return 0;
 }
 
-- 
2.43.0


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

end of thread, other threads:[~2026-11-04  8:07 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-11-02  8:07 [PATCH] drm/i915/display: Run the selective fetch update after the crtc checks Mika Kahola
2026-11-02  8:17 ` ✓ CI.KUnit: success for " Patchwork
2026-11-02  8:18 ` [PATCH] " sashiko-bot
2026-11-02  9:09   ` Kahola, Mika
2026-11-02  8:51 ` ✓ Xe.CI.BAT: success for " Patchwork
2026-11-02  9:17 ` ✓ Xe.CI.FULL: " Patchwork
2026-11-04  8:05 ` [PATCH] " Hogander, Jouni

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