aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/media
diff options
context:
space:
mode:
authorAmber Jain <amber@ti.com>2011-06-02 01:30:10 -0400
committerMauro Carvalho Chehab <mchehab@redhat.com>2011-07-27 16:56:06 -0400
commit5251dd6c07ad4a921c1cf40d9bf41f842364f936 (patch)
tree0fc2032c546cbae963ea2b3263afd0a94cd1bd15 /drivers/media
parent445e258fa286cb83818b731ef4075a8cc183f2f3 (diff)
[media] V4L2: OMAP: VOUT: isr handling extended for DPI and HDMI interface
Extending the omap vout isr handling for: - HDMI interface. These are the new interfaces added to OMAP4 DSS. Signed-off-by: Amber Jain <amber@ti.com> Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> Signed-off-by: Mauro Carvalho Chehab <mchehab@redhat.com>
Diffstat (limited to 'drivers/media')
-rw-r--r--drivers/media/video/omap/omap_vout.c26
1 files changed, 19 insertions, 7 deletions
diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c
index 56b22b9356a..d6cdf6fda4d 100644
--- a/drivers/media/video/omap/omap_vout.c
+++ b/drivers/media/video/omap/omap_vout.c
@@ -546,10 +546,20 @@ static void omap_vout_isr(void *arg, unsigned int irqstatus)
546 546
547 spin_lock(&vout->vbq_lock); 547 spin_lock(&vout->vbq_lock);
548 do_gettimeofday(&timevalue); 548 do_gettimeofday(&timevalue);
549 if (cur_display->type == OMAP_DISPLAY_TYPE_DPI) {
550 if (!(irqstatus & DISPC_IRQ_VSYNC))
551 goto vout_isr_err;
552 549
550 if (cur_display->type != OMAP_DISPLAY_TYPE_VENC) {
551 switch (cur_display->type) {
552 case OMAP_DISPLAY_TYPE_DPI:
553 if (!(irqstatus & (DISPC_IRQ_VSYNC | DISPC_IRQ_VSYNC2)))
554 goto vout_isr_err;
555 break;
556 case OMAP_DISPLAY_TYPE_HDMI:
557 if (!(irqstatus & DISPC_IRQ_EVSYNC_EVEN))
558 goto vout_isr_err;
559 break;
560 default:
561 goto vout_isr_err;
562 }
553 if (!vout->first_int && (vout->cur_frm != vout->next_frm)) { 563 if (!vout->first_int && (vout->cur_frm != vout->next_frm)) {
554 vout->cur_frm->ts = timevalue; 564 vout->cur_frm->ts = timevalue;
555 vout->cur_frm->state = VIDEOBUF_DONE; 565 vout->cur_frm->state = VIDEOBUF_DONE;
@@ -573,7 +583,7 @@ static void omap_vout_isr(void *arg, unsigned int irqstatus)
573 ret = omapvid_init(vout, addr); 583 ret = omapvid_init(vout, addr);
574 if (ret) 584 if (ret)
575 printk(KERN_ERR VOUT_NAME 585 printk(KERN_ERR VOUT_NAME
576 "failed to set overlay info\n"); 586 "failed to set overlay info\n");
577 /* Enable the pipeline and set the Go bit */ 587 /* Enable the pipeline and set the Go bit */
578 ret = omapvid_apply_changes(vout); 588 ret = omapvid_apply_changes(vout);
579 if (ret) 589 if (ret)
@@ -943,7 +953,7 @@ static int omap_vout_release(struct file *file)
943 u32 mask = 0; 953 u32 mask = 0;
944 954
945 mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | 955 mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN |
946 DISPC_IRQ_EVSYNC_ODD; 956 DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_VSYNC2;
947 omap_dispc_unregister_isr(omap_vout_isr, vout, mask); 957 omap_dispc_unregister_isr(omap_vout_isr, vout, mask);
948 vout->streaming = 0; 958 vout->streaming = 0;
949 959
@@ -1614,7 +1624,8 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i)
1614 addr = (unsigned long) vout->queued_buf_addr[vout->cur_frm->i] 1624 addr = (unsigned long) vout->queued_buf_addr[vout->cur_frm->i]
1615 + vout->cropped_offset; 1625 + vout->cropped_offset;
1616 1626
1617 mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD; 1627 mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD
1628 | DISPC_IRQ_VSYNC2;
1618 1629
1619 omap_dispc_register_isr(omap_vout_isr, vout, mask); 1630 omap_dispc_register_isr(omap_vout_isr, vout, mask);
1620 1631
@@ -1664,7 +1675,8 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i)
1664 return -EINVAL; 1675 return -EINVAL;
1665 1676
1666 vout->streaming = 0; 1677 vout->streaming = 0;
1667 mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD; 1678 mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD
1679 | DISPC_IRQ_VSYNC2;
1668 1680
1669 omap_dispc_unregister_isr(omap_vout_isr, vout, mask); 1681 omap_dispc_unregister_isr(omap_vout_isr, vout, mask);
1670 1682