summaryrefslogtreecommitdiffstats
path: root/drivers/video/omap2/dss/apply.c
diff options
context:
space:
mode:
authorTomi Valkeinen <tomi.valkeinen@ti.com>2013-02-15 14:24:38 +0200
committerTomi Valkeinen <tomi.valkeinen@ti.com>2013-04-03 15:19:00 +0300
commit346f1e0772cbd087f176fd3e09ffa5a4569812e6 (patch)
tree29a10d6a52154e5e24441ebd5cfa77e070dac3d8 /drivers/video/omap2/dss/apply.c
parente087cc21c6d23d27951d45289a096b825326d3e2 (diff)
downloadop-kernel-dev-346f1e0772cbd087f176fd3e09ffa5a4569812e6.zip
op-kernel-dev-346f1e0772cbd087f176fd3e09ffa5a4569812e6.tar.gz
OMAPDSS: APPLY: remove dssdev from dss_mgr_wait_for_vsync
dss_mgr_wait_for_vsync() uses dssdev->type to find out if the output is going to VENC, HDMI, or something else. This creates a dependency on dssdev, which we want to remove. The task is more logically done by looking at the output to which the overlay manager in question is connected to. This patch changes the code to use output->id to find out which kind of output we use. Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ti.com> Reviewed-by: Archit Taneja <archit@ti.com>
Diffstat (limited to 'drivers/video/omap2/dss/apply.c')
-rw-r--r--drivers/video/omap2/dss/apply.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c
index d446bdf..a4b356a 100644
--- a/drivers/video/omap2/dss/apply.c
+++ b/drivers/video/omap2/dss/apply.c
@@ -435,20 +435,27 @@ static inline struct omap_dss_device *dss_mgr_get_device(struct omap_overlay_man
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;
+ if (mgr->output == NULL)
+ return -ENODEV;
+
r = dispc_runtime_get();
if (r)
return r;
- if (dssdev->type == OMAP_DISPLAY_TYPE_VENC)
+ switch (mgr->output->id) {
+ case OMAP_DSS_OUTPUT_VENC:
irq = DISPC_IRQ_EVSYNC_ODD;
- else if (dssdev->type == OMAP_DISPLAY_TYPE_HDMI)
+ break;
+ case OMAP_DSS_OUTPUT_HDMI:
irq = DISPC_IRQ_EVSYNC_EVEN;
- else
+ break;
+ default:
irq = dispc_mgr_get_vsync_irq(mgr->id);
+ break;
+ }
r = omap_dispc_wait_for_irq_interruptible_timeout(irq, timeout);
OpenPOWER on IntegriCloud