Skip to content

Commit 7e459c4

Browse files
akhilpo-qcomRob Clark
authored andcommitted
drm/msm/a8xx: Fix ubwc config related to swizzling
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: 288a932 ("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>
1 parent e4eb6e4 commit 7e459c4

1 file changed

Lines changed: 12 additions & 2 deletions

File tree

drivers/gpu/drm/msm/adreno/a8xx_gpu.c

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -310,11 +310,21 @@ static void a8xx_set_ubwc_config(struct msm_gpu *gpu)
310310
hbb = cfg->highest_bank_bit - 13;
311311
hbb_hi = hbb >> 2;
312312
hbb_lo = hbb & 3;
313-
a8xx_write_pipe(gpu, PIPE_BV, REG_A8XX_GRAS_NC_MODE_CNTL, hbb << 5);
314-
a8xx_write_pipe(gpu, PIPE_BR, REG_A8XX_GRAS_NC_MODE_CNTL, hbb << 5);
313+
314+
a8xx_write_pipe(gpu, PIPE_BV, REG_A8XX_GRAS_NC_MODE_CNTL,
315+
hbb << 5 |
316+
level3_swizzling_dis << 4 |
317+
level2_swizzling_dis << 3);
318+
319+
a8xx_write_pipe(gpu, PIPE_BR, REG_A8XX_GRAS_NC_MODE_CNTL,
320+
hbb << 5 |
321+
level3_swizzling_dis << 4 |
322+
level2_swizzling_dis << 3);
315323

316324
a8xx_write_pipe(gpu, PIPE_BR, REG_A8XX_RB_CCU_NC_MODE_CNTL,
317325
yuvnotcomptofc << 6 |
326+
level3_swizzling_dis << 5 |
327+
level2_swizzling_dis << 4 |
318328
hbb_hi << 3 |
319329
hbb_lo << 1);
320330

0 commit comments

Comments
 (0)