drm/msm/dpu: don't flush a legacy CTL after its interface has stopped
PATCH 1/1 drm/msm/dpu: don't flush a legacy CTL after its interface has stopped
On DPU < 5.0 the CTL latches a flush at the next vsync of the interface it drives. dpu_encoder_helper_phys_cleanup() runs after the video encoder has switched the timing engine off, and still flushes the mixers it has just reset, so the flush is never taken: the bits stay pending in CTL_FLUSH, where a CTL soft reset doesn't clear them either.
The next display on that CTL then waits for a flush which can't complete. On SDA660, going back to fbcon from a two-mixer mode leaves the LM_1 bit pending, and every following frame of the single-mixer mode times out:
[dpu error]vblank timeout: 80
[dpu error]wait for commit done returned -110
Only trigger the flush from the teardown on DPU >= 5.0. The legacy CTL gets its registers flushed by its next user, as downstream does, which rewrites CTL_TOP without a flush when it stops a CTL.
--- drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-)
drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c +5 -2
@@ -2339,8 +2339,11 @@ void dpu_encoder_helper_phys_cleanup(struct dpu_encoder_phys *phys_enc)if (ctl->ops.reset_intf_cfg) ctl->ops.reset_intf_cfg (ctl, &intf_cfg); - ctl->ops.trigger_flush (ctl); - ctl->ops.trigger_start (ctl); +/* a legacy CTL latches its flush at the vsync of a stopped interface */ +if (phys_enc->dpu_kms->catalog->mdss_ver->core_major_ver >=5 ) { + ctl->ops.trigger_flush (ctl); + ctl->ops.trigger_start (ctl); + } ctl->ops.clear_pending_flush (ctl); }
---
base-commit: 5e4a3f7b262060d70cfdc7889cfe0f4aba9ea3fc
change-id: 20261002-encoder-flush-old-ctl-45d4bbb489d8
Best regards,
Signature · 2 lines
With best wishes Dmitry