diff options
author | Rob Clark <robdclark@gmail.com> | 2014-01-11 16:25:08 -0500 |
---|---|---|
committer | Rob Clark <robdclark@gmail.com> | 2014-03-31 10:27:46 -0400 |
commit | 37d77c3ab589bf8e3160a33b651fe6dd7439ba48 (patch) | |
tree | 12410f409382ba0557078e777f600e2377c08053 /drivers/gpu/drm/msm/msm_drv.c | |
parent | 0963756fe51313a1e2d76885cd21624d3b2cfbf2 (diff) | |
download | lwn-37d77c3ab589bf8e3160a33b651fe6dd7439ba48.tar.gz lwn-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.c | 7 |
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) |