aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2012-11-08 03:05:31 -0500
committerTomi Valkeinen <tomi.valkeinen@ti.com>2012-11-27 05:27:02 -0500
commit15f5e7324a683ee1c2991a9953103dd9b3b6fa5e (patch)
treea80156cff4681799b3be14e46b11582a550ab5ff /drivers/video/omap2
parentcffa947d2769f3249beecb499b7d4083feeeb267 (diff)
OMAPDSS: DISPC: use get_framedone_irq in disable_digit_out
dispc_mgr_disable_digit_out() needs to wait until the DIGIT output is turned off. This is done with either VSYNC irq on OMAP2/3 and FRAMEDONETV on OMAP4+. It currently uses a rather hacky way to decide what irq to use. This patch changes dispc_mgr_disable_digit_out to use dispc_mgr_get_framedone_irq to find out if there's framedone irq on this SoC, and if not, uses VSYNC. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
Diffstat (limited to 'drivers/video/omap2')
-rw-r--r--drivers/video/omap2/dss/dispc.c19
1 files changed, 10 insertions, 9 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c
index 21fa587b121c..bc64d77a8717 100644
--- a/drivers/video/omap2/dss/dispc.c
+++ b/drivers/video/omap2/dss/dispc.c
@@ -2732,7 +2732,6 @@ static void dispc_mgr_enable_digit_out(void)
2732static void dispc_mgr_disable_digit_out(void) 2732static void dispc_mgr_disable_digit_out(void)
2733{ 2733{
2734 DECLARE_COMPLETION_ONSTACK(framedone_compl); 2734 DECLARE_COMPLETION_ONSTACK(framedone_compl);
2735 enum dss_hdmi_venc_clk_source_select src;
2736 int r, i; 2735 int r, i;
2737 u32 irq_mask; 2736 u32 irq_mask;
2738 int num_irqs; 2737 int num_irqs;
@@ -2740,18 +2739,20 @@ static void dispc_mgr_disable_digit_out(void)
2740 if (dispc_mgr_is_enabled(OMAP_DSS_CHANNEL_DIGIT) == false) 2739 if (dispc_mgr_is_enabled(OMAP_DSS_CHANNEL_DIGIT) == false)
2741 return; 2740 return;
2742 2741
2743 src = dss_get_hdmi_venc_clk_source();
2744
2745 /* 2742 /*
2746 * When we disable the digit output, we need to wait for FRAMEDONE to 2743 * When we disable the digit output, we need to wait for FRAMEDONE to
2747 * know that DISPC has finished with the output. For analog tv out we'll 2744 * know that DISPC has finished with the output.
2748 * use vsync, as omap2/3 don't have framedone for TV.
2749 */ 2745 */
2750 2746
2751 if (src == DSS_HDMI_M_PCLK) { 2747 irq_mask = dispc_mgr_get_framedone_irq(OMAP_DSS_CHANNEL_DIGIT);
2752 irq_mask = DISPC_IRQ_FRAMEDONETV; 2748 num_irqs = 1;
2753 num_irqs = 1; 2749
2754 } else { 2750 if (!irq_mask) {
2751 /*
2752 * omap 2/3 don't have framedone irq for TV, so we need to use
2753 * vsyncs for this.
2754 */
2755
2755 irq_mask = dispc_mgr_get_vsync_irq(OMAP_DSS_CHANNEL_DIGIT); 2756 irq_mask = dispc_mgr_get_vsync_irq(OMAP_DSS_CHANNEL_DIGIT);
2756 /* 2757 /*
2757 * We need to wait for both even and odd vsyncs. Note that this 2758 * We need to wait for both even and odd vsyncs. Note that this