drm/omap: remove read_irqenable()
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 20 Feb 2017 11:18:38 +0000 (13:18 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 2 Jun 2017 07:57:13 +0000 (10:57 +0300)
We only use read_irqenable() to flush posted write. Instead of having a
separate function for this, do the flush implicitly in write_irqenable().
Thus we can remove read_irqenable().

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

index 05436eaad3efb55f15657b8133923616db278cb4..ac8ca605e3147d56d392d93ca6d76b36543ce2a6 100644 (file)
@@ -3782,11 +3782,6 @@ static void dispc_clear_irqstatus(u32 mask)
        dispc_write_reg(DISPC_IRQSTATUS, mask);
 }
 
-static u32 dispc_read_irqenable(void)
-{
-       return dispc_read_reg(DISPC_IRQENABLE);
-}
-
 static void dispc_write_irqenable(u32 mask)
 {
        u32 old_mask = dispc_read_reg(DISPC_IRQENABLE);
@@ -3795,6 +3790,9 @@ static void dispc_write_irqenable(u32 mask)
        dispc_clear_irqstatus((mask ^ old_mask) & mask);
 
        dispc_write_reg(DISPC_IRQENABLE, mask);
+
+       /* flush posted write */
+       dispc_read_reg(DISPC_IRQENABLE);
 }
 
 void dispc_enable_sidle(void)
@@ -4345,7 +4343,6 @@ static void dispc_errata_i734_wa(void)
 static const struct dispc_ops dispc_ops = {
        .read_irqstatus = dispc_read_irqstatus,
        .clear_irqstatus = dispc_clear_irqstatus,
-       .read_irqenable = dispc_read_irqenable,
        .write_irqenable = dispc_write_irqenable,
 
        .request_irq = dispc_request_irq,
index 72b0a508de675676cca19906a1a7f2a289a6c22c..8396036e210c471eab9c3de1f9f46851a9a45ecd 100644 (file)
@@ -880,7 +880,6 @@ void dss_mgr_unregister_framedone_handler(enum omap_channel channel,
 struct dispc_ops {
        u32 (*read_irqstatus)(void);
        void (*clear_irqstatus)(u32 mask);
-       u32 (*read_irqenable)(void);
        void (*write_irqenable)(u32 mask);
 
        int (*request_irq)(irq_handler_t handler, void *dev_id);
index 115104cdcc597e3bee84d673a7600795fcc9e0f0..7afe4b90befdec5c12fa965c7485af795d264d0f 100644 (file)
@@ -41,7 +41,6 @@ static void omap_irq_update(struct drm_device *dev)
        DBG("irqmask=%08x", irqmask);
 
        priv->dispc_ops->write_irqenable(irqmask);
-       priv->dispc_ops->read_irqenable();        /* flush posted write */
 }
 
 static void omap_irq_wait_handler(struct omap_irq_wait *wait)