[PATCH 2/3] drm/i915/psr: Changes for PSR2_MAN_TRK_CTL handling when DSB is in use
Jouni Högander
jouni.hogander at intel.com
Fri Nov 22 11:42:18 UTC 2024
Do needed changes to handle PSR2_MAN_TRK_CTL correctly when DSB is in use:
1. Write PSR2_MAN_TRK_CTL in commit_pipe_pre_planes only when not using
DSB.
2. Add PSR2_MAN_TRK_CTL writing into DSB commit in
intel_atomic_dsb_finish.
3. Take PSR lock when DSB is committed and free it when DSB is considered
being completed.
Taking PSR lock over DSB commit is needed because PSR2_MAN_TRK_CTL is
written also by legacy cursor updates and also on frontbuffer rendering.
Signed-off-by: Jouni Högander <jouni.hogander at intel.com>
---
drivers/gpu/drm/i915/display/intel_display.c | 6 +++++-
1 file changed, 5 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/i915/display/intel_display.c b/drivers/gpu/drm/i915/display/intel_display.c
index 9db255bb1230..eadab039b081 100644
--- a/drivers/gpu/drm/i915/display/intel_display.c
+++ b/drivers/gpu/drm/i915/display/intel_display.c
@@ -7110,7 +7110,8 @@ static void commit_pipe_pre_planes(struct intel_atomic_state *state,
intel_pipe_fastset(old_crtc_state, new_crtc_state);
}
- intel_psr2_program_trans_man_trk_ctl(new_crtc_state);
+ if (!new_crtc_state->use_dsb)
+ intel_psr2_program_trans_man_trk_ctl(new_crtc_state);
intel_atomic_update_watermarks(state, crtc);
}
@@ -7220,6 +7221,7 @@ static void intel_update_crtc(struct intel_atomic_state *state,
if (new_crtc_state->use_dsb) {
intel_crtc_prepare_vblank_event(new_crtc_state, &crtc->dsb_event);
+ intel_psr_lock(new_crtc_state);
intel_dsb_commit(new_crtc_state->dsb_commit, false);
} else {
/* Perform vblank evasion around commit operation */
@@ -7699,6 +7701,7 @@ static void intel_atomic_dsb_finish(struct intel_atomic_state *state,
new_crtc_state);
bdw_set_pipe_misc(new_crtc_state->dsb_commit,
new_crtc_state);
+ intel_psr2_program_trans_man_trk_ctl(new_crtc_state);
intel_crtc_planes_update_arm(new_crtc_state->dsb_commit,
state, crtc);
@@ -7852,6 +7855,7 @@ static void intel_atomic_commit_tail(struct intel_atomic_state *state)
intel_crtc_disable_flip_done(state, crtc);
intel_atomic_dsb_wait_commit(new_crtc_state);
+ intel_psr_unlock(new_crtc_state);
}
/*
--
2.34.1
More information about the Intel-gfx-trybot
mailing list