Disable pingpong dither in dpu_encoder_helper_phys_cleanup().

This avoids the issue where an encoder unknowingly uses dither after
reserving a pingpong block that was previously bound to an encoder that
had enabled dither.

Reported-by: Dmitry Baryshkov <dmitry.barysh...@linaro.org>
Closes: 
https://lore.kernel.org/all/jr7zbj5w7iq4apg3gofuvcwf4r2swzqjk7sshwcdjll4mn6ctt@l2n3qfpujg3q/
Signed-off-by: Jessica Zhang <quic_jessz...@quicinc.com>
---
This was tested on SC7180 Trogdor by pulling in the concurrent writeback
series [1] and running the IGT kms_writeback@writeback_check_output
subtest.

[1] https://patchwork.freedesktop.org/series/144083/
---
 drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c 
b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
index 5172ab4dea995..48e6e8d74c855 100644
--- a/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
+++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_encoder.c
@@ -2281,6 +2281,9 @@ void dpu_encoder_helper_phys_cleanup(struct 
dpu_encoder_phys *phys_enc)
                }
        }
 
+       if (phys_enc->hw_pp && phys_enc->hw_pp->ops.setup_dither)
+               phys_enc->hw_pp->ops.setup_dither(phys_enc->hw_pp, NULL);
+
        /* reset the merge 3D HW block */
        if (phys_enc->hw_pp && phys_enc->hw_pp->merge_3d) {
                
phys_enc->hw_pp->merge_3d->ops.setup_3d_mode(phys_enc->hw_pp->merge_3d,

---
base-commit: 866e43b945bf98f8e807dfa45eca92f931f3a032
change-id: 20250211-dither-disable-b77b1e31977f

Best regards,
-- 
Jessica Zhang <quic_jessz...@quicinc.com>

Reply via email to