diff options
author | Jyri Sarha <jsarha@ti.com> | 2016-06-22 16:27:54 +0300 |
---|---|---|
committer | Jyri Sarha <jsarha@ti.com> | 2016-08-08 23:05:17 +0300 |
commit | 47bfd6c01efe639d4c44b1e3fce3816d36b23d46 (patch) | |
tree | 3f87bdef74a8eda986588240da0f4381c0dbe9e0 /drivers/gpu/drm/tilcdc/tilcdc_drv.c | |
parent | 514d1a1f47eb94348b6abf168b913af194cdf1a9 (diff) | |
download | linux-47bfd6c01efe639d4c44b1e3fce3816d36b23d46.tar.bz2 |
drm/tilcdc: Get rid of legacy dpms mechanism
Get rid of legacy dpms mechanism. This simplifies the code quite a
bit. The old start() and stop() functions become tilcdc_crtc_enable()
and *_disable(). The functions are added with all the necessary
mechanisms from the old dpms function and they are used directly as
the crtc helper enable() and disable() callbacks.
Signed-off-by: Jyri Sarha <jsarha@ti.com>
Diffstat (limited to 'drivers/gpu/drm/tilcdc/tilcdc_drv.c')
-rw-r--r-- | drivers/gpu/drm/tilcdc/tilcdc_drv.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/drivers/gpu/drm/tilcdc/tilcdc_drv.c b/drivers/gpu/drm/tilcdc/tilcdc_drv.c index a9624b2e1815..3404d245d28d 100644 --- a/drivers/gpu/drm/tilcdc/tilcdc_drv.c +++ b/drivers/gpu/drm/tilcdc/tilcdc_drv.c @@ -113,12 +113,18 @@ static int tilcdc_commit(struct drm_device *dev, * current layout. */ + /* Keep HW on while we commit the state. */ + pm_runtime_get_sync(dev->dev); + drm_atomic_helper_commit_modeset_disables(dev, state); drm_atomic_helper_commit_planes(dev, state, false); drm_atomic_helper_commit_modeset_enables(dev, state); + /* Now HW should remain on if need becase the crtc is enabled */ + pm_runtime_put_sync(dev->dev); + drm_atomic_helper_wait_for_vblanks(dev, state); drm_atomic_helper_cleanup_planes(dev, state); @@ -183,7 +189,7 @@ static int tilcdc_unload(struct drm_device *dev) { struct tilcdc_drm_private *priv = dev->dev_private; - tilcdc_crtc_dpms(priv->crtc, DRM_MODE_DPMS_OFF); + tilcdc_crtc_disable(priv->crtc); tilcdc_remove_external_encoders(dev); |