OMAPDSS: DISPC: Add dispc_mgr_get_vsync_irq()
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Mon, 7 Nov 2011 13:50:09 +0000 (15:50 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 2 Dec 2011 06:54:36 +0000 (08:54 +0200)
Add dispc_mgr_get_vsync_irq() which returns the irq number for vsync on
the given channel.

Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
drivers/video/omap2/dss/dispc.c
drivers/video/omap2/dss/dss.h

index 1264c2d1512bb0736bbd541a8aefcbc84a3312a7..5f09120d4537369e69a54738199608638679367a 100644 (file)
@@ -438,6 +438,20 @@ static struct omap_dss_device *dispc_mgr_get_device(enum omap_channel channel)
        return mgr ? mgr->device : NULL;
 }
 
+u32 dispc_mgr_get_vsync_irq(enum omap_channel channel)
+{
+       switch (channel) {
+       case OMAP_DSS_CHANNEL_LCD:
+               return DISPC_IRQ_VSYNC;
+       case OMAP_DSS_CHANNEL_LCD2:
+               return DISPC_IRQ_VSYNC2;
+       case OMAP_DSS_CHANNEL_DIGIT:
+               return DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_EVSYNC_EVEN;
+       default:
+               BUG();
+       }
+}
+
 bool dispc_mgr_go_busy(enum omap_channel channel)
 {
        int bit;
index 03c724475bcca3d9809f28204008ce74b5f5ca94..1535496677ba72c91101ce91ffb093b2d1f5a44e 100644 (file)
@@ -409,9 +409,9 @@ int dispc_ovl_enable(enum omap_plane plane, bool enable);
 void dispc_ovl_set_channel_out(enum omap_plane plane,
                enum omap_channel channel);
 
-
 void dispc_mgr_enable_fifohandcheck(enum omap_channel channel, bool enable);
 void dispc_mgr_set_lcd_size(enum omap_channel channel, u16 width, u16 height);
+u32 dispc_mgr_get_vsync_irq(enum omap_channel channel);
 bool dispc_mgr_go_busy(enum omap_channel channel);
 void dispc_mgr_go(enum omap_channel channel);
 bool dispc_mgr_is_enabled(enum omap_channel channel);