Skip to content

Commit 6ed9528

Browse files
vldlyrobclark
authored andcommitted
drm/msm/a5xx: Fix missing CP_PROTECT for SMMU on A540
A CP_PROTECT entry for SMMU registers is missing for A540. According to downstream sources its length is same as on A530 - 0x20000 bytes. On all other revisions SMMU region length is 0x10000 bytes. Despite this, we setup region of length 0x20000 on all revisions. This doesn't cause any issues on those GPUs. As for preventing accesses to the region from protected mode it was tested to work the same. This patch drops the "if" condition in setup of CP_PROTECT entry because it already includes all supported revisions except A540. Signed-off-by: Vladimir Lypak <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Rob Clark <[email protected]>
1 parent 6bf7805 commit 6ed9528

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -858,10 +858,8 @@ static int a5xx_hw_init(struct msm_gpu *gpu)
858858
/* UCHE */
859859
gpu_write(gpu, REG_A5XX_CP_PROTECT(16), ADRENO_PROTECT_RW(0xE80, 16));
860860

861-
if (adreno_is_a506(adreno_gou) || adreno_is_a508(adreno_gpu) ||
862-
adreno_is_a509(adreno_gpu) || adreno_is_a510(adreno_gpu) ||
863-
adreno_is_a512(adreno_gpu) || adreno_is_a530(adreno_gpu))
864-
gpu_write(gpu, REG_A5XX_CP_PROTECT(17),
861+
/* SMMU */
862+
gpu_write(gpu, REG_A5XX_CP_PROTECT(17),
865863
ADRENO_PROTECT_RW(0x10000, 0x8000));
866864

867865
gpu_write(gpu, REG_A5XX_RBBM_SECVID_TSB_CNTL, 0);

0 commit comments

Comments
 (0)