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>
This commit is contained in:
@@ -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);
|
||||
|
||||
|
Reference in New Issue
Block a user