summaryrefslogtreecommitdiff
path: root/drivers/gpu/drm/omapdrm/omap_crtc.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2015-06-08 13:08:25 +0300
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>2015-06-12 22:52:52 +0300
commit6646dfd02985eb67d8dcc00d0d345c8dc40f9925 (patch)
treed8dc8f73e68d7ab451ef39fd03e792d7b8403c0c /drivers/gpu/drm/omapdrm/omap_crtc.c
parentf524ab7c070b39f4c8bd76fede6cacd17057ebc3 (diff)
drm: omapdrm: merge omap_crtc_flush and omap_crtc_atomic_flush
omap_crtc_atomic_flush() is the only user of omap_crtc_flush(), so just move the code from omap_crtc_flush() to omap_crtc_atomic_flush(). Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Acked-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Diffstat (limited to 'drivers/gpu/drm/omapdrm/omap_crtc.c')
-rw-r--r--drivers/gpu/drm/omapdrm/omap_crtc.c35
1 files changed, 14 insertions, 21 deletions
diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index abfafd1600b8..8d2bf8565ddd 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -344,26 +344,6 @@ static void omap_crtc_vblank_irq(struct omap_drm_irq *irq, uint32_t irqstatus)
complete(&omap_crtc->completion);
}
-static int omap_crtc_flush(struct drm_crtc *crtc)
-{
- struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
-
- DBG("%s: GO", omap_crtc->name);
-
- WARN_ON(omap_crtc->vblank_irq.registered);
-
- if (dispc_mgr_is_enabled(omap_crtc->channel)) {
- dispc_mgr_go(omap_crtc->channel);
- omap_irq_register(crtc->dev, &omap_crtc->vblank_irq);
-
- WARN_ON(!wait_for_completion_timeout(&omap_crtc->completion,
- msecs_to_jiffies(100)));
- reinit_completion(&omap_crtc->completion);
- }
-
- return 0;
-}
-
/* -----------------------------------------------------------------------------
* CRTC Functions
*/
@@ -442,7 +422,20 @@ static void omap_crtc_atomic_begin(struct drm_crtc *crtc)
static void omap_crtc_atomic_flush(struct drm_crtc *crtc)
{
- omap_crtc_flush(crtc);
+ struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
+
+ WARN_ON(omap_crtc->vblank_irq.registered);
+
+ if (dispc_mgr_is_enabled(omap_crtc->channel)) {
+ DBG("%s: GO", omap_crtc->name);
+
+ dispc_mgr_go(omap_crtc->channel);
+ omap_irq_register(crtc->dev, &omap_crtc->vblank_irq);
+
+ WARN_ON(!wait_for_completion_timeout(&omap_crtc->completion,
+ msecs_to_jiffies(100)));
+ reinit_completion(&omap_crtc->completion);
+ }
crtc->invert_dimensions = !!(crtc->primary->state->rotation &
(BIT(DRM_ROTATE_90) | BIT(DRM_ROTATE_270)));