aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
diff options
context:
space:
mode:
authorRob Clark <robdclark@chromium.org>2021-11-24 13:41:35 -0800
committerRob Clark <robdclark@chromium.org>2021-11-29 16:19:58 -0800
commitf4f6dfdec23091ec1d64495e2306ee5bdc855f3a (patch)
treee07a9744a1ae39901ae5853113a62b4ffa851fad /drivers/gpu/drm/msm/adreno/a6xx_gmu.c
parentdrm/msm/gpu: Snapshot GMU debug buffer (diff)
downloadlinux-dev-f4f6dfdec23091ec1d64495e2306ee5bdc855f3a.tar.xz
linux-dev-f4f6dfdec23091ec1d64495e2306ee5bdc855f3a.zip
drm/msm/gpu: Add a comment in a6xx_gmu_init()
If you don't realize is_a650_family() also encompasses a660 family, you'd think that the debug buffer is double allocated. Add a comment to make this more clear. Signed-off-by: Rob Clark <robdclark@chromium.org> Link: https://lore.kernel.org/r/20211124214151.1427022-11-robdclark@gmail.com Signed-off-by: Rob Clark <robdclark@chromium.org>
Diffstat (limited to '')
-rw-r--r--drivers/gpu/drm/msm/adreno/a6xx_gmu.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
index 71e52b2b2025..9a5af36a98da 100644
--- a/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
+++ b/drivers/gpu/drm/msm/adreno/a6xx_gmu.c
@@ -1527,6 +1527,7 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
if (ret)
goto err_memory;
+ /* Note that a650 family also includes a660 family: */
if (adreno_is_a650_family(adreno_gpu)) {
ret = a6xx_gmu_memory_alloc(gmu, &gmu->icache,
SZ_16M - SZ_16K, 0x04000);
@@ -1543,6 +1544,8 @@ int a6xx_gmu_init(struct a6xx_gpu *a6xx_gpu, struct device_node *node)
if (ret)
goto err_memory;
} else {
+ BUG_ON(adreno_is_a660_family(adreno_gpu));
+
/* HFI v1, has sptprac */
gmu->legacy = true;