]> git.ipfire.org Git - thirdparty/kernel/stable.git/commitdiff
drm/msm/a8xx: Fix ubwc config related to swizzling
authorAkhil P Oommen <akhilpo@oss.qualcomm.com>
Thu, 5 Mar 2026 18:21:16 +0000 (23:51 +0530)
committerRob Clark <robin.clark@oss.qualcomm.com>
Thu, 5 Mar 2026 21:49:50 +0000 (13:49 -0800)
To disable l2/l3 swizzling in A8x, set the respective bits in both
GRAS_NC_MODE_CNTL and RB_CCU_NC_MODE_CNTL registers. This is required
for Glymur where it is recommended to keep l2/l3 swizzling disabled.

Fixes: 288a93200892 ("drm/msm/adreno: Introduce A8x GPU Support")
Signed-off-by: Akhil P Oommen <akhilpo@oss.qualcomm.com>
Message-ID: <20260305-a8xx-ubwc-fix-v1-1-d99b6da4c5a9@oss.qualcomm.com>
Reviewed-by: Dmitry Baryshkov <dmitry.baryshkov@oss.qualcomm.com>
Signed-off-by: Rob Clark <robin.clark@oss.qualcomm.com>
drivers/gpu/drm/msm/adreno/a8xx_gpu.c

index 5a320f5bde41a8be195368288a7dbc3608aed43a..b1887e0cf6983e1e142be5e78bd234dd23f570f3 100644 (file)
@@ -310,11 +310,21 @@ static void a8xx_set_ubwc_config(struct msm_gpu *gpu)
        hbb = cfg->highest_bank_bit - 13;
        hbb_hi = hbb >> 2;
        hbb_lo = hbb & 3;
-       a8xx_write_pipe(gpu, PIPE_BV, REG_A8XX_GRAS_NC_MODE_CNTL, hbb << 5);
-       a8xx_write_pipe(gpu, PIPE_BR, REG_A8XX_GRAS_NC_MODE_CNTL, hbb << 5);
+
+       a8xx_write_pipe(gpu, PIPE_BV, REG_A8XX_GRAS_NC_MODE_CNTL,
+                       hbb << 5 |
+                       level3_swizzling_dis << 4 |
+                       level2_swizzling_dis << 3);
+
+       a8xx_write_pipe(gpu, PIPE_BR, REG_A8XX_GRAS_NC_MODE_CNTL,
+                       hbb << 5 |
+                       level3_swizzling_dis << 4 |
+                       level2_swizzling_dis << 3);
 
        a8xx_write_pipe(gpu, PIPE_BR, REG_A8XX_RB_CCU_NC_MODE_CNTL,
                        yuvnotcomptofc << 6 |
+                       level3_swizzling_dis << 5 |
+                       level2_swizzling_dis << 4 |
                        hbb_hi << 3 |
                        hbb_lo << 1);