[PATCH v10 07/10] drm/i915/psr: Wait for idle only after possible send push

Jouni Högander
2026-01-26T08:00:46Z

We are planning to move using trans push mechanism to trigger the Frame
Change event. In that case we can't wait PSR to idle before send push
happens. Due to this move wait for idle to be done after possible send push
is done.

This should be ok for Frame Change event triggered by register write as
well. Wait for idle is needed only for corner case where PSR is
transitioning into DEEP_SLEEP when Frame Change event is triggered. It just
has to be before wait for vblank. Otherwise we may have vblank before PSR
enters DEEP_SLEEP and still using old frame buffers for first frame after
wake up.

v2: some typos fixed

Signed-off-by: Jouni Högander <jouni.hogander@intel.com>
Reviewed-by: Ankit Nautiyal <ankit.k.nautiyal@intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 13 ++++++++++---
1 file changed, 10 insertions(+), 3 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index b47c9d3d0d85..d7267c926c40 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7357,9 +7357,6 @@ static void intel_atomic_dsb_finish(struct intel_atomic_state *state,
intel_psr_trigger_frame_change_event(new_crtc_state->dsb_commit,
state, crtc);

- intel_psr_wait_for_idle_dsb(new_crtc_state->dsb_commit,
- new_crtc_state);
-
if (new_crtc_state->use_dsb)
intel_dsb_vblank_evade(state, new_crtc_state->dsb_commit);

@@ -7399,6 +7396,16 @@ static void intel_atomic_dsb_finish(struct intel_atomic_state *state,

intel_vrr_send_push(new_crtc_state->dsb_commit, new_crtc_state);

+ /*
+ * Wait for idle is needed for corner case where PSR HW
+ * is transitioning into DEEP_SLEEP/SRDENT_OFF when
+ * new Frame Change event comes in. It is ok to do it
+ * here for both Frame Change mechanism (trans push
+ * and register write).
+ */
+ intel_psr_wait_for_idle_dsb(new_crtc_state->dsb_commit,
+ new_crtc_state);
+
/*
* In case PSR uses trans push as a "frame change" event and
* VRR is not in use we need to wait vblank. Othervise we may
--
2.43.0