From patchwork Thu Jul 7 12:21:16 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Amber Jain X-Patchwork-Id: 7413 Return-path: Envelope-to: mchehab@infradead.org Delivery-date: Thu, 07 Jul 2011 12:52:47 -0300 Received: from mchehab by infradead.org with local (Exim 4.72) (envelope-from ) id 1Qeqsh-00067i-5m for mchehab@infradead.org; Thu, 07 Jul 2011 12:52:47 -0300 Received: from casper.infradead.org [85.118.1.10] by pedra with IMAP (fetchmail-6.3.17) for (single-drop); Thu, 07 Jul 2011 12:52:47 -0300 (BRT) Received: from merlin.infradead.org ([2001:4978:20e::2]) by casper.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QeqqP-0002um-84 for mchehab@casper.infradead.org; Thu, 07 Jul 2011 15:50:29 +0000 Received: from canuck.infradead.org ([2001:4978:20e::1]) by merlin.infradead.org with esmtps (Exim 4.76 #1 (Red Hat Linux)) id 1QenjK-0003An-CR; Thu, 07 Jul 2011 12:30:54 +0000 Received: from vger.kernel.org ([209.132.180.67]) by canuck.infradead.org with esmtp (Exim 4.76 #1 (Red Hat Linux)) id 1Qenif-0002IV-V8; Thu, 07 Jul 2011 12:30:14 +0000 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1756194Ab1GGMV1 (ORCPT + 1 other); Thu, 7 Jul 2011 08:21:27 -0400 Received: from bear.ext.ti.com ([192.94.94.41]:39487 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1755675Ab1GGMV0 (ORCPT ); Thu, 7 Jul 2011 08:21:26 -0400 Received: from dlep33.itg.ti.com ([157.170.170.112]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id p67CLQka028084 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO) for ; Thu, 7 Jul 2011 07:21:26 -0500 Received: from dlep26.itg.ti.com (smtp-le.itg.ti.com [157.170.170.27]) by dlep33.itg.ti.com (8.13.7/8.13.8) with ESMTP id p67CLQsb006856 for ; Thu, 7 Jul 2011 07:21:26 -0500 (CDT) Received: from dlee73.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id p67CLQI3007571 for ; Thu, 7 Jul 2011 07:21:26 -0500 (CDT) Received: from dlelxv24.itg.ti.com (172.17.1.199) by DLEE73.ent.ti.com (157.170.170.88) with Microsoft SMTP Server id 8.3.106.1; Thu, 7 Jul 2011 07:21:26 -0500 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv24.itg.ti.com (8.13.8/8.13.8) with ESMTP id p67CLQon008848; Thu, 7 Jul 2011 07:21:26 -0500 Received: from localhost (a0393674u.apr.dhcp.ti.com [172.24.137.179]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id p67CLOf14394; Thu, 7 Jul 2011 07:21:24 -0500 (CDT) From: Amber Jain To: CC: hvaibhav@ti.com, Amber Jain Subject: [PATCH v2 1/3] V4L2: OMAP: VOUT: isr handling extended for DPI and HDMI interface Date: Thu, 7 Jul 2011 17:51:16 +0530 Message-ID: <1310041278-8810-2-git-send-email-amber@ti.com> X-Mailer: git-send-email 1.7.1 In-Reply-To: <1310041278-8810-1-git-send-email-amber@ti.com> References: <1310041278-8810-1-git-send-email-amber@ti.com> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-CRM114-Version: 20090807-BlameThorstenAndJenny ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20110707_165025_646091_13E44DE3 X-CRM114-Status: GOOD ( 18.26 ) X-Spam-Score: 2.0 (++) X-Spam-Report: SpamAssassin version 3.3.2-r929478 on casper.infradead.org summary: Content analysis details: (2.0 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- 2.8 KB_DATE_CONTAINS_TAB KB_DATE_CONTAINS_TAB 1.2 TAB_IN_FROM From starts with a tab -1.9 BAYES_00 BODY: Bayes spam probability is 0 to 1% [score: 0.0000] Sender: Extending the omap vout isr handling for: - secondary lcd over DPI interface, - HDMI interface. These are the new interfaces added to OMAP4 DSS. Signed-off-by: Amber Jain --- Changes from v1: - updated commit message to mention that these changes are specifically for OMAP4. drivers/media/video/omap/omap_vout.c | 26 +++++++++++++++++++------- 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 343b50c..6cd3622 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) spin_lock(&vout->vbq_lock); do_gettimeofday(&timevalue); - if (cur_display->type == OMAP_DISPLAY_TYPE_DPI) { - if (!(irqstatus & DISPC_IRQ_VSYNC)) - goto vout_isr_err; + if (cur_display->type != OMAP_DISPLAY_TYPE_VENC) { + switch (cur_display->type) { + case OMAP_DISPLAY_TYPE_DPI: + if (!(irqstatus & (DISPC_IRQ_VSYNC | DISPC_IRQ_VSYNC2))) + goto vout_isr_err; + break; + case OMAP_DISPLAY_TYPE_HDMI: + if (!(irqstatus & DISPC_IRQ_EVSYNC_EVEN)) + goto vout_isr_err; + break; + default: + goto vout_isr_err; + } if (!vout->first_int && (vout->cur_frm != vout->next_frm)) { vout->cur_frm->ts = timevalue; vout->cur_frm->state = VIDEOBUF_DONE; @@ -573,7 +583,7 @@ static void omap_vout_isr(void *arg, unsigned int irqstatus) ret = omapvid_init(vout, addr); if (ret) printk(KERN_ERR VOUT_NAME - "failed to set overlay info\n"); + "failed to set overlay info\n"); /* Enable the pipeline and set the Go bit */ ret = omapvid_apply_changes(vout); if (ret) @@ -943,7 +953,7 @@ static int omap_vout_release(struct file *file) u32 mask = 0; mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | - DISPC_IRQ_EVSYNC_ODD; + DISPC_IRQ_EVSYNC_ODD | DISPC_IRQ_VSYNC2; omap_dispc_unregister_isr(omap_vout_isr, vout, mask); vout->streaming = 0; @@ -1614,7 +1624,8 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) addr = (unsigned long) vout->queued_buf_addr[vout->cur_frm->i] + vout->cropped_offset; - mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD; + mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD + | DISPC_IRQ_VSYNC2; omap_dispc_register_isr(omap_vout_isr, vout, mask); @@ -1664,7 +1675,8 @@ static int vidioc_streamoff(struct file *file, void *fh, enum v4l2_buf_type i) return -EINVAL; vout->streaming = 0; - mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD; + mask = DISPC_IRQ_VSYNC | DISPC_IRQ_EVSYNC_EVEN | DISPC_IRQ_EVSYNC_ODD + | DISPC_IRQ_VSYNC2; omap_dispc_unregister_isr(omap_vout_isr, vout, mask);