diff mbox series

drm/msm/dpu: Disable dither in phys encoder cleanup

Message ID 20250211-dither-disable-v1-1-ac2cb455f6b9@quicinc.com (mailing list archive)
State New, archived
Headers show
Series drm/msm/dpu: Disable dither in phys encoder cleanup | expand

Commit Message

Jessica Zhang Feb. 12, 2025, 3:59 a.m. UTC
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.baryshkov@linaro.org>
Closes: https://lore.kernel.org/all/jr7zbj5w7iq4apg3gofuvcwf4r2swzqjk7sshwcdjll4mn6ctt@l2n3qfpujg3q/
Signed-off-by: Jessica Zhang <quic_jesszhan@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(+)


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

Best regards,

Comments

Dmitry Baryshkov Feb. 12, 2025, 10:58 a.m. UTC | #1
On Tue, Feb 11, 2025 at 07:59:19PM -0800, Jessica Zhang wrote:
> 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.baryshkov@linaro.org>
> Closes: https://lore.kernel.org/all/jr7zbj5w7iq4apg3gofuvcwf4r2swzqjk7sshwcdjll4mn6ctt@l2n3qfpujg3q/
> Signed-off-by: Jessica Zhang <quic_jesszhan@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(+)
> 

Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Abhinav Kumar Feb. 12, 2025, 8:23 p.m. UTC | #2
On 2/11/2025 7:59 PM, Jessica Zhang wrote:
> 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.baryshkov@linaro.org>
> Closes: https://lore.kernel.org/all/jr7zbj5w7iq4apg3gofuvcwf4r2swzqjk7sshwcdjll4mn6ctt@l2n3qfpujg3q/
> Signed-off-by: Jessica Zhang <quic_jesszhan@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(+)
> 

Was an extremely tricky issue to debug.

Glad this one is resolved,

Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Abhinav Kumar Feb. 13, 2025, 1:20 a.m. UTC | #3
On 2/12/2025 12:23 PM, Abhinav Kumar wrote:
> 
> 
> On 2/11/2025 7:59 PM, Jessica Zhang wrote:
>> 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.baryshkov@linaro.org>
>> Closes: https://lore.kernel.org/all/ 
>> jr7zbj5w7iq4apg3gofuvcwf4r2swzqjk7sshwcdjll4mn6ctt@l2n3qfpujg3q/
>> Signed-off-by: Jessica Zhang <quic_jesszhan@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(+)
>>
> 
> Was an extremely tricky issue to debug.
> 
> Glad this one is resolved,
> 
> Reviewed-by: Abhinav Kumar <quic_abhinavk@quicinc.com>

Also going to add,

Fixes: 3c128638a07d ("drm/msm/dpu: add support for dither block in display")
Abhinav Kumar Feb. 17, 2025, 10:35 p.m. UTC | #4
On Tue, 11 Feb 2025 19:59:19 -0800, Jessica Zhang wrote:
> 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.
> 
> 
> [...]

Applied to msm-fixes, thanks!

[1/1] drm/msm/dpu: Disable dither in phys encoder cleanup
      https://gitlab.freedesktop.org/drm/msm/-/commit/f063ac6b55df

Best regards,
diff mbox series

Patch

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,