Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 344583
b: refs/heads/master
c: 6539851
h: refs/heads/master
i:
  344581: 8bc8df8
  344579: 2aa9209
  344575: 578532e
v: v3
  • Loading branch information
Tomi Valkeinen committed Oct 18, 2012
1 parent b1f2373 commit 1b422c5
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 18 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 16bf20c79e684b2f3d589c72e16295b0c56d8798
refs/heads/master: 653985112c35b48670e645fb76815e185dd89d81
27 changes: 10 additions & 17 deletions trunk/drivers/video/omap2/dss/dispc.c
Original file line number Diff line number Diff line change
Expand Up @@ -2590,13 +2590,18 @@ static void dispc_disable_isr(void *data, u32 mask)
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;
Expand All @@ -2607,7 +2612,7 @@ static void dispc_mgr_enable_lcd_out(enum omap_channel channel, bool enable)
/* 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;

Expand All @@ -2621,7 +2626,7 @@ static void dispc_mgr_enable_lcd_out(enum omap_channel channel, bool enable)
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,
Expand All @@ -2636,13 +2641,6 @@ static void dispc_mgr_enable_lcd_out(enum omap_channel channel, bool enable)
}
}

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;
Expand All @@ -2651,7 +2649,7 @@ static void dispc_mgr_enable_digit_out(bool enable)
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();
Expand Down Expand Up @@ -2688,7 +2686,7 @@ static void dispc_mgr_enable_digit_out(bool enable)
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,
Expand All @@ -2712,11 +2710,6 @@ static void dispc_mgr_enable_digit_out(bool enable)
}
}

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))
Expand Down

0 comments on commit 1b422c5

Please sign in to comment.