complete(compl);
}
-static void _enable_lcd_out(enum omap_channel channel, bool enable)
+static void _enable_mgr_out(enum omap_channel channel, bool enable)
{
mgr_fld_write(channel, DISPC_MGR_FLD_ENABLE, enable);
/* flush posted write */
mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE);
}
+bool dispc_mgr_is_enabled(enum omap_channel channel)
+{
+ return !!mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE);
+}
+
static void dispc_mgr_enable_lcd_out(enum omap_channel channel, bool enable)
{
struct completion frame_done_completion;
/* When we disable LCD output, we need to wait until frame is done.
* Otherwise the DSS is still working, and turning off the clocks
* prevents DSS from going to OFF mode */
- is_on = mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE);
+ is_on = dispc_mgr_is_enabled(channel);
irq = mgr_desc[channel].framedone_irq;
DSSERR("failed to register FRAMEDONE isr\n");
}
- _enable_lcd_out(channel, enable);
+ _enable_mgr_out(channel, enable);
if (!enable && is_on) {
if (!wait_for_completion_timeout(&frame_done_completion,
}
}
-static void _enable_digit_out(bool enable)
-{
- REG_FLD_MOD(DISPC_CONTROL, enable ? 1 : 0, 1, 1);
- /* flush posted write */
- dispc_read_reg(DISPC_CONTROL);
-}
-
static void dispc_mgr_enable_digit_out(bool enable)
{
struct completion frame_done_completion;
u32 irq_mask;
int num_irqs;
- if (REG_GET(DISPC_CONTROL, 1, 1) == enable)
+ if (dispc_mgr_is_enabled(OMAP_DSS_CHANNEL_DIGIT) == enable)
return;
src = dss_get_hdmi_venc_clk_source();
if (r)
DSSERR("failed to register %x isr\n", irq_mask);
- _enable_digit_out(enable);
+ _enable_mgr_out(OMAP_DSS_CHANNEL_DIGIT, enable);
for (i = 0; i < num_irqs; ++i) {
if (!wait_for_completion_timeout(&frame_done_completion,
}
}
-bool dispc_mgr_is_enabled(enum omap_channel channel)
-{
- return !!mgr_fld_read(channel, DISPC_MGR_FLD_ENABLE);
-}
-
void dispc_mgr_enable(enum omap_channel channel, bool enable)
{
if (dss_mgr_is_lcd(channel))