summaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/msm/msm_drv.c
diff options
context:
space:
mode:
authorRob Clark2014-01-11 22:25:08 +0100
committerRob Clark2014-03-31 16:27:46 +0200
commit37d77c3ab589bf8e3160a33b651fe6dd7439ba48 (patch)
tree12410f409382ba0557078e777f600e2377c08053 /drivers/gpu/drm/msm/msm_drv.c
parentdrm/msm: spin helper (diff)
downloadkernel-qcow2-linux-37d77c3ab589bf8e3160a33b651fe6dd7439ba48.tar.gz
kernel-qcow2-linux-37d77c3ab589bf8e3160a33b651fe6dd7439ba48.tar.xz
kernel-qcow2-linux-37d77c3ab589bf8e3160a33b651fe6dd7439ba48.zip
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/msm_drv.c')
-rw-r--r--drivers/gpu/drm/msm/msm_drv.c7
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/msm/msm_drv.c b/drivers/gpu/drm/msm/msm_drv.c
index e6adafc7eff3..e913efa4ea0a 100644
--- a/drivers/gpu/drm/msm/msm_drv.c
+++ b/drivers/gpu/drm/msm/msm_drv.c
@@ -311,7 +311,6 @@ static void load_gpu(struct drm_device *dev)
gpu = NULL;
/* not fatal */
}
- mutex_unlock(&dev->struct_mutex);
if (gpu) {
int ret;
@@ -321,10 +320,16 @@ static void load_gpu(struct drm_device *dev)
dev_err(dev->dev, "gpu hw init failed: %d\n", ret);
gpu->funcs->destroy(gpu);
gpu = NULL;
+ } else {
+ /* give inactive pm a chance to kick in: */
+ msm_gpu_retire(gpu);
}
+
}
priv->gpu = gpu;
+
+ mutex_unlock(&dev->struct_mutex);
}
static int msm_open(struct drm_device *dev, struct drm_file *file)