diff options
author | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-10-19 07:23:06 -0400 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-11-27 05:27:02 -0500 |
commit | b08e3e1342ff836e47767daa47211692d865e730 (patch) | |
tree | b3c7484384d3aa833ad002310bd6cb45aa056ad8 | |
parent | 15f5e7324a683ee1c2991a9953103dd9b3b6fa5e (diff) |
OMAPDSS: DISPC: Remove blocking code from dispc_wb_enable()
WB will not be used with compat-mode, i.e. from omapfb. This means we
don't need the current complex dispc_wb_enable function, but can have a
simple register write version of the function.
This patch removes all the extra code from dispc_wb_enable()
Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 35 |
1 files changed, 2 insertions, 33 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index bc64d77a8717..08c08d507273 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c | |||
@@ -2810,43 +2810,12 @@ void dispc_mgr_disable_sync(enum omap_channel channel) | |||
2810 | 2810 | ||
2811 | void dispc_wb_enable(bool enable) | 2811 | void dispc_wb_enable(bool enable) |
2812 | { | 2812 | { |
2813 | enum omap_plane plane = OMAP_DSS_WB; | 2813 | REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(OMAP_DSS_WB), enable ? 1 : 0, 0, 0); |
2814 | struct completion frame_done_completion; | ||
2815 | bool is_on; | ||
2816 | int r; | ||
2817 | u32 irq; | ||
2818 | |||
2819 | is_on = REG_GET(DISPC_OVL_ATTRIBUTES(plane), 0, 0); | ||
2820 | irq = DISPC_IRQ_FRAMEDONEWB; | ||
2821 | |||
2822 | if (!enable && is_on) { | ||
2823 | init_completion(&frame_done_completion); | ||
2824 | |||
2825 | r = omap_dispc_register_isr(dispc_mgr_disable_isr, | ||
2826 | &frame_done_completion, irq); | ||
2827 | if (r) | ||
2828 | DSSERR("failed to register FRAMEDONEWB isr\n"); | ||
2829 | } | ||
2830 | |||
2831 | REG_FLD_MOD(DISPC_OVL_ATTRIBUTES(plane), enable ? 1 : 0, 0, 0); | ||
2832 | |||
2833 | if (!enable && is_on) { | ||
2834 | if (!wait_for_completion_timeout(&frame_done_completion, | ||
2835 | msecs_to_jiffies(100))) | ||
2836 | DSSERR("timeout waiting for FRAMEDONEWB\n"); | ||
2837 | |||
2838 | r = omap_dispc_unregister_isr(dispc_mgr_disable_isr, | ||
2839 | &frame_done_completion, irq); | ||
2840 | if (r) | ||
2841 | DSSERR("failed to unregister FRAMEDONEWB isr\n"); | ||
2842 | } | ||
2843 | } | 2814 | } |
2844 | 2815 | ||
2845 | bool dispc_wb_is_enabled(void) | 2816 | bool dispc_wb_is_enabled(void) |
2846 | { | 2817 | { |
2847 | enum omap_plane plane = OMAP_DSS_WB; | 2818 | return REG_GET(DISPC_OVL_ATTRIBUTES(OMAP_DSS_WB), 0, 0); |
2848 | |||
2849 | return REG_GET(DISPC_OVL_ATTRIBUTES(plane), 0, 0); | ||
2850 | } | 2819 | } |
2851 | 2820 | ||
2852 | static void dispc_lcd_enable_signal_polarity(bool act_high) | 2821 | static void dispc_lcd_enable_signal_polarity(bool act_high) |