diff mbox

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

Message ID 1433408582-9828-45-git-send-email-tomi.valkeinen@ti.com (mailing list archive)
State New, archived
Headers show

Commit Message

Tomi Valkeinen June 4, 2015, 9:03 a.m. UTC
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>
---
 drivers/gpu/drm/omapdrm/omap_crtc.c | 27 ++++++++++-----------------
 1 file changed, 10 insertions(+), 17 deletions(-)

Comments

Laurent Pinchart June 6, 2015, 4:01 a.m. UTC | #1
Hi Tomi,

Thank you for the patch.

On Thursday 04 June 2015 12:03:01 Tomi Valkeinen wrote:
> 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>

> ---
>  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)));
diff mbox

Patch

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)));