diff options
author | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-03-06 19:18:56 +0200 |
---|---|---|
committer | Laurent Pinchart <laurent.pinchart@ideasonboard.com> | 2015-06-12 22:52:49 +0300 |
commit | edc725577c52d4abe1dac54ccca1b7bc08672f13 (patch) | |
tree | a1184a056748173f90c0e0e61c40954f57b8bdf2 /drivers/gpu/drm/omapdrm/omap_crtc.c | |
parent | 6cca481c0556d197f8aa287aec784b20f515fd12 (diff) | |
download | linux-edc725577c52d4abe1dac54ccca1b7bc08672f13.tar.bz2 |
drm: omapdrm: Remove omap_plane enabled field
The field tracks the plane state to avoid double-enable or -disable.
This isn't required anymore, as
- the DRM atomic core guarantees that the plane atomic_update and
atomic_disable functions will never be called on an enabled/disabled
plane
- the CRTC enable/disable operations that enable/disable the plane are
already guarded against double enable/disable
We can thus remove the enabled field completely. The
omap_plane_set_enable() function then becomes a wrapper around
omap_plane_setup() which can be called directly.
Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_crtc.c')
-rw-r--r-- | drivers/gpu/drm/omapdrm/omap_crtc.c | 11 |
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c index e93ed34dea33..82d03ed92576 100644 --- a/drivers/gpu/drm/omapdrm/omap_crtc.c +++ b/drivers/gpu/drm/omapdrm/omap_crtc.c @@ -452,19 +452,21 @@ static void omap_crtc_enable(struct drm_crtc *crtc) DBG("%s", omap_crtc->name); + dispc_runtime_get(); + /* Enable all planes associated with the CRTC. */ for (i = 0; i < priv->num_planes; i++) { struct drm_plane *plane = priv->planes[i]; if (plane->crtc == crtc) - WARN_ON(omap_plane_set_enable(plane, true)); + WARN_ON(omap_plane_setup(plane)); } omap_crtc_encoder_setup(crtc, true); omap_crtc_flush(crtc); - dispc_runtime_get(); drm_crtc_vblank_on(crtc); + dispc_runtime_put(); } @@ -479,18 +481,19 @@ static void omap_crtc_disable(struct drm_crtc *crtc) omap_crtc_wait_page_flip(crtc); dispc_runtime_get(); drm_crtc_vblank_off(crtc); - dispc_runtime_put(); /* Disable all planes associated with the CRTC. */ for (i = 0; i < priv->num_planes; i++) { struct drm_plane *plane = priv->planes[i]; if (plane->crtc == crtc) - WARN_ON(omap_plane_set_enable(plane, false)); + WARN_ON(omap_plane_setup(plane)); } omap_crtc_encoder_setup(crtc, false); omap_crtc_flush(crtc); + + dispc_runtime_put(); } static void omap_crtc_mode_set_nofb(struct drm_crtc *crtc) |