drm: omapdrm: Inline the pipe2vbl function
authorLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Wed, 27 May 2015 16:15:22 +0000 (19:15 +0300)
committerLaurent Pinchart <laurent.pinchart@ideasonboard.com>
Mon, 19 Dec 2016 09:25:03 +0000 (11:25 +0200)
The function is only used in omap_irq.c and is just a wrapper around
dispc_mgr_get_vsync_irq(). Remove it and call the dispc function
directly.

Signed-off-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>
Reviewed-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/gpu/drm/omapdrm/omap_crtc.c
drivers/gpu/drm/omapdrm/omap_drv.h
drivers/gpu/drm/omapdrm/omap_irq.c

index 046d199ef036760dfa144ba968a735a1158f042f..dd47dc191e6b1ce10f41818156cb532e857c2ba2 100644 (file)
@@ -48,13 +48,6 @@ struct omap_crtc {
  * Helper Functions
  */
 
-uint32_t pipe2vbl(struct drm_crtc *crtc)
-{
-       struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
-
-       return dispc_mgr_get_vsync_irq(omap_crtc->channel);
-}
-
 struct videomode *omap_crtc_timings(struct drm_crtc *crtc)
 {
        struct omap_crtc *omap_crtc = to_omap_crtc(crtc);
index 7868feb604fcabb8a1ca9cb476df0365bc7af23d..dad7d61615635419eec461efa85ec2b51e924477 100644 (file)
@@ -230,7 +230,6 @@ struct drm_gem_object *omap_gem_prime_import(struct drm_device *dev,
                struct dma_buf *buffer);
 
 /* map crtc to vblank mask */
-uint32_t pipe2vbl(struct drm_crtc *crtc);
 struct omap_dss_device *omap_encoder_get_dssdev(struct drm_encoder *encoder);
 
 #endif /* __OMAP_DRV_H__ */
index d5c73c534586dd436cd97608f277229048df7e93..1982759a1c27879d3f84c6f0d2e8a05c4be5261c 100644 (file)
@@ -130,7 +130,7 @@ int omap_irq_enable_vblank(struct drm_device *dev, unsigned int pipe)
        DBG("dev=%p, crtc=%u", dev, pipe);
 
        spin_lock_irqsave(&list_lock, flags);
-       priv->irq_mask |= pipe2vbl(crtc);
+       priv->irq_mask |= dispc_mgr_get_vsync_irq(omap_crtc_channel(crtc));
        omap_irq_update(dev);
        spin_unlock_irqrestore(&list_lock, flags);
 
@@ -155,7 +155,7 @@ void omap_irq_disable_vblank(struct drm_device *dev, unsigned int pipe)
        DBG("dev=%p, crtc=%u", dev, pipe);
 
        spin_lock_irqsave(&list_lock, flags);
-       priv->irq_mask &= ~pipe2vbl(crtc);
+       priv->irq_mask &= ~dispc_mgr_get_vsync_irq(omap_crtc_channel(crtc));
        omap_irq_update(dev);
        spin_unlock_irqrestore(&list_lock, flags);
 }
@@ -228,7 +228,7 @@ static irqreturn_t omap_irq_handler(int irq, void *arg)
                struct drm_crtc *crtc = priv->crtcs[id];
                enum omap_channel channel = omap_crtc_channel(crtc);
 
-               if (irqstatus & pipe2vbl(crtc)) {
+               if (irqstatus & dispc_mgr_get_vsync_irq(channel)) {
                        drm_handle_vblank(dev, id);
                        omap_crtc_vblank_irq(crtc);
                }