aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video
diff options
context:
space:
mode:
authorLajos Molnar <molnar@ti.com>2011-06-16 17:14:55 -0500
committerRebecca Schultz Zavin <rebecca@android.com>2011-07-11 17:00:32 -0700
commit0660ae91a3665707ce9bcbd787892672c29a2379 (patch)
treeafcdb4cc8f4d4689aff149d6dda14d65e713f3e7 /drivers/video
parent0844e594b7b884a4c41c56faeca2723e516ca7e7 (diff)
downloadkernel_samsung_tuna-0660ae91a3665707ce9bcbd787892672c29a2379.zip
kernel_samsung_tuna-0660ae91a3665707ce9bcbd787892672c29a2379.tar.gz
kernel_samsung_tuna-0660ae91a3665707ce9bcbd787892672c29a2379.tar.bz2
OMAP:DSSCOMP: Disable overlays not specified in a composition
Disable overlays that were part of the previous frame, but are not part of the current frame. Change-Id: I9fb2be9c451c18aa8be23d4b4a348b21283e0d99 Signed-off-by: Lajos Molnar <molnar@ti.com>
Diffstat (limited to 'drivers/video')
-rw-r--r--drivers/video/omap2/dsscomp/gralloc.c19
1 files changed, 19 insertions, 0 deletions
diff --git a/drivers/video/omap2/dsscomp/gralloc.c b/drivers/video/omap2/dsscomp/gralloc.c
index 8b66c5b..b3b32a0 100644
--- a/drivers/video/omap2/dsscomp/gralloc.c
+++ b/drivers/video/omap2/dsscomp/gralloc.c
@@ -20,6 +20,8 @@ static DEFINE_MUTEX(mtx);
static struct semaphore free_slots_sem =
__SEMAPHORE_INITIALIZER(free_slots_sem, 0);
+static u32 ovl_set_mask;
+
struct gralloc_cb_work {
struct work_struct work;
struct list_head slots;
@@ -119,6 +121,7 @@ int dsscomp_gralloc_queue(struct dsscomp_setup_mgr_data *d,
struct omap_dss_device *dev;
struct omap_overlay_manager *mgr;
dsscomp_t comp;
+ u32 ovl_new_set_mask = 0;
/* reserve tiler areas if not already done so */
dsscomp_gralloc_init(cdev);
@@ -172,6 +175,9 @@ int dsscomp_gralloc_queue(struct dsscomp_setup_mgr_data *d,
mutex_unlock(&mtx);
}
+ if (oi->cfg.enabled)
+ ovl_new_set_mask |= 1 << oi->cfg.ix;
+
r = dsscomp_set_ovl(comp, oi);
if (r)
dev_err(DEV(cdev), "failed to set ovl%d (%d)\n",
@@ -191,12 +197,25 @@ int dsscomp_gralloc_queue(struct dsscomp_setup_mgr_data *d,
if (r) {
dsscomp_drop(comp);
} else {
+ /* disable all overlays not specifically set from prior frame */
+ u32 mask = ovl_set_mask & ~ovl_new_set_mask;
+ while (mask) {
+ struct dss2_ovl_info oi = {
+ .cfg.zonly = true,
+ .cfg.enabled = false,
+ .cfg.ix = fls(mask) - 1,
+ };
+ dsscomp_set_ovl(comp, &oi);
+ mask &= ~(1 << oi.cfg.ix);
+ }
comp->extra_cb = dsscomp_gralloc_cb;
comp->gralloc_cb_fn = cb_fn;
comp->gralloc_cb_arg = cb_arg;
r = dsscomp_delayed_apply(comp);
if (r)
dev_err(DEV(cdev), "failed to apply comp (%d)\n", r);
+ else
+ ovl_set_mask = ovl_new_set_mask;
}
/* complete composition if failed to queue */