diff options
author | Archit Taneja <archit@ti.com> | 2012-09-07 14:14:51 +0200 |
---|---|---|
committer | Tomi Valkeinen <tomi.valkeinen@ti.com> | 2012-09-26 13:58:31 +0200 |
commit | 794bc4eefa10fbc80e6ad29de1bc42424efde608 (patch) | |
tree | a9823eb2eae3a2cafed62fedf96db07b45d99e33 /drivers/video/omap2/dss/manager.c | |
parent | OMAPDSS: APPLY: Add manager set/unset output ops for omap_overlay_manager (diff) | |
download | linux-794bc4eefa10fbc80e6ad29de1bc42424efde608.tar.xz linux-794bc4eefa10fbc80e6ad29de1bc42424efde608.zip |
OMAPDSS: Remove manager->device references
With the introduction of output entities, managers will now connect to outputs.
Create helper ops for overlays and managers named get_device. This will abstract
away the information on how to get the device from an overlay or an overlay
manager. The get_device ops currently retrieve the output via a
ovl->manager->device reference. This will be later replaced by
ovl->manager->output->device references.
Signed-off-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/manager.c')
-rw-r--r-- | drivers/video/omap2/dss/manager.c | 11 |
1 files changed, 9 insertions, 2 deletions
diff --git a/drivers/video/omap2/dss/manager.c b/drivers/video/omap2/dss/manager.c index 92a2585d04b2..edc372e04bcb 100644 --- a/drivers/video/omap2/dss/manager.c +++ b/drivers/video/omap2/dss/manager.c @@ -36,9 +36,15 @@ static int num_managers; static struct omap_overlay_manager *managers; +static inline struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_manager *mgr) +{ + return mgr->device; +} + static int dss_mgr_wait_for_vsync(struct omap_overlay_manager *mgr) { unsigned long timeout = msecs_to_jiffies(500); + struct omap_dss_device *dssdev = mgr->get_device(mgr); u32 irq; int r; @@ -46,9 +52,9 @@ static int dss_mgr_wait_for_vsync(struct omap_overlay_manager *mgr) if (r) return r; - if (mgr->device->type == OMAP_DISPLAY_TYPE_VENC) + if (dssdev->type == OMAP_DISPLAY_TYPE_VENC) irq = DISPC_IRQ_EVSYNC_ODD; - else if (mgr->device->type == OMAP_DISPLAY_TYPE_HDMI) + else if (dssdev->type == OMAP_DISPLAY_TYPE_HDMI) irq = DISPC_IRQ_EVSYNC_EVEN; else irq = dispc_mgr_get_vsync_irq(mgr->id); @@ -102,6 +108,7 @@ int dss_init_overlay_managers(struct platform_device *pdev) mgr->get_manager_info = &dss_mgr_get_info; mgr->wait_for_go = &dss_mgr_wait_for_go; mgr->wait_for_vsync = &dss_mgr_wait_for_vsync; + mgr->get_device = &dss_mgr_get_device; mgr->caps = 0; mgr->supported_displays = |