Message ID | 1331295117-489-1-git-send-email-hvaibhav@ti.com (mailing list archive) |
---|---|
State | RFC, archived |
Headers |
Received: from mail.tu-berlin.de ([130.149.7.33]) by www.linuxtv.org with esmtp (Exim 4.72) (envelope-from <linux-media-owner@vger.kernel.org>) id 1S5ygL-0005yt-F2 for patchwork@linuxtv.org; Fri, 09 Mar 2012 13:12:25 +0100 X-tubIT-Incoming-IP: 209.132.180.67 Received: from vger.kernel.org ([209.132.180.67]) by mail.tu-berlin.de (exim-4.75/mailfrontend-3) with esmtp for <patchwork@linuxtv.org> id 1S5ygL-00030s-Dt; Fri, 09 Mar 2012 13:12:25 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1753968Ab2CIMMV (ORCPT <rfc822;patchwork@linuxtv.org>); Fri, 9 Mar 2012 07:12:21 -0500 Received: from comal.ext.ti.com ([198.47.26.152]:36094 "EHLO comal.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1753074Ab2CIMMV (ORCPT <rfc822;linux-media@vger.kernel.org>); Fri, 9 Mar 2012 07:12:21 -0500 Received: from dbdp20.itg.ti.com ([172.24.170.38]) by comal.ext.ti.com (8.13.7/8.13.7) with ESMTP id q29CC8hb004020; Fri, 9 Mar 2012 06:12:08 -0600 Received: from DBDE71.ent.ti.com (localhost [127.0.0.1]) by dbdp20.itg.ti.com (8.13.8/8.13.8) with ESMTP id q29CC5HU012569; Fri, 9 Mar 2012 17:42:06 +0530 (IST) Received: from dbdp31.itg.ti.com (172.24.170.98) by DBDE71.ent.ti.com (172.24.170.149) with Microsoft SMTP Server id 14.1.323.3; Fri, 9 Mar 2012 17:42:05 +0530 Received: from localhost.localdomain (dbdp20.itg.ti.com [172.24.170.38]) by dbdp31.itg.ti.com (8.13.8/8.13.8) with ESMTP id q29CC2B1022033; Fri, 9 Mar 2012 17:42:03 +0530 (IST) From: Vaibhav Hiremath <hvaibhav@ti.com> To: <linux-media@vger.kernel.org> CC: <mchehab@infradead.org>, <archit@ti.com>, <laurent.pinchart@ideasonboard.com>, <linux-omap@vger.kernel.org>, Vaibhav Hiremath <hvaibhav@ti.com> Subject: [PATCH] omap_vout: Fix "DMA transaction error" issue when rotation is enabled Date: Fri, 9 Mar 2012 17:41:57 +0530 Message-ID: <1331295117-489-1-git-send-email-hvaibhav@ti.com> X-Mailer: git-send-email 1.7.0.4 MIME-Version: 1.0 Content-Type: text/plain Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: <linux-media.vger.kernel.org> X-Mailing-List: linux-media@vger.kernel.org X-PMX-Version: 5.6.1.2065439, Antispam-Engine: 2.7.2.376379, Antispam-Data: 2012.3.9.120032 X-PMX-Spam: Gauge=IIIIIIIII, Probability=9%, Report=' MULTIPLE_RCPTS 0.1, HTML_00_01 0.05, HTML_00_10 0.05, MSGID_ADDED_BY_MTA 0.05, BODYTEXTP_SIZE_3000_LESS 0, BODY_SIZE_1600_1699 0, BODY_SIZE_2000_LESS 0, BODY_SIZE_5000_LESS 0, BODY_SIZE_7000_LESS 0, __ANY_URI 0, __CP_MEDIA_BODY 0, __CP_URI_IN_BODY 0, __CT 0, __CT_TEXT_PLAIN 0, __HAS_MSGID 0, __HAS_X_MAILER 0, __HAS_X_MAILING_LIST 0, __MIME_TEXT_ONLY 0, __MIME_VERSION 0, __MULTIPLE_RCPTS_CC_X2 0, __SANE_MSGID 0, __SUBJ_ALPHA_END 0, __TO_MALFORMED_2 0, __TO_NO_NAME 0, __URI_NO_WWW 0, __URI_NS ' |
Commit Message
Hiremath, Vaibhav
March 9, 2012, 12:11 p.m. UTC
When rotation is enabled and driver is configured in USERPTR
buffer exchange mechanism, in specific use-case driver reports
an error,
"DMA transaction error with device 0".
In driver _buffer_prepare funtion, we were using
"vout->buf_phy_addr[vb->i]" for buffer physical address to
configure SDMA channel, but this variable does get updated
only during init.
And the issue will occur when driver allocates less number
of buffers during init and application requests more buffers
through REQBUF ioctl; this variable will lead to invalid
configuration of SDMA channel leading to DMA transaction error.
Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com>
---
Archit/Laurent,
Can you help me to validate this patch on your platform/usecase?
drivers/media/video/omap/omap_vout_vrfb.c | 2 +-
1 files changed, 1 insertions(+), 1 deletions(-)
--
1.7.0.4
--
To unsubscribe from this list: send the line "unsubscribe linux-media" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Comments
Hi Vaibhav, On Friday 09 March 2012 17:41:57 Vaibhav Hiremath wrote: > When rotation is enabled and driver is configured in USERPTR > buffer exchange mechanism, in specific use-case driver reports > an error, > "DMA transaction error with device 0". > > In driver _buffer_prepare funtion, we were using > "vout->buf_phy_addr[vb->i]" for buffer physical address to > configure SDMA channel, but this variable does get updated > only during init. > And the issue will occur when driver allocates less number > of buffers during init and application requests more buffers > through REQBUF ioctl; this variable will lead to invalid > configuration of SDMA channel leading to DMA transaction error. > > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> > --- > Archit/Laurent, > Can you help me to validate this patch on your platform/usecase? I've tested the patch by rotating the omap_vout overlay by 90 degrees and starting a video stream with 4 buffers. There's no crash, but the kernel prints [77.877807] omapdss DISPC error: FIFO UNDERFLOW on gfx, disabling the overlay [77.928344] omapdss DISPC error: FIFO UNDERFLOW on vid1, disabling the overlay The same problem occurs with 3 buffers, which is what the omap_vout driver allocates by default. Without your patch applied I get the same behaviour. Is my test procedure wrong ? > drivers/media/video/omap/omap_vout_vrfb.c | 2 +- > 1 files changed, 1 insertions(+), 1 deletions(-) > > diff --git a/drivers/media/video/omap/omap_vout_vrfb.c > b/drivers/media/video/omap/omap_vout_vrfb.c index 4be26ab..240d36d 100644 > --- a/drivers/media/video/omap/omap_vout_vrfb.c > +++ b/drivers/media/video/omap/omap_vout_vrfb.c > @@ -225,7 +225,7 @@ int omap_vout_prepare_vrfb(struct omap_vout_device > *vout, if (!is_rotation_enabled(vout)) > return 0; > > - dmabuf = vout->buf_phy_addr[vb->i]; > + dmabuf = (dma_addr_t) vout->queued_buf_addr[vb->i]; > /* If rotation is enabled, copy input buffer into VRFB > * memory space using DMA. We are copying input buffer > * into VRFB memory space of desired angle and DSS will
On Wed, Mar 14, 2012 at 21:00:25, Laurent Pinchart wrote: > Hi Vaibhav, > > On Friday 09 March 2012 17:41:57 Vaibhav Hiremath wrote: > > When rotation is enabled and driver is configured in USERPTR > > buffer exchange mechanism, in specific use-case driver reports > > an error, > > "DMA transaction error with device 0". > > > > In driver _buffer_prepare funtion, we were using > > "vout->buf_phy_addr[vb->i]" for buffer physical address to > > configure SDMA channel, but this variable does get updated > > only during init. > > And the issue will occur when driver allocates less number > > of buffers during init and application requests more buffers > > through REQBUF ioctl; this variable will lead to invalid > > configuration of SDMA channel leading to DMA transaction error. > > > > Signed-off-by: Vaibhav Hiremath <hvaibhav@ti.com> > > --- > > Archit/Laurent, > > Can you help me to validate this patch on your platform/usecase? > > I've tested the patch by rotating the omap_vout overlay by 90 degrees and > starting a video stream with 4 buffers. There's no crash, but the kernel > prints > > [77.877807] omapdss DISPC error: FIFO UNDERFLOW on gfx, disabling the overlay > [77.928344] omapdss DISPC error: FIFO UNDERFLOW on vid1, disabling the overlay > > The same problem occurs with 3 buffers, which is what the omap_vout driver > allocates by default. > > Without your patch applied I get the same behaviour. Is my test procedure > wrong ? > Laurent, Thanks for testing, the procedure looks ok to me. I need to look into this issue (need to debug). Thanks, Vaibhav > > drivers/media/video/omap/omap_vout_vrfb.c | 2 +- > > 1 files changed, 1 insertions(+), 1 deletions(-) > > > > diff --git a/drivers/media/video/omap/omap_vout_vrfb.c > > b/drivers/media/video/omap/omap_vout_vrfb.c index 4be26ab..240d36d 100644 > > --- a/drivers/media/video/omap/omap_vout_vrfb.c > > +++ b/drivers/media/video/omap/omap_vout_vrfb.c > > @@ -225,7 +225,7 @@ int omap_vout_prepare_vrfb(struct omap_vout_device > > *vout, if (!is_rotation_enabled(vout)) > > return 0; > > > > - dmabuf = vout->buf_phy_addr[vb->i]; > > + dmabuf = (dma_addr_t) vout->queued_buf_addr[vb->i]; > > /* If rotation is enabled, copy input buffer into VRFB > > * memory space using DMA. We are copying input buffer > > * into VRFB memory space of desired angle and DSS will > > -- > Regards, > > Laurent Pinchart > > -- To unsubscribe from this list: send the line "unsubscribe linux-media" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
diff --git a/drivers/media/video/omap/omap_vout_vrfb.c b/drivers/media/video/omap/omap_vout_vrfb.c index 4be26ab..240d36d 100644 --- a/drivers/media/video/omap/omap_vout_vrfb.c +++ b/drivers/media/video/omap/omap_vout_vrfb.c @@ -225,7 +225,7 @@ int omap_vout_prepare_vrfb(struct omap_vout_device *vout, if (!is_rotation_enabled(vout)) return 0; - dmabuf = vout->buf_phy_addr[vb->i]; + dmabuf = (dma_addr_t) vout->queued_buf_addr[vb->i]; /* If rotation is enabled, copy input buffer into VRFB * memory space using DMA. We are copying input buffer * into VRFB memory space of desired angle and DSS will