Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284966
b: refs/heads/master
c: 82153ed
h: refs/heads/master
v: v3
  • Loading branch information
Tomi Valkeinen committed Dec 2, 2011
1 parent bd0e745 commit 5a56a24
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 7 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: 153b6e7357778267e6914f2370a059e79a751371
refs/heads/master: 82153eda076ee4df434bb1008f24e46590f76dfc
20 changes: 14 additions & 6 deletions trunk/drivers/video/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -72,6 +72,12 @@ struct ovl_priv_data {
bool enabled;
enum omap_channel channel;
u32 fifo_low, fifo_high;

/*
* True if overlay is to be enabled. Used to check and calculate configs
* for the overlay before it is enabled in the HW.
*/
bool enabling;
};

struct mgr_priv_data {
Expand Down Expand Up @@ -297,7 +303,7 @@ static int dss_check_settings_low(struct omap_overlay_manager *mgr,
list_for_each_entry(ovl, &mgr->overlays, list) {
op = get_ovl_priv(ovl);

if (!op->enabled)
if (!op->enabled && !op->enabling)
oi = NULL;
else if (applying && op->user_info_dirty)
oi = &op->user_info;
Expand Down Expand Up @@ -998,7 +1004,7 @@ static void dss_mgr_setup_fifos(struct omap_overlay_manager *mgr)
list_for_each_entry(ovl, &mgr->overlays, list) {
op = get_ovl_priv(ovl);

if (!op->enabled)
if (!op->enabled && !op->enabling)
continue;

dss_ovl_setup_fifo(ovl);
Expand Down Expand Up @@ -1395,19 +1401,20 @@ int dss_ovl_enable(struct omap_overlay *ovl)

spin_lock_irqsave(&data_lock, flags);

op->enabled = true;
op->enabling = true;

r = dss_check_settings(ovl->manager, ovl->manager->device);
op->enabled = false;
if (r) {
DSSERR("failed to enable overlay %d: check_settings failed\n",
ovl->id);
goto err2;
}

dss_apply_ovl_enable(ovl, true);

dss_ovl_setup_fifo(ovl);

op->enabling = false;
dss_apply_ovl_enable(ovl, true);

dss_write_regs();
dss_set_go_bits();

Expand All @@ -1417,6 +1424,7 @@ int dss_ovl_enable(struct omap_overlay *ovl)

return 0;
err2:
op->enabling = false;
spin_unlock_irqrestore(&data_lock, flags);
err1:
mutex_unlock(&apply_lock);
Expand Down

0 comments on commit 5a56a24

Please sign in to comment.