]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/msm/dpu: fix writeback programming for YUV cases
authorAbhinav Kumar <quic_abhinavk@quicinc.com>
Tue, 12 Dec 2023 20:52:41 +0000 (12:52 -0800)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Mon, 5 Feb 2024 20:17:00 +0000 (20:17 +0000)
[ Upstream commit 79caf2f2202b9eaad3a5a726e4b33807f67d0f1b ]

For YUV cases, setting the required format bits was missed
out in the register programming. Lets fix it now in preparation
of adding YUV formats support for writeback.

changes in v2:
    - dropped the fixes tag as its not a fix but adding
      new functionality

Signed-off-by: Abhinav Kumar <quic_abhinavk@quicinc.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/571814/
Link: https://lore.kernel.org/r/20231212205254.12422-4-quic_abhinavk@quicinc.com
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@linaro.org>
Signed-off-by: Sasha Levin <sashal@kernel.org>
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_wb.c

index 9668fb97c0478b301d99973303184d1d24766e28..d49b3ef7689eba343545a8a80d9c6f5768b3a9f5 100644 (file)
@@ -87,6 +87,9 @@ static void dpu_hw_wb_setup_format(struct dpu_hw_wb *ctx,
                        dst_format |= BIT(14); /* DST_ALPHA_X */
        }
 
+       if (DPU_FORMAT_IS_YUV(fmt))
+               dst_format |= BIT(15);
+
        pattern = (fmt->element[3] << 24) |
                (fmt->element[2] << 16) |
                (fmt->element[1] << 8)  |