]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
drm/msm/dpu: use new helper to set ubwc_swizzle
authorDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Wed, 20 May 2026 14:51:20 +0000 (17:51 +0300)
committerDmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Fri, 22 May 2026 13:43:13 +0000 (16:43 +0300)
Use freshly defined helper instead of using the raw value from the
database.

Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Signed-off-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Patchwork: https://patchwork.freedesktop.org/patch/726496/
Link: https://lore.kernel.org/r/20260520-ubwc-rework-v5-13-72f2749bc807@oss.qualcomm.com
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c

index d3da7000923435abe5fe2f7c046cc0cc153a8da4..6089a58074ac8f1bd1cb939fdb2b8251266929b1 100644 (file)
@@ -318,13 +318,14 @@ void dpu_hw_setup_format_impl(struct dpu_sw_pipe *pipe, const struct msm_format
 
                if (ctx->ubwc->ubwc_enc_version == UBWC_1_0) {
                        fast_clear = fmt->alpha_enable ? BIT(31) : 0;
-                       ctrl_val = fast_clear | (ctx->ubwc->ubwc_swizzle & 0x1) |
+                       ctrl_val = fast_clear |
+                               (qcom_ubwc_swizzle(ctx->ubwc) & UBWC_SWIZZLE_ENABLE_LVL1) |
                                BIT(8) | (hbb << 4);
                } else if (ctx->ubwc->ubwc_enc_version == UBWC_2_0) {
                        fast_clear = fmt->alpha_enable ? BIT(31) : 0;
-                       ctrl_val = fast_clear | ctx->ubwc->ubwc_swizzle | (hbb << 4);
+                       ctrl_val = fast_clear | qcom_ubwc_swizzle(ctx->ubwc) | (hbb << 4);
                } else if (ctx->ubwc->ubwc_enc_version == UBWC_3_0) {
-                       ctrl_val = BIT(30) | (ctx->ubwc->ubwc_swizzle) | (hbb << 4);
+                       ctrl_val = BIT(30) | qcom_ubwc_swizzle(ctx->ubwc) | (hbb << 4);
                } else if (ctx->ubwc->ubwc_enc_version == UBWC_4_0) {
                        ctrl_val = MSM_FORMAT_IS_YUV(fmt) ? 0 : BIT(30);
                } else if (ctx->ubwc->ubwc_enc_version <= UBWC_6_0) {