Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux
1
fork

Configure Feed

Select the types of activity you want to include in your feed.

drm/msm/a6xx: Set GMU CGC properties on a6xx too

This was apparently never done before.. Program the expected values.

This also gets rid of sneakily setting that register through the HWCG
reg list on A690.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Patchwork: https://patchwork.freedesktop.org/patch/611098/
Signed-off-by: Rob Clark <robdclark@chromium.org>

authored by

Konrad Dybcio and committed by
Rob Clark
40c297eb 51682bc4

+17 -10
-1
drivers/gpu/drm/msm/adreno/a6xx_catalog.c
··· 448 448 {REG_A6XX_RBBM_CLOCK_CNTL_GMU_GX, 0x00000222}, 449 449 {REG_A6XX_RBBM_CLOCK_DELAY_GMU_GX, 0x00000111}, 450 450 {REG_A6XX_RBBM_CLOCK_HYST_GMU_GX, 0x00000555}, 451 - {REG_A6XX_GPU_GMU_AO_GMU_CGC_MODE_CNTL, 0x20200}, 452 451 {REG_A6XX_GPU_GMU_AO_GMU_CGC_DELAY_CNTL, 0x10111}, 453 452 {REG_A6XX_GPU_GMU_AO_GMU_CGC_HYST_CNTL, 0x5555}, 454 453 {}
+10 -8
drivers/gpu/drm/msm/adreno/a6xx_gpu.c
··· 402 402 struct a6xx_gmu *gmu = &a6xx_gpu->gmu; 403 403 const struct adreno_reglist *reg; 404 404 unsigned int i; 405 + u32 cgc_delay, cgc_hyst; 405 406 u32 val, clock_cntl_on; 406 407 407 408 if (!(adreno_gpu->info->a6xx->hwcg || adreno_is_a7xx(adreno_gpu))) ··· 417 416 else 418 417 clock_cntl_on = 0x8aa8aa82; 419 418 420 - if (adreno_is_a7xx(adreno_gpu)) { 421 - gmu_write(&a6xx_gpu->gmu, REG_A6XX_GPU_GMU_AO_GMU_CGC_MODE_CNTL, 422 - state ? adreno_gpu->info->a6xx->gmu_cgc_mode : 0); 423 - gmu_write(&a6xx_gpu->gmu, REG_A6XX_GPU_GMU_AO_GMU_CGC_DELAY_CNTL, 424 - state ? 0x10111 : 0); 425 - gmu_write(&a6xx_gpu->gmu, REG_A6XX_GPU_GMU_AO_GMU_CGC_HYST_CNTL, 426 - state ? 0x5555 : 0); 427 - } 419 + cgc_delay = adreno_is_a615_family(adreno_gpu) ? 0x111 : 0x10111; 420 + cgc_hyst = adreno_is_a615_family(adreno_gpu) ? 0x555 : 0x5555; 421 + 422 + gmu_write(&a6xx_gpu->gmu, REG_A6XX_GPU_GMU_AO_GMU_CGC_MODE_CNTL, 423 + state ? adreno_gpu->info->a6xx->gmu_cgc_mode : 0); 424 + gmu_write(&a6xx_gpu->gmu, REG_A6XX_GPU_GMU_AO_GMU_CGC_DELAY_CNTL, 425 + state ? cgc_delay : 0); 426 + gmu_write(&a6xx_gpu->gmu, REG_A6XX_GPU_GMU_AO_GMU_CGC_HYST_CNTL, 427 + state ? cgc_hyst : 0); 428 428 429 429 if (!adreno_gpu->info->a6xx->hwcg) { 430 430 gpu_write(gpu, REG_A7XX_RBBM_CLOCK_CNTL_GLOBAL, 1);
+7 -1
drivers/gpu/drm/msm/adreno/adreno_gpu.h
··· 463 463 return adreno_is_a610(gpu) || adreno_is_a702(gpu); 464 464 } 465 465 466 - /* check for a615, a616, a618, a619 or any a630 derivatives */ 466 + /* TODO: 615/616 */ 467 + static inline int adreno_is_a615_family(const struct adreno_gpu *gpu) 468 + { 469 + return adreno_is_a618(gpu) || 470 + adreno_is_a619(gpu); 471 + } 472 + 467 473 static inline int adreno_is_a630_family(const struct adreno_gpu *gpu) 468 474 { 469 475 if (WARN_ON_ONCE(!gpu->info))