diff options
author | Rob Clark <robdclark@gmail.com> | 2014-01-12 01:25:08 +0400 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2014-03-31 18:27:46 +0400 |
commit | 37d77c3ab589bf8e3160a33b651fe6dd7439ba48 (patch) | |
tree | 12410f409382ba0557078e777f600e2377c08053 /drivers/gpu/drm/msm/adreno/a3xx_gpu.c | |
parent | 0963756fe51313a1e2d76885cd21624d3b2cfbf2 (diff) | |
download | linux-37d77c3ab589bf8e3160a33b651fe6dd7439ba48.tar.xz |
drm/msm: crank down gpu when inactive
Shut down the clks when the gpu has nothing to do. A short inactivity
timer is used to provide a low pass filter for power transitions.
Signed-off-by: Rob Clark <robdclark@gmail.com>
Diffstat (limited to 'drivers/gpu/drm/msm/adreno/a3xx_gpu.c')
-rw-r--r-- | drivers/gpu/drm/msm/adreno/a3xx_gpu.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c index 59ed7620fc1a..e6cb2bc40ebe 100644 --- a/drivers/gpu/drm/msm/adreno/a3xx_gpu.c +++ b/drivers/gpu/drm/msm/adreno/a3xx_gpu.c @@ -395,9 +395,15 @@ static const unsigned int a3xx_registers[] = { #ifdef CONFIG_DEBUG_FS static void a3xx_show(struct msm_gpu *gpu, struct seq_file *m) { + struct drm_device *dev = gpu->dev; int i; adreno_show(gpu, m); + + mutex_lock(&dev->struct_mutex); + + gpu->funcs->pm_resume(gpu); + seq_printf(m, "status: %08x\n", gpu_read(gpu, REG_A3XX_RBBM_STATUS)); @@ -413,6 +419,10 @@ static void a3xx_show(struct msm_gpu *gpu, struct seq_file *m) seq_printf(m, "IO:R %08x %08x\n", addr<<2, val); } } + + gpu->funcs->pm_suspend(gpu); + + mutex_unlock(&dev->struct_mutex); } #endif |