diff options
author | Jordan Crouse <jcrouse@codeaurora.org> | 2017-07-27 10:42:32 -0600 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2017-08-01 19:10:53 -0400 |
commit | a23cb3b52fec73b22671bac65356d8c55bf37706 (patch) | |
tree | 5d02abbeb0ecf62523197f4f33dbd26da944c9c1 /drivers/gpu/drm/msm/adreno | |
parent | 6e749e5971fc7c7a33d7a673fbe4944604b397cf (diff) | |
download | op-kernel-dev-a23cb3b52fec73b22671bac65356d8c55bf37706.zip op-kernel-dev-a23cb3b52fec73b22671bac65356d8c55bf37706.tar.gz |
drm/msm: Turn off hardware clock gating before reading A5XX registers
On A5XX GPU hardware clock gating needs to be turned off before
reading certain GPU registers via AHB. Turn off HWCG before calling
adreno_show() to safely dump all the registers without a system hang.
Signed-off-by: Jordan Crouse <jcrouse@codeaurora.org>
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/adreno')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/a5xx_gpu.c | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c index c1f8c20..33763b0 100644 --- a/drivers/gpu/drm/msm/adreno/a5xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a5xx_gpu.c @@ -995,7 +995,14 @@ static void a5xx_show(struct msm_gpu *gpu, struct seq_file *m) { seq_printf(m, "status: %08x\n", gpu_read(gpu, REG_A5XX_RBBM_STATUS)); + + /* + * Temporarily disable hardware clock gating before going into + * adreno_show to avoid issues while reading the registers + */ + a5xx_set_hwcg(gpu, false); adreno_show(gpu, m); + a5xx_set_hwcg(gpu, true); } #endif |