Skip to content

Commit ce8f138

Browse files
konradybciorobclark
authored andcommitted
drm/msm/a6xx: Move force keepalive vote removal to a6xx_gmu_force_off()
As pointed out by Akhil during the review process of GMU wrapper introduction [1], it makes sense to move this write into the function that's responsible for forcibly shutting the GMU off. It is also very convenient to move this to GMU-specific code, so that it does not have to be guarded by an if-condition to avoid calling it on GMU wrapper targets. Move the write to the aforementioned a6xx_gmu_force_off() to achieve that. No effective functional change. [1] https://lore.kernel.org/linux-arm-msm/20230501194022.GA18382@akhilpo-linux.qualcomm.com/ Reviewed-by: Akhil P Oommen <quic_akhilpo@quicinc.com> Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org> Patchwork: https://patchwork.freedesktop.org/patch/542752/ Signed-off-by: Rob Clark <robdclark@chromium.org>
1 parent bd31afe commit ce8f138

2 files changed

Lines changed: 6 additions & 6 deletions

File tree

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

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -912,6 +912,12 @@ static void a6xx_gmu_force_off(struct a6xx_gmu *gmu)
912912
struct adreno_gpu *adreno_gpu = &a6xx_gpu->base;
913913
struct msm_gpu *gpu = &adreno_gpu->base;
914914

915+
/*
916+
* Turn off keep alive that might have been enabled by the hang
917+
* interrupt
918+
*/
919+
gmu_write(&a6xx_gpu->gmu, REG_A6XX_GMU_GMU_PWR_COL_KEEPALIVE, 0);
920+
915921
/* Flush all the queues */
916922
a6xx_hfi_stop(gmu);
917923

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

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1382,12 +1382,6 @@ static void a6xx_recover(struct msm_gpu *gpu)
13821382
/* Halt SQE first */
13831383
gpu_write(gpu, REG_A6XX_CP_SQE_CNTL, 3);
13841384

1385-
/*
1386-
* Turn off keep alive that might have been enabled by the hang
1387-
* interrupt
1388-
*/
1389-
gmu_write(&a6xx_gpu->gmu, REG_A6XX_GMU_GMU_PWR_COL_KEEPALIVE, 0);
1390-
13911385
pm_runtime_dont_use_autosuspend(&gpu->pdev->dev);
13921386

13931387
/* active_submit won't change until we make a submission */

0 commit comments

Comments
 (0)