Skip to content

Commit 51682bc

Browse files
konradybciorobclark
authored andcommitted
drm/msm/a6xx: Use the per-GPU value for gmu_cgc_mode
This register's magic value differs wildly between different GPUs, use the hardcoded data instead of trying to make some logic out of it. Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/611096/ Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent d50a836 commit 51682bc

1 file changed

Lines changed: 2 additions & 4 deletions

File tree

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

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -402,7 +402,7 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state)
402402
struct a6xx_gmu *gmu = &a6xx_gpu->gmu;
403403
const struct adreno_reglist *reg;
404404
unsigned int i;
405-
u32 val, clock_cntl_on, cgc_mode;
405+
u32 val, clock_cntl_on;
406406

407407
if (!(adreno_gpu->info->a6xx->hwcg || adreno_is_a7xx(adreno_gpu)))
408408
return;
@@ -417,10 +417,8 @@ static void a6xx_set_hwcg(struct msm_gpu *gpu, bool state)
417417
clock_cntl_on = 0x8aa8aa82;
418418

419419
if (adreno_is_a7xx(adreno_gpu)) {
420-
cgc_mode = adreno_is_a740_family(adreno_gpu) ? 0x20222 : 0x20000;
421-
422420
gmu_write(&a6xx_gpu->gmu, REG_A6XX_GPU_GMU_AO_GMU_CGC_MODE_CNTL,
423-
state ? cgc_mode : 0);
421+
state ? adreno_gpu->info->a6xx->gmu_cgc_mode : 0);
424422
gmu_write(&a6xx_gpu->gmu, REG_A6XX_GPU_GMU_AO_GMU_CGC_DELAY_CNTL,
425423
state ? 0x10111 : 0);
426424
gmu_write(&a6xx_gpu->gmu, REG_A6XX_GPU_GMU_AO_GMU_CGC_HYST_CNTL,

0 commit comments

Comments
 (0)