Skip to content

Commit 4b95d37

Browse files
fltorobclark
authored andcommitted
drm/msm: fix LLC not being enabled for mmu500 targets
mmu500 targets don't have a "cx_mem" region, set llc_mmio to NULL in that case to avoid the IS_ERR() condition in a6xx_llc_activate(). Fixes: 3d24712 ("drm/msm/a6xx: Add support for using system cache on MMU500 based targets") Signed-off-by: Jonathan Marek <jonathan@marek.ca> Link: https://lore.kernel.org/r/20210424014927.1661-1-jonathan@marek.ca Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent 10f7616 commit 4b95d37

1 file changed

Lines changed: 5 additions & 4 deletions

File tree

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

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1153,10 +1153,6 @@ static void a6xx_llc_slices_init(struct platform_device *pdev,
11531153
{
11541154
struct device_node *phandle;
11551155

1156-
a6xx_gpu->llc_mmio = msm_ioremap(pdev, "cx_mem", "gpu_cx");
1157-
if (IS_ERR(a6xx_gpu->llc_mmio))
1158-
return;
1159-
11601156
/*
11611157
* There is a different programming path for targets with an mmu500
11621158
* attached, so detect if that is the case
@@ -1166,6 +1162,11 @@ static void a6xx_llc_slices_init(struct platform_device *pdev,
11661162
of_device_is_compatible(phandle, "arm,mmu-500"));
11671163
of_node_put(phandle);
11681164

1165+
if (a6xx_gpu->have_mmu500)
1166+
a6xx_gpu->llc_mmio = NULL;
1167+
else
1168+
a6xx_gpu->llc_mmio = msm_ioremap(pdev, "cx_mem", "gpu_cx");
1169+
11691170
a6xx_gpu->llc_slice = llcc_slice_getd(LLCC_GPU);
11701171
a6xx_gpu->htw_llc_slice = llcc_slice_getd(LLCC_GPUHTW);
11711172

0 commit comments

Comments
 (0)