]> git.openfabrics.org - ~shefty/rdma-dev.git/commitdiff
OMAPDSS: DISPC: add dispc_mgr_get_framedone_irq
authorTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 18 Nov 2011 13:39:52 +0000 (15:39 +0200)
committerTomi Valkeinen <tomi.valkeinen@ti.com>
Fri, 2 Dec 2011 06:54:45 +0000 (08:54 +0200)
Add dispc_mgr_get_framedone_irq() which returns the irq number for
FRAMEDONE for the given channel.

Note that the function returns always 0 for DIGIT channel, even if OMAP4
does have FRAMEDONE_TV interrupt. The reason for this is that this
function is currently used only to track manual updates, and thus
FRAMEDONE_TV is not needed.

If there's need in the future to also get the FRAMEDONE_TV this needs
revisiting. However, as FRAMEDONE_TV doesn't exist on OMAP2/3, the use
of this function for that purpose needs some extra code to handle the
OMAP2/3 case.

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

index 5f09120d4537369e69a54738199608638679367a..0f84034928ad0a0df2e849c658c2cc9aaeafa254 100644 (file)
@@ -452,6 +452,20 @@ u32 dispc_mgr_get_vsync_irq(enum omap_channel channel)
        }
 }
 
+u32 dispc_mgr_get_framedone_irq(enum omap_channel channel)
+{
+       switch (channel) {
+       case OMAP_DSS_CHANNEL_LCD:
+               return DISPC_IRQ_FRAMEDONE;
+       case OMAP_DSS_CHANNEL_LCD2:
+               return DISPC_IRQ_FRAMEDONE2;
+       case OMAP_DSS_CHANNEL_DIGIT:
+               return 0;
+       default:
+               BUG();
+       }
+}
+
 bool dispc_mgr_go_busy(enum omap_channel channel)
 {
        int bit;
index 7aac8a3367bc6e21cb160478c25c8763aeb33ab8..6fce3108c060484aa250df6adcb0aa91dd7f103e 100644 (file)
@@ -430,6 +430,7 @@ void dispc_ovl_set_channel_out(enum omap_plane plane,
 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);
+u32 dispc_mgr_get_framedone_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);