diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-02 10:41:26 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2010-03-02 10:41:26 -0800 |
commit | 3a5b27bf6f29574d667230c7e76e4b83fe3014e0 (patch) | |
tree | a80892424269083c292d3eee29c4b3e6289d588b /drivers/video/omap2/dss/dispc.c | |
parent | 5057bfaff82e12f01a2ffd58f55535cbd7c5c3a2 (diff) | |
parent | 21df20fcfb4e88f4cd4991e9e67de549e6480adf (diff) |
Merge branch 'for-linus' of git://gitorious.org/linux-omap-dss2/linux
* 'for-linus' of git://gitorious.org/linux-omap-dss2/linux: (49 commits)
OMAP: DSS2: Taal: Fix TE when resuming
OMAP: DSS2: Taal: Fix ESD check
OMAP: DSS2: OMAPFB: Constify some function parameters
OMAP: DSS2: OMAPFB: install omapfb.h
OMAP: DSS2: DSI: add error prints
OMAP: DSS2: TPO-TD03MTEA1: fix function names
OMAP: DSS2: DSI: add dsi_vc_dcs_read_2() helper
OMAP: DSS2: OMAPFB: Remove FB_OMAP2_FORCE_AUTO_UPDATE
OMAP: DSS2: DSI: remove external TE support
OMAP: DSS2: move timing functions
OMAP: DSS2: move set/get_wss()
OMAP: DSS2: move enable/disable/suspend/resume
OMAP: DSS2: move update() and sync()
OMAP: DSS2: move set/get_update_mode()
OMAP: DSS2: move enable/get_te()
OMAP: DSS2: move get_recommended_bpp()
OMAP: DSS2: move get_resolution()
OMAP: DSS2: move enable/disable_channel to overlay manager
OMAP: DSS2: move wait_vsync()
OMAP: DSS2: move get/set_rotate()
...
Diffstat (limited to 'drivers/video/omap2/dss/dispc.c')
-rw-r--r-- | drivers/video/omap2/dss/dispc.c | 42 |
1 files changed, 31 insertions, 11 deletions
diff --git a/drivers/video/omap2/dss/dispc.c b/drivers/video/omap2/dss/dispc.c index de8bfbac9e2..e777e352dbc 100644 --- a/drivers/video/omap2/dss/dispc.c +++ b/drivers/video/omap2/dss/dispc.c @@ -1725,7 +1725,7 @@ static void _enable_lcd_out(bool enable) REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 0, 0); } -void dispc_enable_lcd_out(bool enable) +static void dispc_enable_lcd_out(bool enable) { struct completion frame_done_completion; bool is_on; @@ -1772,7 +1772,7 @@ static void _enable_digit_out(bool enable) REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 1, 1); } -void dispc_enable_digit_out(bool enable) +static void dispc_enable_digit_out(bool enable) { struct completion frame_done_completion; int r; @@ -1836,6 +1836,26 @@ void dispc_enable_digit_out(bool enable) enable_clocks(0); } +bool dispc_is_channel_enabled(enum omap_channel channel) +{ + if (channel == OMAP_DSS_CHANNEL_LCD) + return !!REG_GET(DISPC_CONTROL, 0, 0); + else if (channel == OMAP_DSS_CHANNEL_DIGIT) + return !!REG_GET(DISPC_CONTROL, 1, 1); + else + BUG(); +} + +void dispc_enable_channel(enum omap_channel channel, bool enable) +{ + if (channel == OMAP_DSS_CHANNEL_LCD) + dispc_enable_lcd_out(enable); + else if (channel == OMAP_DSS_CHANNEL_DIGIT) + dispc_enable_digit_out(enable); + else + BUG(); +} + void dispc_lcd_enable_signal_polarity(bool act_high) { enable_clocks(1); @@ -2198,7 +2218,7 @@ unsigned long dispc_fclk_rate(void) { unsigned long r = 0; - if (dss_get_dispc_clk_source() == 0) + if (dss_get_dispc_clk_source() == DSS_SRC_DSS1_ALWON_FCLK) r = dss_clk_get_rate(DSS_CLK_FCK1); else #ifdef CONFIG_OMAP2_DSS_DSI @@ -2251,7 +2271,7 @@ void dispc_dump_clocks(struct seq_file *s) seq_printf(s, "- DISPC -\n"); seq_printf(s, "dispc fclk source = %s\n", - dss_get_dispc_clk_source() == 0 ? + dss_get_dispc_clk_source() == DSS_SRC_DSS1_ALWON_FCLK ? "dss1_alwon_fclk" : "dsi1_pll_fclk"); seq_printf(s, "fck\t\t%-16lu\n", dispc_fclk_rate()); @@ -2301,8 +2321,6 @@ void dispc_dump_irqs(struct seq_file *s) PIS(WAKEUP); #undef PIS } -#else -void dispc_dump_irqs(struct seq_file *s) { } #endif void dispc_dump_regs(struct seq_file *s) @@ -2854,12 +2872,13 @@ static void dispc_error_worker(struct work_struct *work) manager = mgr; enable = mgr->device->state == OMAP_DSS_DISPLAY_ACTIVE; - mgr->device->disable(mgr->device); + mgr->device->driver->disable(mgr->device); break; } } if (manager) { + struct omap_dss_device *dssdev = manager->device; for (i = 0; i < omap_dss_get_num_overlays(); ++i) { struct omap_overlay *ovl; ovl = omap_dss_get_overlay(i); @@ -2874,7 +2893,7 @@ static void dispc_error_worker(struct work_struct *work) dispc_go(manager->id); mdelay(50); if (enable) - manager->device->enable(manager->device); + dssdev->driver->enable(dssdev); } } @@ -2892,12 +2911,13 @@ static void dispc_error_worker(struct work_struct *work) manager = mgr; enable = mgr->device->state == OMAP_DSS_DISPLAY_ACTIVE; - mgr->device->disable(mgr->device); + mgr->device->driver->disable(mgr->device); break; } } if (manager) { + struct omap_dss_device *dssdev = manager->device; for (i = 0; i < omap_dss_get_num_overlays(); ++i) { struct omap_overlay *ovl; ovl = omap_dss_get_overlay(i); @@ -2912,7 +2932,7 @@ static void dispc_error_worker(struct work_struct *work) dispc_go(manager->id); mdelay(50); if (enable) - manager->device->enable(manager->device); + dssdev->driver->enable(dssdev); } } @@ -2923,7 +2943,7 @@ static void dispc_error_worker(struct work_struct *work) mgr = omap_dss_get_overlay_manager(i); if (mgr->caps & OMAP_DSS_OVL_CAP_DISPC) - mgr->device->disable(mgr->device); + mgr->device->driver->disable(mgr->device); } } |