summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2011-11-04 09:04:15 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2011-12-02 08:54:29 +0200
commit32eaa5841021c8d812a4f62898a6e8617d648846 (patch)
tree25476416efc7f3cdbdac0e20c1a8d76bb61ce9cf
parent550a8f646c76f27ede10265b8e4c9d54c9f4af27 (diff)
downloadlinux-32eaa5841021c8d812a4f62898a6e8617d648846.tar.gz
linux-32eaa5841021c8d812a4f62898a6e8617d648846.tar.bz2
linux-32eaa5841021c8d812a4f62898a6e8617d648846.zip
OMAPDSS: add ovl/mgr_manual_update() helpers
Add helper functions ovl_manual_update() and mgr_manual_update() which return whether the overlay or manager is used with a manual update display. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com>
-rw-r--r--drivers/video/omap2/dss/manager.c19
1 files changed, 11 insertions, 8 deletions
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c
index 3421955c63bb..8423cf85f682 100644
--- a/drivers/video/omap2/dss/manager.c
+++ b/drivers/video/omap2/dss/manager.c
@@ -538,7 +538,15 @@ static struct {
bool irq_enabled;
} dss_cache;
+static bool ovl_manual_update(struct omap_overlay *ovl)
+{
+ return ovl->manager->device->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE;
+}
+static bool mgr_manual_update(struct omap_overlay_manager *mgr)
+{
+ return mgr->device->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE;
+}
static int omap_dss_set_device(struct omap_overlay_manager *mgr,
struct omap_dss_device *dssdev)
@@ -627,7 +635,7 @@ static int dss_mgr_wait_for_go(struct omap_overlay_manager *mgr)
if (!dssdev || dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return 0;
- if (dssdev->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE)
+ if (mgr_manual_update(mgr))
return 0;
if (dssdev->type == OMAP_DISPLAY_TYPE_VENC
@@ -696,7 +704,7 @@ int dss_mgr_wait_for_go_ovl(struct omap_overlay *ovl)
if (!dssdev || dssdev->state != OMAP_DSS_DISPLAY_ACTIVE)
return 0;
- if (dssdev->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE)
+ if (ovl_manual_update(ovl))
return 0;
if (dssdev->type == OMAP_DISPLAY_TYPE_VENC
@@ -1047,8 +1055,6 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
/* Configure managers */
list_for_each_entry(mgr, &manager_list, list) {
- struct omap_dss_device *dssdev;
-
mc = &dss_cache.manager_cache[mgr->id];
if (mgr->device_changed) {
@@ -1062,14 +1068,11 @@ static int omap_dss_mgr_apply(struct omap_overlay_manager *mgr)
if (!mgr->device)
continue;
- dssdev = mgr->device;
-
mgr->info_dirty = false;
mc->dirty = true;
mc->info = mgr->info;
- mc->manual_update =
- dssdev->caps & OMAP_DSS_DISPLAY_CAP_MANUAL_UPDATE;
+ mc->manual_update = mgr_manual_update(mgr);
}
/* Configure overlay fifos */