From: Dmitry Baryshkov Date: Wed, 20 May 2026 14:51:20 +0000 (+0300) Subject: drm/msm/dpu: use new helper to set ubwc_swizzle X-Git-Url: http://git.ipfire.org/gitweb/index.cgi?a=commitdiff_plain;h=d7c0878bbda8f7e0f392ce3e0b7dccf4733b461b;p=thirdparty%2Fkernel%2Flinux.git drm/msm/dpu: use new helper to set ubwc_swizzle Use freshly defined helper instead of using the raw value from the database. Reviewed-by: Konrad Dybcio Signed-off-by: Dmitry Baryshkov Patchwork: https://patchwork.freedesktop.org/patch/726496/ Link: https://lore.kernel.org/r/20260520-ubwc-rework-v5-13-72f2749bc807@oss.qualcomm.com --- diff --git a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c index d3da70009234..6089a58074ac 100644 --- a/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c +++ b/drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c @@ -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) {