[PATCHv2 44/45] drm: omapdrm: merge omap_crtc_flush and omap_crtc_atomic_flush

Tomi Valkeinen tomi.valkeinen at ti.com
Thu Jun 4 02:03:01 PDT 2015


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 at ti.com>
---
 drivers/gpu/drm/omapdrm/omap_crtc.c | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

diff --git a/drivers/gpu/drm/omapdrm/omap_crtc.c b/drivers/gpu/drm/omapdrm/omap_crtc.c
index 2ec34dc0c66c..b7df689cdb4c 100644
--- a/drivers/gpu/drm/omapdrm/omap_crtc.c
+++ b/drivers/gpu/drm/omapdrm/omap_crtc.c
@@ -315,22 +315,6 @@ static void omap_crtc_vblank_irq(struct omap_drm_irq *irq, uint32_t irqstatus)
 	omap_crtc_complete_page_flip(&omap_crtc->base);
 }
 
-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);
-	}
-
-	return 0;
-}
-
 /* -----------------------------------------------------------------------------
  * CRTC Functions
  */
@@ -408,7 +392,16 @@ 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);
+
+	if (dispc_mgr_is_enabled(omap_crtc->channel)) {
+		WARN_ON(omap_crtc->vblank_irq.registered);
+
+		DBG("%s: GO", omap_crtc->name);
+
+		dispc_mgr_go(omap_crtc->channel);
+		omap_irq_register(crtc->dev, &omap_crtc->vblank_irq);
+	}
 
 	crtc->invert_dimensions = !!(crtc->primary->state->rotation &
 				    (BIT(DRM_ROTATE_90) | BIT(DRM_ROTATE_270)));
-- 
2.1.4



More information about the dri-devel mailing list