diff options
Diffstat (limited to 'drivers/video/omap2/dss/apply.c')
-rw-r--r-- | drivers/video/omap2/dss/apply.c | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/drivers/video/omap2/dss/apply.c b/drivers/video/omap2/dss/apply.c index d446bdfc4c82..a4b356a9780d 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 | |||
435 | static int dss_mgr_wait_for_vsync(struct omap_overlay_manager *mgr) | 435 | static int dss_mgr_wait_for_vsync(struct omap_overlay_manager *mgr) |
436 | { | 436 | { |
437 | unsigned long timeout = msecs_to_jiffies(500); | 437 | unsigned long timeout = msecs_to_jiffies(500); |
438 | struct omap_dss_device *dssdev = mgr->get_device(mgr); | ||
439 | u32 irq; | 438 | u32 irq; |
440 | int r; | 439 | int r; |
441 | 440 | ||
441 | if (mgr->output == NULL) | ||
442 | return -ENODEV; | ||
443 | |||
442 | r = dispc_runtime_get(); | 444 | r = dispc_runtime_get(); |
443 | if (r) | 445 | if (r) |
444 | return r; | 446 | return r; |
445 | 447 | ||
446 | if (dssdev->type == OMAP_DISPLAY_TYPE_VENC) | 448 | switch (mgr->output->id) { |
449 | case OMAP_DSS_OUTPUT_VENC: | ||
447 | irq = DISPC_IRQ_EVSYNC_ODD; | 450 | irq = DISPC_IRQ_EVSYNC_ODD; |
448 | else if (dssdev->type == OMAP_DISPLAY_TYPE_HDMI) | 451 | break; |
452 | case OMAP_DSS_OUTPUT_HDMI: | ||
449 | irq = DISPC_IRQ_EVSYNC_EVEN; | 453 | irq = DISPC_IRQ_EVSYNC_EVEN; |
450 | else | 454 | break; |
455 | default: | ||
451 | irq = dispc_mgr_get_vsync_irq(mgr->id); | 456 | irq = dispc_mgr_get_vsync_irq(mgr->id); |
457 | break; | ||
458 | } | ||
452 | 459 | ||
453 | r = omap_dispc_wait_for_irq_interruptible_timeout(irq, timeout); | 460 | r = omap_dispc_wait_for_irq_interruptible_timeout(irq, timeout); |
454 | 461 | ||