diff options
author | Archit Taneja <archit@ti.com> | 2011-09-28 09:49:26 -0400 |
---|---|---|
committer | Mauro Carvalho Chehab <mchehab@redhat.com> | 2011-11-07 08:18:54 -0500 |
commit | e144ca6426655aec8ec828e339ac57a3e00fefd0 (patch) | |
tree | 7f00a38ba2aae7819457c0fc131f09de0ef39e7b /drivers/media/video/omap | |
parent | 2780168859645353086b98492a979ae97da0a2dc (diff) |
[media] OMAP_VOUT: Fix VSYNC IRQ handling in omap_vout_isr
Currently, in omap_vout_isr(), if the panel type is DPI, and if we
get either VSYNC or VSYNC2 interrupts, we proceed ahead to set the
current buffers state to VIDEOBUF_DONE and prepare to display the
next frame in the queue.
On OMAP4, because we have 2 LCD managers, the panel type itself is not
sufficient to tell if we have received the correct irq, i.e, we shouldn't
proceed ahead if we get a VSYNC interrupt for LCD2 manager, or a VSYNC2
interrupt for LCD manager.
Fix this by correlating LCD manager to VSYNC interrupt and LCD2 manager
to VSYNC2 interrupt.
Signed-off-by: Archit Taneja <archit@ti.com>
Reviewed-by: Sumit Semwal <sumit.semwal@ti.com>
Acked-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media/video/omap')
-rw-r--r-- | drivers/media/video/omap/omap_vout.c | 14 |
1 files changed, 11 insertions, 3 deletions
diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c index 7bfe577a7230..c344d5992f3c 100644 --- a/drivers/media/video/omap/omap_vout.c +++ b/drivers/media/video/omap/omap_vout.c | |||
@@ -565,8 +565,8 @@ err: | |||
565 | 565 | ||
566 | static void omap_vout_isr(void *arg, unsigned int irqstatus) | 566 | static void omap_vout_isr(void *arg, unsigned int irqstatus) |
567 | { | 567 | { |
568 | int ret, fid; | 568 | int ret, fid, mgr_id; |
569 | u32 addr; | 569 | u32 addr, irq; |
570 | struct omap_overlay *ovl; | 570 | struct omap_overlay *ovl; |
571 | struct timeval timevalue; | 571 | struct timeval timevalue; |
572 | struct omapvideo_info *ovid; | 572 | struct omapvideo_info *ovid; |
@@ -582,6 +582,7 @@ static void omap_vout_isr(void *arg, unsigned int irqstatus) | |||
582 | if (!ovl->manager || !ovl->manager->device) | 582 | if (!ovl->manager || !ovl->manager->device) |
583 | return; | 583 | return; |
584 | 584 | ||
585 | mgr_id = ovl->manager->id; | ||
585 | cur_display = ovl->manager->device; | 586 | cur_display = ovl->manager->device; |
586 | 587 | ||
587 | spin_lock(&vout->vbq_lock); | 588 | spin_lock(&vout->vbq_lock); |
@@ -589,7 +590,14 @@ static void omap_vout_isr(void *arg, unsigned int irqstatus) | |||
589 | 590 | ||
590 | switch (cur_display->type) { | 591 | switch (cur_display->type) { |
591 | case OMAP_DISPLAY_TYPE_DPI: | 592 | case OMAP_DISPLAY_TYPE_DPI: |
592 | if (!(irqstatus & (DISPC_IRQ_VSYNC | DISPC_IRQ_VSYNC2))) | 593 | if (mgr_id == OMAP_DSS_CHANNEL_LCD) |
594 | irq = DISPC_IRQ_VSYNC; | ||
595 | else if (mgr_id == OMAP_DSS_CHANNEL_LCD2) | ||
596 | irq = DISPC_IRQ_VSYNC2; | ||
597 | else | ||
598 | goto vout_isr_err; | ||
599 | |||
600 | if (!(irqstatus & irq)) | ||
593 | goto vout_isr_err; | 601 | goto vout_isr_err; |
594 | break; | 602 | break; |
595 | case OMAP_DISPLAY_TYPE_VENC: | 603 | case OMAP_DISPLAY_TYPE_VENC: |