* Re: [PATCH] drm/msm/dpu: keep vblank enabled when entering self refresh
[not found] <sashiko-outbox-176261@kernel.org>
@ 2026-10-18 21:56 ` Ramón Jesús Miranda
0 siblings, 0 replies; 2+ messages in thread
From: Ramón Jesús Miranda @ 2026-10-18 21:56 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten
Cc: sashiko-bot, linux-arm-msm, dri-devel, freedreno, linux-kernel
Thanks for the review. Both points look right to me: the self refresh
exit path in dpu_crtc_disable() returns early without
drm_crtc_vblank_off(), and with vblank_disable_immediate the vblank
worker can end up touching DPU interrupt registers after the last
runtime PM reference is gone.
Please consider this patch withdrawn. I will look at keeping the vblank
IRQ path consistent with the self refresh entry/exit (and the runtime PM
reference) and send a v2 if I get it right.
Thanks,
Ramón
^ permalink raw reply [flat|nested] 2+ messages in thread
* [PATCH] drm/msm/dpu: keep vblank enabled when entering self refresh
@ 2026-10-18 15:54 Ramón Jesús Miranda
0 siblings, 0 replies; 2+ messages in thread
From: Ramón Jesús Miranda @ 2026-10-18 15:54 UTC (permalink / raw)
To: Rob Clark, Dmitry Baryshkov, Abhinav Kumar, Jessica Zhang,
Sean Paul, Marijn Suijten, David Airlie, Simona Vetter
Cc: linux-arm-msm, dri-devel, freedreno, linux-kernel
When the CRTC is disabled to enter self refresh, dpu_crtc_disable() only
checks old_crtc_state->self_refresh_active, which covers leaving self
refresh, and calls drm_crtc_vblank_off() otherwise. The atomic helper
then expects vblank to remain enabled for a self refresh "disable" and
warns:
driver disabled vblank in self-refresh
WARNING: drivers/gpu/drm/drm_atomic_helper.c:1296 at
drm_atomic_helper_commit_crtc_disable+0x1c0/0x1f8 [drm_kms_helper]
Skip drm_crtc_vblank_off() when the new state enters self refresh, as
other drivers supporting self refresh do. drm_crtc_vblank_on() in the
enable path is safe either way, it only drops the reference taken by
drm_crtc_vblank_off().
Seen at every boot on a Microsoft Surface Pro 11 (X1E80100, Samsung OLED
eDP panel) with eDP PSR enabled; with this change the warning is gone and
self refresh keeps working.
Assisted-by: Claude:claude-opus-5-5
Signed-off-by: Ramón Jesús Miranda <ramonjesusmiranda@gmail.com>
---
diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_crtc.c
@@ -1212,8 +1212,13 @@
return;
}
- /* Disable/save vblank irq handling */
- drm_crtc_vblank_off(crtc);
+ /*
+ * Disable/save vblank irq handling, unless we are entering self
+ * refresh: the DRM core expects vblank to stay enabled then and
+ * warns ("driver disabled vblank in self-refresh") otherwise.
+ */
+ if (!crtc->state->self_refresh_active)
+ drm_crtc_vblank_off(crtc);
drm_for_each_encoder_mask(encoder, crtc->dev,
old_crtc_state->encoder_mask) {
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2026-10-18 21:56 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
[not found] <sashiko-outbox-176261@kernel.org>
2026-10-18 21:56 ` [PATCH] drm/msm/dpu: keep vblank enabled when entering self refresh Ramón Jesús Miranda
2026-10-18 15:54 Ramón Jesús Miranda
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox
all inboxes | Powered by JetHome®