[PATCH v3 14/27] drm/msm/dpu: use new helper to set ubwc_swizzle

Dmitry Baryshkov
2026-03-12T13:29:56Z

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>
---
drivers/gpu/drm/msm/disp/dpu1/dpu_hw_sspp.c | 7 ++++---
1 file changed, 4 insertions(+), 3 deletions(-)

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) {

--
2.47.3