All of lore.kernel.org
 help / color / mirror / Atom feed
* [Intel-gfx] [PATCH] drm/i915/display: Fix warnings about PSR lock not held
@ 2022-04-06 21:05 José Roberto de Souza
  2022-04-07  3:04 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
                   ` (8 more replies)
  0 siblings, 9 replies; 12+ messages in thread
From: José Roberto de Souza @ 2022-04-06 21:05 UTC (permalink / raw)
  To: intel-gfx

Commit 3b6f409547fb ("drm/i915/display/psr: Lock and unlock PSR around
pipe updates") did not took into account async flips with PSR1 and
PSR2 HW tracking, causing PSR lock not be held and causing warnings
when intel_psr2_program_trans_man_trk_ctl() is executed.

So here taking the PSR lock before the earlier return in
intel_pipe_update_start/end().

Cc: Jouni Högander <jouni.hogander@intel.com>
Reported-by: Imre Deak <imre.deak@intel.com>
Fixes: 3b6f409547fb ("drm/i915/display/psr: Lock and unlock PSR around pipe updates")
Signed-off-by: José Roberto de Souza <jose.souza@intel.com>
---
 drivers/gpu/drm/i915/display/intel_crtc.c | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/drivers/gpu/drm/i915/display/intel_crtc.c b/drivers/gpu/drm/i915/display/intel_crtc.c
index a5439182d5ae4..4442aa355f868 100644
--- a/drivers/gpu/drm/i915/display/intel_crtc.c
+++ b/drivers/gpu/drm/i915/display/intel_crtc.c
@@ -487,6 +487,8 @@ void intel_pipe_update_start(struct intel_crtc_state *new_crtc_state)
 		intel_crtc_has_type(new_crtc_state, INTEL_OUTPUT_DSI);
 	DEFINE_WAIT(wait);
 
+	intel_psr_lock(new_crtc_state);
+
 	if (new_crtc_state->do_async_flip)
 		return;
 
@@ -507,8 +509,6 @@ void intel_pipe_update_start(struct intel_crtc_state *new_crtc_state)
 						      VBLANK_EVASION_TIME_US);
 	max = vblank_start - 1;
 
-	intel_psr_lock(new_crtc_state);
-
 	if (min <= 0 || max <= 0)
 		goto irq_disable;
 
@@ -634,6 +634,8 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
 	ktime_t end_vbl_time = ktime_get();
 	struct drm_i915_private *dev_priv = to_i915(crtc->base.dev);
 
+	intel_psr_unlock(new_crtc_state);
+
 	if (new_crtc_state->do_async_flip)
 		return;
 
@@ -685,8 +687,6 @@ void intel_pipe_update_end(struct intel_crtc_state *new_crtc_state)
 
 	local_irq_enable();
 
-	intel_psr_unlock(new_crtc_state);
-
 	if (intel_vgpu_active(dev_priv))
 		return;
 
-- 
2.35.1


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

end of thread, other threads:[~2022-04-08 17:13 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-06 21:05 [Intel-gfx] [PATCH] drm/i915/display: Fix warnings about PSR lock not held José Roberto de Souza
2022-04-07  3:04 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for " Patchwork
2022-04-07 13:40 ` [Intel-gfx] [PATCH] " Hogander, Jouni
2022-04-07 16:14 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/display: Fix warnings about PSR lock not held (rev2) Patchwork
2022-04-07 21:01 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/display: Fix warnings about PSR lock not held (rev3) Patchwork
2022-04-07 21:05   ` Souza, Jose
2022-04-08 14:20     ` Vudum, Lakshminarayana
2022-04-08  7:11 ` Patchwork
2022-04-08  7:39 ` Patchwork
2022-04-08 14:37 ` [Intel-gfx] ✗ Fi.CI.BAT: failure for drm/i915/display: Fix warnings about PSR lock not held (rev4) Patchwork
2022-04-08 15:46 ` [Intel-gfx] ✓ Fi.CI.BAT: success " Patchwork
2022-04-08 17:13 ` [Intel-gfx] ✓ Fi.CI.IGT: " Patchwork

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.