Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 284949
b: refs/heads/master
c: 0b53f17
h: refs/heads/master
i:
  284947: ae0d931
v: v3
  • Loading branch information
Tomi Valkeinen committed Dec 2, 2011
1 parent c67bbc7 commit 0d1a1ed
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 36 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: 6dc802e2901d33e02efad3c90bb2034fd20c79e7
refs/heads/master: 0b53f17971700f673492e2e91b5069893e5f2d0b
62 changes: 27 additions & 35 deletions trunk/drivers/video/omap2/dss/apply.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,8 +31,10 @@
* We have 4 levels of cache for the dispc settings. First two are in SW and
* the latter two in HW.
*
* set_info()
* v
* +--------------------+
* |overlay/manager_info|
* | user_info |
* +--------------------+
* v
* apply()
Expand All @@ -59,16 +61,11 @@ struct ovl_priv_data {
bool user_info_dirty;
struct omap_overlay_info user_info;

/* If true, cache changed, but not written to shadow registers. Set
* in apply(), cleared when registers written. */
bool dirty;
/* If true, shadow registers contain changed values not yet in real
* registers. Set when writing to shadow registers, cleared at
* VSYNC/EVSYNC */
bool shadow_dirty;

bool info_dirty;
struct omap_overlay_info info;

bool shadow_info_dirty;

bool extra_info_dirty;
bool shadow_extra_info_dirty;

Expand All @@ -82,16 +79,11 @@ struct mgr_priv_data {
bool user_info_dirty;
struct omap_overlay_manager_info user_info;

/* If true, cache changed, but not written to shadow registers. Set
* in apply(), cleared when registers written. */
bool dirty;
/* If true, shadow registers contain changed values not yet in real
* registers. Set when writing to shadow registers, cleared at
* VSYNC/EVSYNC */
bool shadow_dirty;

bool info_dirty;
struct omap_overlay_manager_info info;

bool shadow_info_dirty;

/* If true, GO bit is up and shadow registers cannot be written.
* Never true for manual update displays */
bool busy;
Expand Down Expand Up @@ -199,7 +191,7 @@ static bool need_isr(void)
return true;

/* to write new values to registers */
if (mp->dirty)
if (mp->info_dirty)
return true;

list_for_each_entry(ovl, &mgr->overlays, list) {
Expand All @@ -211,7 +203,7 @@ static bool need_isr(void)
continue;

/* to write new values to registers */
if (op->dirty || op->extra_info_dirty)
if (op->info_dirty || op->extra_info_dirty)
return true;
}
}
Expand All @@ -228,12 +220,12 @@ static bool need_go(struct omap_overlay_manager *mgr)

mp = get_mgr_priv(mgr);

if (mp->shadow_dirty)
if (mp->shadow_info_dirty)
return true;

list_for_each_entry(ovl, &mgr->overlays, list) {
op = get_ovl_priv(ovl);
if (op->shadow_dirty || op->shadow_extra_info_dirty)
if (op->shadow_info_dirty || op->shadow_extra_info_dirty)
return true;
}

Expand Down Expand Up @@ -264,8 +256,8 @@ int dss_mgr_wait_for_go(struct omap_overlay_manager *mgr)
bool shadow_dirty, dirty;

spin_lock_irqsave(&data_lock, flags);
dirty = mp->dirty;
shadow_dirty = mp->shadow_dirty;
dirty = mp->info_dirty;
shadow_dirty = mp->shadow_info_dirty;
spin_unlock_irqrestore(&data_lock, flags);

if (!dirty && !shadow_dirty) {
Expand Down Expand Up @@ -327,8 +319,8 @@ int dss_mgr_wait_for_go_ovl(struct omap_overlay *ovl)
bool shadow_dirty, dirty;

spin_lock_irqsave(&data_lock, flags);
dirty = op->dirty;
shadow_dirty = op->shadow_dirty;
dirty = op->info_dirty;
shadow_dirty = op->shadow_info_dirty;
spin_unlock_irqrestore(&data_lock, flags);

if (!dirty && !shadow_dirty) {
Expand Down Expand Up @@ -371,7 +363,7 @@ static void dss_ovl_write_regs(struct omap_overlay *ovl)

DSSDBGF("%d", ovl->id);

if (!op->enabled || !op->dirty)
if (!op->enabled || !op->info_dirty)
return;

oi = &op->info;
Expand All @@ -396,9 +388,9 @@ static void dss_ovl_write_regs(struct omap_overlay *ovl)

mp = get_mgr_priv(ovl->manager);

op->dirty = false;
op->info_dirty = false;
if (mp->updating)
op->shadow_dirty = true;
op->shadow_info_dirty = true;
}

static void dss_ovl_write_regs_extra(struct omap_overlay *ovl)
Expand Down Expand Up @@ -443,12 +435,12 @@ static void dss_mgr_write_regs(struct omap_overlay_manager *mgr)
dss_ovl_write_regs_extra(ovl);
}

if (mp->dirty) {
if (mp->info_dirty) {
dispc_mgr_setup(mgr->id, &mp->info);

mp->dirty = false;
mp->info_dirty = false;
if (mp->updating)
mp->shadow_dirty = true;
mp->shadow_info_dirty = true;
}
}

Expand Down Expand Up @@ -548,11 +540,11 @@ static void mgr_clear_shadow_dirty(struct omap_overlay_manager *mgr)
struct ovl_priv_data *op;

mp = get_mgr_priv(mgr);
mp->shadow_dirty = false;
mp->shadow_info_dirty = false;

list_for_each_entry(ovl, &mgr->overlays, list) {
op = get_ovl_priv(ovl);
op->shadow_dirty = false;
op->shadow_info_dirty = false;
op->shadow_extra_info_dirty = false;
}
}
Expand Down Expand Up @@ -606,7 +598,7 @@ static void omap_dss_mgr_apply_ovl(struct omap_overlay *ovl)
return;

op->user_info_dirty = false;
op->dirty = true;
op->info_dirty = true;
op->info = op->user_info;
}

Expand All @@ -625,7 +617,7 @@ static void omap_dss_mgr_apply_mgr(struct omap_overlay_manager *mgr)
return;

mp->user_info_dirty = false;
mp->dirty = true;
mp->info_dirty = true;
mp->info = mp->user_info;
}

Expand Down

0 comments on commit 0d1a1ed

Please sign in to comment.