Message ID | 1331110876-11895-1-git-send-email-archit@ti.com (mailing list archive) |
---|---|
State | Accepted, 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 1S5Cl5-0002ro-RM for patchwork@linuxtv.org; Wed, 07 Mar 2012 10:02:07 +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-2) with esmtp for <patchwork@linuxtv.org> id 1S5Cl1-00039G-IF; Wed, 07 Mar 2012 10:02:06 +0100 Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1751826Ab2CGJBi (ORCPT <rfc822;patchwork@linuxtv.org>); Wed, 7 Mar 2012 04:01:38 -0500 Received: from bear.ext.ti.com ([192.94.94.41]:54460 "EHLO bear.ext.ti.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751241Ab2CGJBh (ORCPT <rfc822;linux-media@vger.kernel.org>); Wed, 7 Mar 2012 04:01:37 -0500 Received: from dlep26.itg.ti.com ([157.170.170.121]) by bear.ext.ti.com (8.13.7/8.13.7) with ESMTP id q2791ata021848; Wed, 7 Mar 2012 03:01:37 -0600 Received: from DLEE74.ent.ti.com (localhost [127.0.0.1]) by dlep26.itg.ti.com (8.13.8/8.13.8) with ESMTP id q2791awh004923; Wed, 7 Mar 2012 03:01:36 -0600 (CST) Received: from dlelxv23.itg.ti.com (172.17.1.198) by DLEE74.ent.ti.com (157.170.170.8) with Microsoft SMTP Server id 14.1.323.3; Wed, 7 Mar 2012 03:01:36 -0600 Received: from legion.dal.design.ti.com (legion.dal.design.ti.com [128.247.22.53]) by dlelxv23.itg.ti.com (8.13.8/8.13.8) with ESMTP id q2791a7K007389; Wed, 7 Mar 2012 03:01:36 -0600 Received: from localhost (a0393947pc.apr.dhcp.ti.com [172.24.137.216]) by legion.dal.design.ti.com (8.11.7p1+Sun/8.11.7) with ESMTP id q2791YW27408; Wed, 7 Mar 2012 03:01:34 -0600 (CST) From: Archit Taneja <archit@ti.com> To: <hvaibhav@ti.com> CC: <tomi.valkeinen@ti.com>, <linux-omap@vger.kernel.org>, <linux-media@vger.kernel.org>, Archit Taneja <archit@ti.com> Subject: [PATCH] omap_vout: Set DSS overlay_info only if paddr is non zero Date: Wed, 7 Mar 2012 14:31:16 +0530 Message-ID: <1331110876-11895-1-git-send-email-archit@ti.com> X-Mailer: git-send-email 1.7.5.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.7.85115 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, BODY_SIZE_3000_3999 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
Archit Taneja
March 7, 2012, 9:01 a.m. UTC
The omap_vout driver tries to set the DSS overlay_info using set_overlay_info()
when the physical address for the overlay is still not configured. This happens
in omap_vout_probe() and vidioc_s_fmt_vid_out().
The calls to omapvid_init(which internally calls set_overlay_info()) are removed
from these functions. They don't need to be called as the omap_vout_device
struct anyway maintains the overlay related changes made. Also, remove the
explicit call to set_overlay_info() in vidioc_streamon(), this was used to set
the paddr, this isn't needed as omapvid_init() does the same thing later.
These changes are required as the DSS2 driver since 3.3 kernel doesn't let you
set the overlay info with paddr as 0.
Signed-off-by: Archit Taneja <archit@ti.com>
---
drivers/media/video/omap/omap_vout.c | 36 ++++-----------------------------
1 files changed, 5 insertions(+), 31 deletions(-)
Comments
Hi Archit, On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote: > The omap_vout driver tries to set the DSS overlay_info using > set_overlay_info() when the physical address for the overlay is still not > configured. This happens in omap_vout_probe() and vidioc_s_fmt_vid_out(). > > The calls to omapvid_init(which internally calls set_overlay_info()) are > removed from these functions. They don't need to be called as the > omap_vout_device struct anyway maintains the overlay related changes made. > Also, remove the explicit call to set_overlay_info() in vidioc_streamon(), > this was used to set the paddr, this isn't needed as omapvid_init() does > the same thing later. > > These changes are required as the DSS2 driver since 3.3 kernel doesn't let > you set the overlay info with paddr as 0. > > Signed-off-by: Archit Taneja <archit@ti.com> Thanks for the patch. This seems to fix memory corruption that would result in sysfs-related crashes such as [ 31.279541] ------------[ cut here ]------------ [ 31.284423] WARNING: at fs/sysfs/file.c:343 sysfs_open_file+0x70/0x1f8() [ 31.291503] missing sysfs attribute operations for kobject: (null) [ 31.298004] Modules linked in: mt9p031 aptina_pll omap3_isp [ 31.303924] [<c0018260>] (unwind_backtrace+0x0/0xec) from [<c0034488>] (warn_slowpath_common+0x4c/0x64) [ 31.313812] [<c0034488>] (warn_slowpath_common+0x4c/0x64) from [<c0034520>] (warn_slowpath_fmt+0x2c/0x3c) [ 31.323913] [<c0034520>] (warn_slowpath_fmt+0x2c/0x3c) from [<c01219bc>] (sysfs_open_file+0x70/0x1f8) [ 31.333618] [<c01219bc>] (sysfs_open_file+0x70/0x1f8) from [<c00ccc94>] (__dentry_open+0x1f8/0x30c) [ 31.343139] [<c00ccc94>] (__dentry_open+0x1f8/0x30c) from [<c00cce58>] (nameidata_to_filp+0x50/0x5c) [ 31.352752] [<c00cce58>] (nameidata_to_filp+0x50/0x5c) from [<c00db4c0>] (do_last+0x55c/0x6a0) [ 31.361999] [<c00db4c0>] (do_last+0x55c/0x6a0) from [<c00db6bc>] (path_openat+0xb8/0x37c) [ 31.370605] [<c00db6bc>] (path_openat+0xb8/0x37c) from [<c00dba60>] (do_filp_open+0x30/0x7c) [ 31.379486] [<c00dba60>] (do_filp_open+0x30/0x7c) from [<c00cc904>] (do_sys_open+0xd8/0x170) [ 31.388366] [<c00cc904>] (do_sys_open+0xd8/0x170) from [<c0012760>] (ret_fast_syscall+0x0/0x3c) [ 31.397552] ---[ end trace 13639ab74f345d7e ]--- Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> Please push it to v3.3 :-)
On Fri, Mar 09, 2012 at 05:17:41, Laurent Pinchart wrote: > Hi Archit, > > On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote: > > The omap_vout driver tries to set the DSS overlay_info using > > set_overlay_info() when the physical address for the overlay is still not > > configured. This happens in omap_vout_probe() and vidioc_s_fmt_vid_out(). > > > > The calls to omapvid_init(which internally calls set_overlay_info()) are > > removed from these functions. They don't need to be called as the > > omap_vout_device struct anyway maintains the overlay related changes made. > > Also, remove the explicit call to set_overlay_info() in vidioc_streamon(), > > this was used to set the paddr, this isn't needed as omapvid_init() does > > the same thing later. > > > > These changes are required as the DSS2 driver since 3.3 kernel doesn't let > > you set the overlay info with paddr as 0. > > > > Signed-off-by: Archit Taneja <archit@ti.com> > > Thanks for the patch. This seems to fix memory corruption that would result > in sysfs-related crashes such as > > [ 31.279541] ------------[ cut here ]------------ > [ 31.284423] WARNING: at fs/sysfs/file.c:343 sysfs_open_file+0x70/0x1f8() > [ 31.291503] missing sysfs attribute operations for kobject: (null) > [ 31.298004] Modules linked in: mt9p031 aptina_pll omap3_isp > [ 31.303924] [<c0018260>] (unwind_backtrace+0x0/0xec) from [<c0034488>] (warn_slowpath_common+0x4c/0x64) > [ 31.313812] [<c0034488>] (warn_slowpath_common+0x4c/0x64) from [<c0034520>] (warn_slowpath_fmt+0x2c/0x3c) > [ 31.323913] [<c0034520>] (warn_slowpath_fmt+0x2c/0x3c) from [<c01219bc>] (sysfs_open_file+0x70/0x1f8) > [ 31.333618] [<c01219bc>] (sysfs_open_file+0x70/0x1f8) from [<c00ccc94>] (__dentry_open+0x1f8/0x30c) > [ 31.343139] [<c00ccc94>] (__dentry_open+0x1f8/0x30c) from [<c00cce58>] (nameidata_to_filp+0x50/0x5c) > [ 31.352752] [<c00cce58>] (nameidata_to_filp+0x50/0x5c) from [<c00db4c0>] (do_last+0x55c/0x6a0) > [ 31.361999] [<c00db4c0>] (do_last+0x55c/0x6a0) from [<c00db6bc>] (path_openat+0xb8/0x37c) > [ 31.370605] [<c00db6bc>] (path_openat+0xb8/0x37c) from [<c00dba60>] (do_filp_open+0x30/0x7c) > [ 31.379486] [<c00dba60>] (do_filp_open+0x30/0x7c) from [<c00cc904>] (do_sys_open+0xd8/0x170) > [ 31.388366] [<c00cc904>] (do_sys_open+0xd8/0x170) from [<c0012760>] (ret_fast_syscall+0x0/0x3c) > [ 31.397552] ---[ end trace 13639ab74f345d7e ]--- > > Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > Thanks Laurent for testing this patch. > Please push it to v3.3 :-) > Will send a pull request today itself. Thanks, Vaibhav > -- > 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
On Wed, Mar 07, 2012 at 14:31:16, Taneja, Archit wrote: > The omap_vout driver tries to set the DSS overlay_info using set_overlay_info() > when the physical address for the overlay is still not configured. This happens > in omap_vout_probe() and vidioc_s_fmt_vid_out(). > > The calls to omapvid_init(which internally calls set_overlay_info()) are removed > from these functions. They don't need to be called as the omap_vout_device > struct anyway maintains the overlay related changes made. Also, remove the > explicit call to set_overlay_info() in vidioc_streamon(), this was used to set > the paddr, this isn't needed as omapvid_init() does the same thing later. > > These changes are required as the DSS2 driver since 3.3 kernel doesn't let you > set the overlay info with paddr as 0. > > Signed-off-by: Archit Taneja <archit@ti.com> > --- > drivers/media/video/omap/omap_vout.c | 36 ++++----------------------------- > 1 files changed, 5 insertions(+), 31 deletions(-) > > diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c > index 1fb7d5b..dffcf66 100644 > --- a/drivers/media/video/omap/omap_vout.c > +++ b/drivers/media/video/omap/omap_vout.c > @@ -1157,13 +1157,6 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh, > /* set default crop and win */ > omap_vout_new_format(&vout->pix, &vout->fbuf, &vout->crop, &vout->win); > > - /* Save the changes in the overlay strcuture */ > - ret = omapvid_init(vout, 0); > - if (ret) { > - v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); > - goto s_fmt_vid_out_exit; > - } > - > ret = 0; > > s_fmt_vid_out_exit: > @@ -1664,20 +1657,6 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) > > omap_dispc_register_isr(omap_vout_isr, vout, mask); > > - for (j = 0; j < ovid->num_overlays; j++) { > - struct omap_overlay *ovl = ovid->overlays[j]; > - > - if (ovl->manager && ovl->manager->device) { > - struct omap_overlay_info info; > - ovl->get_overlay_info(ovl, &info); > - info.paddr = addr; > - if (ovl->set_overlay_info(ovl, &info)) { > - ret = -EINVAL; > - goto streamon_err1; > - } > - } > - } > - Have you checked for build warnings? I am getting build warnings CC drivers/media/video/omap/omap_vout.o CC drivers/media/video/omap/omap_voutlib.o CC drivers/media/video/omap/omap_vout_vrfb.o drivers/media/video/omap/omap_vout.c: In function 'vidioc_streamon': drivers/media/video/omap/omap_vout.c:1619:25: warning: unused variable 'ovid' drivers/media/video/omap/omap_vout.c:1615:15: warning: unused variable 'j' LD drivers/media/video/omap/omap-vout.o LD drivers/media/video/omap/built-in.o Can you fix this and submit the next version? Thanks, Vaibhav > /* First save the configuration in ovelray structure */ > ret = omapvid_init(vout, addr); > if (ret) > @@ -2071,11 +2050,12 @@ static int __init omap_vout_create_video_devices(struct platform_device *pdev) > } > video_set_drvdata(vfd, vout); > > - /* Configure the overlay structure */ > - ret = omapvid_init(vid_dev->vouts[k], 0); > - if (!ret) > - goto success; > + dev_info(&pdev->dev, ": registered and initialized" > + " video device %d\n", vfd->minor); > + if (k == (pdev->num_resources - 1)) > + return 0; > > + continue; > error2: > if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) > omap_vout_release_vrfb(vout); > @@ -2085,12 +2065,6 @@ error1: > error: > kfree(vout); > return ret; > - > -success: > - dev_info(&pdev->dev, ": registered and initialized" > - " video device %d\n", vfd->minor); > - if (k == (pdev->num_resources - 1)) > - return 0; > } > > return -ENODEV; > -- > 1.7.5.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
On Monday 12 March 2012 03:34 PM, Hiremath, Vaibhav wrote: > On Wed, Mar 07, 2012 at 14:31:16, Taneja, Archit wrote: >> The omap_vout driver tries to set the DSS overlay_info using set_overlay_info() >> when the physical address for the overlay is still not configured. This happens >> in omap_vout_probe() and vidioc_s_fmt_vid_out(). >> >> The calls to omapvid_init(which internally calls set_overlay_info()) are removed >> from these functions. They don't need to be called as the omap_vout_device >> struct anyway maintains the overlay related changes made. Also, remove the >> explicit call to set_overlay_info() in vidioc_streamon(), this was used to set >> the paddr, this isn't needed as omapvid_init() does the same thing later. >> >> These changes are required as the DSS2 driver since 3.3 kernel doesn't let you >> set the overlay info with paddr as 0. >> >> Signed-off-by: Archit Taneja<archit@ti.com> >> --- >> drivers/media/video/omap/omap_vout.c | 36 ++++----------------------------- >> 1 files changed, 5 insertions(+), 31 deletions(-) >> >> diff --git a/drivers/media/video/omap/omap_vout.c b/drivers/media/video/omap/omap_vout.c >> index 1fb7d5b..dffcf66 100644 >> --- a/drivers/media/video/omap/omap_vout.c >> +++ b/drivers/media/video/omap/omap_vout.c >> @@ -1157,13 +1157,6 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh, >> /* set default crop and win */ >> omap_vout_new_format(&vout->pix,&vout->fbuf,&vout->crop,&vout->win); >> >> - /* Save the changes in the overlay strcuture */ >> - ret = omapvid_init(vout, 0); >> - if (ret) { >> - v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); >> - goto s_fmt_vid_out_exit; >> - } >> - >> ret = 0; >> >> s_fmt_vid_out_exit: >> @@ -1664,20 +1657,6 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) >> >> omap_dispc_register_isr(omap_vout_isr, vout, mask); >> >> - for (j = 0; j< ovid->num_overlays; j++) { >> - struct omap_overlay *ovl = ovid->overlays[j]; >> - >> - if (ovl->manager&& ovl->manager->device) { >> - struct omap_overlay_info info; >> - ovl->get_overlay_info(ovl,&info); >> - info.paddr = addr; >> - if (ovl->set_overlay_info(ovl,&info)) { >> - ret = -EINVAL; >> - goto streamon_err1; >> - } >> - } >> - } >> - > > Have you checked for build warnings? I am getting build warnings > > CC drivers/media/video/omap/omap_vout.o > CC drivers/media/video/omap/omap_voutlib.o > CC drivers/media/video/omap/omap_vout_vrfb.o > drivers/media/video/omap/omap_vout.c: In function 'vidioc_streamon': > drivers/media/video/omap/omap_vout.c:1619:25: warning: unused variable 'ovid' > drivers/media/video/omap/omap_vout.c:1615:15: warning: unused variable 'j' > LD drivers/media/video/omap/omap-vout.o > LD drivers/media/video/omap/built-in.o > > Can you fix this and submit the next version? Will fix this and submit. Archit > > Thanks, > Vaibhav > >> /* First save the configuration in ovelray structure */ >> ret = omapvid_init(vout, addr); >> if (ret) >> @@ -2071,11 +2050,12 @@ static int __init omap_vout_create_video_devices(struct platform_device *pdev) >> } >> video_set_drvdata(vfd, vout); >> >> - /* Configure the overlay structure */ >> - ret = omapvid_init(vid_dev->vouts[k], 0); >> - if (!ret) >> - goto success; >> + dev_info(&pdev->dev, ": registered and initialized" >> + " video device %d\n", vfd->minor); >> + if (k == (pdev->num_resources - 1)) >> + return 0; >> >> + continue; >> error2: >> if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) >> omap_vout_release_vrfb(vout); >> @@ -2085,12 +2065,6 @@ error1: >> error: >> kfree(vout); >> return ret; >> - >> -success: >> - dev_info(&pdev->dev, ": registered and initialized" >> - " video device %d\n", vfd->minor); >> - if (k == (pdev->num_resources - 1)) >> - return 0; >> } >> >> return -ENODEV; >> -- >> 1.7.5.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
Hi, On Friday 16 March 2012 03:46 PM, Archit Taneja wrote: > On Monday 12 March 2012 03:34 PM, Hiremath, Vaibhav wrote: >> On Wed, Mar 07, 2012 at 14:31:16, Taneja, Archit wrote: >>> The omap_vout driver tries to set the DSS overlay_info using >>> set_overlay_info() >>> when the physical address for the overlay is still not configured. >>> This happens >>> in omap_vout_probe() and vidioc_s_fmt_vid_out(). >>> >>> The calls to omapvid_init(which internally calls set_overlay_info()) >>> are removed >>> from these functions. They don't need to be called as the >>> omap_vout_device >>> struct anyway maintains the overlay related changes made. Also, >>> remove the >>> explicit call to set_overlay_info() in vidioc_streamon(), this was >>> used to set >>> the paddr, this isn't needed as omapvid_init() does the same thing >>> later. >>> >>> These changes are required as the DSS2 driver since 3.3 kernel >>> doesn't let you >>> set the overlay info with paddr as 0. >>> >>> Signed-off-by: Archit Taneja<archit@ti.com> >>> --- >>> drivers/media/video/omap/omap_vout.c | 36 >>> ++++----------------------------- >>> 1 files changed, 5 insertions(+), 31 deletions(-) >>> >>> diff --git a/drivers/media/video/omap/omap_vout.c >>> b/drivers/media/video/omap/omap_vout.c >>> index 1fb7d5b..dffcf66 100644 >>> --- a/drivers/media/video/omap/omap_vout.c >>> +++ b/drivers/media/video/omap/omap_vout.c >>> @@ -1157,13 +1157,6 @@ static int vidioc_s_fmt_vid_out(struct file >>> *file, void *fh, >>> /* set default crop and win */ >>> omap_vout_new_format(&vout->pix,&vout->fbuf,&vout->crop,&vout->win); >>> >>> - /* Save the changes in the overlay strcuture */ >>> - ret = omapvid_init(vout, 0); >>> - if (ret) { >>> - v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); >>> - goto s_fmt_vid_out_exit; >>> - } >>> - >>> ret = 0; >>> >>> s_fmt_vid_out_exit: >>> @@ -1664,20 +1657,6 @@ static int vidioc_streamon(struct file *file, >>> void *fh, enum v4l2_buf_type i) >>> >>> omap_dispc_register_isr(omap_vout_isr, vout, mask); >>> >>> - for (j = 0; j< ovid->num_overlays; j++) { >>> - struct omap_overlay *ovl = ovid->overlays[j]; >>> - >>> - if (ovl->manager&& ovl->manager->device) { >>> - struct omap_overlay_info info; >>> - ovl->get_overlay_info(ovl,&info); >>> - info.paddr = addr; >>> - if (ovl->set_overlay_info(ovl,&info)) { >>> - ret = -EINVAL; >>> - goto streamon_err1; >>> - } >>> - } >>> - } >>> - >> >> Have you checked for build warnings? I am getting build warnings >> >> CC drivers/media/video/omap/omap_vout.o >> CC drivers/media/video/omap/omap_voutlib.o >> CC drivers/media/video/omap/omap_vout_vrfb.o >> drivers/media/video/omap/omap_vout.c: In function 'vidioc_streamon': >> drivers/media/video/omap/omap_vout.c:1619:25: warning: unused variable >> 'ovid' >> drivers/media/video/omap/omap_vout.c:1615:15: warning: unused variable >> 'j' >> LD drivers/media/video/omap/omap-vout.o >> LD drivers/media/video/omap/built-in.o >> >> Can you fix this and submit the next version? I applied the patch on the current mainline kernel, it doesn't give any build warnings. Even after applying the patch, 'j and ovid' are still used in vidioc_streamon(). Can you check if it was applied correctly? Regards, Archit > > Will fix this and submit. > > Archit > >> >> Thanks, >> Vaibhav >> >>> /* First save the configuration in ovelray structure */ >>> ret = omapvid_init(vout, addr); >>> if (ret) >>> @@ -2071,11 +2050,12 @@ static int __init >>> omap_vout_create_video_devices(struct platform_device *pdev) >>> } >>> video_set_drvdata(vfd, vout); >>> >>> - /* Configure the overlay structure */ >>> - ret = omapvid_init(vid_dev->vouts[k], 0); >>> - if (!ret) >>> - goto success; >>> + dev_info(&pdev->dev, ": registered and initialized" >>> + " video device %d\n", vfd->minor); >>> + if (k == (pdev->num_resources - 1)) >>> + return 0; >>> >>> + continue; >>> error2: >>> if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) >>> omap_vout_release_vrfb(vout); >>> @@ -2085,12 +2065,6 @@ error1: >>> error: >>> kfree(vout); >>> return ret; >>> - >>> -success: >>> - dev_info(&pdev->dev, ": registered and initialized" >>> - " video device %d\n", vfd->minor); >>> - if (k == (pdev->num_resources - 1)) >>> - return 0; >>> } >>> >>> return -ENODEV; >>> -- >>> 1.7.5.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
On Fri, Mar 16, 2012 at 16:41:27, Taneja, Archit wrote: > Hi, > > On Friday 16 March 2012 03:46 PM, Archit Taneja wrote: > > On Monday 12 March 2012 03:34 PM, Hiremath, Vaibhav wrote: > >> On Wed, Mar 07, 2012 at 14:31:16, Taneja, Archit wrote: > >>> The omap_vout driver tries to set the DSS overlay_info using > >>> set_overlay_info() > >>> when the physical address for the overlay is still not configured. > >>> This happens > >>> in omap_vout_probe() and vidioc_s_fmt_vid_out(). > >>> > >>> The calls to omapvid_init(which internally calls set_overlay_info()) > >>> are removed > >>> from these functions. They don't need to be called as the > >>> omap_vout_device > >>> struct anyway maintains the overlay related changes made. Also, > >>> remove the > >>> explicit call to set_overlay_info() in vidioc_streamon(), this was > >>> used to set > >>> the paddr, this isn't needed as omapvid_init() does the same thing > >>> later. > >>> > >>> These changes are required as the DSS2 driver since 3.3 kernel > >>> doesn't let you > >>> set the overlay info with paddr as 0. > >>> > >>> Signed-off-by: Archit Taneja<archit@ti.com> > >>> --- > >>> drivers/media/video/omap/omap_vout.c | 36 > >>> ++++----------------------------- > >>> 1 files changed, 5 insertions(+), 31 deletions(-) > >>> > >>> diff --git a/drivers/media/video/omap/omap_vout.c > >>> b/drivers/media/video/omap/omap_vout.c > >>> index 1fb7d5b..dffcf66 100644 > >>> --- a/drivers/media/video/omap/omap_vout.c > >>> +++ b/drivers/media/video/omap/omap_vout.c > >>> @@ -1157,13 +1157,6 @@ static int vidioc_s_fmt_vid_out(struct file > >>> *file, void *fh, > >>> /* set default crop and win */ > >>> omap_vout_new_format(&vout->pix,&vout->fbuf,&vout->crop,&vout->win); > >>> > >>> - /* Save the changes in the overlay strcuture */ > >>> - ret = omapvid_init(vout, 0); > >>> - if (ret) { > >>> - v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); > >>> - goto s_fmt_vid_out_exit; > >>> - } > >>> - > >>> ret = 0; > >>> > >>> s_fmt_vid_out_exit: > >>> @@ -1664,20 +1657,6 @@ static int vidioc_streamon(struct file *file, > >>> void *fh, enum v4l2_buf_type i) > >>> > >>> omap_dispc_register_isr(omap_vout_isr, vout, mask); > >>> > >>> - for (j = 0; j< ovid->num_overlays; j++) { > >>> - struct omap_overlay *ovl = ovid->overlays[j]; > >>> - > >>> - if (ovl->manager&& ovl->manager->device) { > >>> - struct omap_overlay_info info; > >>> - ovl->get_overlay_info(ovl,&info); > >>> - info.paddr = addr; > >>> - if (ovl->set_overlay_info(ovl,&info)) { > >>> - ret = -EINVAL; > >>> - goto streamon_err1; > >>> - } > >>> - } > >>> - } > >>> - > >> > >> Have you checked for build warnings? I am getting build warnings > >> > >> CC drivers/media/video/omap/omap_vout.o > >> CC drivers/media/video/omap/omap_voutlib.o > >> CC drivers/media/video/omap/omap_vout_vrfb.o > >> drivers/media/video/omap/omap_vout.c: In function 'vidioc_streamon': > >> drivers/media/video/omap/omap_vout.c:1619:25: warning: unused variable > >> 'ovid' > >> drivers/media/video/omap/omap_vout.c:1615:15: warning: unused variable > >> 'j' > >> LD drivers/media/video/omap/omap-vout.o > >> LD drivers/media/video/omap/built-in.o > >> > >> Can you fix this and submit the next version? > > I applied the patch on the current mainline kernel, it doesn't give any > build warnings. Even after applying the patch, 'j and ovid' are still > used in vidioc_streamon(). > > Can you check if it was applied correctly? > Archit, I could able to trace what's going on here, I am using "v4l_for_linus" branch, which has one missing patch, commit aaa874a985158383c4b394c687c716ef26288741 Author: Tomi Valkeinen <tomi.valkeinen@ti.com> Date: Tue Nov 15 16:37:53 2011 +0200 OMAPDSS: APPLY: rewrite overlay enable/disable So, I do not have below changes, @@ -1686,6 +1681,16 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) if (ret) v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); + for (j = 0; j < ovid->num_overlays; j++) { + struct omap_overlay *ovl = ovid->overlays[j]; + + if (ovl->manager && ovl->manager->device) { + ret = ovl->enable(ovl); + if (ret) + goto streamon_err1; + } + } + This explains why I am seeing these warnings. Let me give pull request based on master branch. Thanks, Vaibhav > Regards, > Archit > > > > > Will fix this and submit. > > > > Archit > > > >> > >> Thanks, > >> Vaibhav > >> > >>> /* First save the configuration in ovelray structure */ > >>> ret = omapvid_init(vout, addr); > >>> if (ret) > >>> @@ -2071,11 +2050,12 @@ static int __init > >>> omap_vout_create_video_devices(struct platform_device *pdev) > >>> } > >>> video_set_drvdata(vfd, vout); > >>> > >>> - /* Configure the overlay structure */ > >>> - ret = omapvid_init(vid_dev->vouts[k], 0); > >>> - if (!ret) > >>> - goto success; > >>> + dev_info(&pdev->dev, ": registered and initialized" > >>> + " video device %d\n", vfd->minor); > >>> + if (k == (pdev->num_resources - 1)) > >>> + return 0; > >>> > >>> + continue; > >>> error2: > >>> if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) > >>> omap_vout_release_vrfb(vout); > >>> @@ -2085,12 +2065,6 @@ error1: > >>> error: > >>> kfree(vout); > >>> return ret; > >>> - > >>> -success: > >>> - dev_info(&pdev->dev, ": registered and initialized" > >>> - " video device %d\n", vfd->minor); > >>> - if (k == (pdev->num_resources - 1)) > >>> - return 0; > >>> } > >>> > >>> return -ENODEV; > >>> -- > >>> 1.7.5.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
On Monday 19 March 2012 02:15 PM, Hiremath, Vaibhav wrote: > On Fri, Mar 16, 2012 at 16:41:27, Taneja, Archit wrote: >> Hi, >> >> On Friday 16 March 2012 03:46 PM, Archit Taneja wrote: >>> On Monday 12 March 2012 03:34 PM, Hiremath, Vaibhav wrote: >>>> On Wed, Mar 07, 2012 at 14:31:16, Taneja, Archit wrote: >>>>> The omap_vout driver tries to set the DSS overlay_info using >>>>> set_overlay_info() >>>>> when the physical address for the overlay is still not configured. >>>>> This happens >>>>> in omap_vout_probe() and vidioc_s_fmt_vid_out(). >>>>> >>>>> The calls to omapvid_init(which internally calls set_overlay_info()) >>>>> are removed >>>>> from these functions. They don't need to be called as the >>>>> omap_vout_device >>>>> struct anyway maintains the overlay related changes made. Also, >>>>> remove the >>>>> explicit call to set_overlay_info() in vidioc_streamon(), this was >>>>> used to set >>>>> the paddr, this isn't needed as omapvid_init() does the same thing >>>>> later. >>>>> >>>>> These changes are required as the DSS2 driver since 3.3 kernel >>>>> doesn't let you >>>>> set the overlay info with paddr as 0. >>>>> >>>>> Signed-off-by: Archit Taneja<archit@ti.com> >>>>> --- >>>>> drivers/media/video/omap/omap_vout.c | 36 >>>>> ++++----------------------------- >>>>> 1 files changed, 5 insertions(+), 31 deletions(-) >>>>> >>>>> diff --git a/drivers/media/video/omap/omap_vout.c >>>>> b/drivers/media/video/omap/omap_vout.c >>>>> index 1fb7d5b..dffcf66 100644 >>>>> --- a/drivers/media/video/omap/omap_vout.c >>>>> +++ b/drivers/media/video/omap/omap_vout.c >>>>> @@ -1157,13 +1157,6 @@ static int vidioc_s_fmt_vid_out(struct file >>>>> *file, void *fh, >>>>> /* set default crop and win */ >>>>> omap_vout_new_format(&vout->pix,&vout->fbuf,&vout->crop,&vout->win); >>>>> >>>>> - /* Save the changes in the overlay strcuture */ >>>>> - ret = omapvid_init(vout, 0); >>>>> - if (ret) { >>>>> - v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); >>>>> - goto s_fmt_vid_out_exit; >>>>> - } >>>>> - >>>>> ret = 0; >>>>> >>>>> s_fmt_vid_out_exit: >>>>> @@ -1664,20 +1657,6 @@ static int vidioc_streamon(struct file *file, >>>>> void *fh, enum v4l2_buf_type i) >>>>> >>>>> omap_dispc_register_isr(omap_vout_isr, vout, mask); >>>>> >>>>> - for (j = 0; j< ovid->num_overlays; j++) { >>>>> - struct omap_overlay *ovl = ovid->overlays[j]; >>>>> - >>>>> - if (ovl->manager&& ovl->manager->device) { >>>>> - struct omap_overlay_info info; >>>>> - ovl->get_overlay_info(ovl,&info); >>>>> - info.paddr = addr; >>>>> - if (ovl->set_overlay_info(ovl,&info)) { >>>>> - ret = -EINVAL; >>>>> - goto streamon_err1; >>>>> - } >>>>> - } >>>>> - } >>>>> - >>>> >>>> Have you checked for build warnings? I am getting build warnings >>>> >>>> CC drivers/media/video/omap/omap_vout.o >>>> CC drivers/media/video/omap/omap_voutlib.o >>>> CC drivers/media/video/omap/omap_vout_vrfb.o >>>> drivers/media/video/omap/omap_vout.c: In function 'vidioc_streamon': >>>> drivers/media/video/omap/omap_vout.c:1619:25: warning: unused variable >>>> 'ovid' >>>> drivers/media/video/omap/omap_vout.c:1615:15: warning: unused variable >>>> 'j' >>>> LD drivers/media/video/omap/omap-vout.o >>>> LD drivers/media/video/omap/built-in.o >>>> >>>> Can you fix this and submit the next version? >> >> I applied the patch on the current mainline kernel, it doesn't give any >> build warnings. Even after applying the patch, 'j and ovid' are still >> used in vidioc_streamon(). >> >> Can you check if it was applied correctly? >> > > Archit, > > I could able to trace what's going on here, > > I am using "v4l_for_linus" branch, which has one missing patch, > > commit aaa874a985158383c4b394c687c716ef26288741 > Author: Tomi Valkeinen<tomi.valkeinen@ti.com> > Date: Tue Nov 15 16:37:53 2011 +0200 > > OMAPDSS: APPLY: rewrite overlay enable/disable > > > So, I do not have below changes, > > @@ -1686,6 +1681,16 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) > if (ret) > v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); > > + for (j = 0; j< ovid->num_overlays; j++) { > + struct omap_overlay *ovl = ovid->overlays[j]; > + > + if (ovl->manager&& ovl->manager->device) { > + ret = ovl->enable(ovl); > + if (ret) > + goto streamon_err1; > + } > + } > + > > This explains why I am seeing these warnings. Let me give pull request based on master branch. Okay. Thanks for looking into this. Archit > > > Thanks, > Vaibhav > >> Regards, >> Archit >> >>> >>> Will fix this and submit. >>> >>> Archit >>> >>>> >>>> Thanks, >>>> Vaibhav >>>> >>>>> /* First save the configuration in ovelray structure */ >>>>> ret = omapvid_init(vout, addr); >>>>> if (ret) >>>>> @@ -2071,11 +2050,12 @@ static int __init >>>>> omap_vout_create_video_devices(struct platform_device *pdev) >>>>> } >>>>> video_set_drvdata(vfd, vout); >>>>> >>>>> - /* Configure the overlay structure */ >>>>> - ret = omapvid_init(vid_dev->vouts[k], 0); >>>>> - if (!ret) >>>>> - goto success; >>>>> + dev_info(&pdev->dev, ": registered and initialized" >>>>> + " video device %d\n", vfd->minor); >>>>> + if (k == (pdev->num_resources - 1)) >>>>> + return 0; >>>>> >>>>> + continue; >>>>> error2: >>>>> if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) >>>>> omap_vout_release_vrfb(vout); >>>>> @@ -2085,12 +2065,6 @@ error1: >>>>> error: >>>>> kfree(vout); >>>>> return ret; >>>>> - >>>>> -success: >>>>> - dev_info(&pdev->dev, ": registered and initialized" >>>>> - " video device %d\n", vfd->minor); >>>>> - if (k == (pdev->num_resources - 1)) >>>>> - return 0; >>>>> } >>>>> >>>>> return -ENODEV; >>>>> -- >>>>> 1.7.5.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
On Mon, Mar 19, 2012 at 5:16 PM, Archit Taneja <a0393947@ti.com> wrote: > On Monday 19 March 2012 02:15 PM, Hiremath, Vaibhav wrote: >> >> On Fri, Mar 16, 2012 at 16:41:27, Taneja, Archit wrote: >>> >>> Hi, >>> >>> On Friday 16 March 2012 03:46 PM, Archit Taneja wrote: >>>> >>>> On Monday 12 March 2012 03:34 PM, Hiremath, Vaibhav wrote: >>>>> >>>>> On Wed, Mar 07, 2012 at 14:31:16, Taneja, Archit wrote: >>>>>> >>>>>> The omap_vout driver tries to set the DSS overlay_info using >>>>>> set_overlay_info() >>>>>> when the physical address for the overlay is still not configured. >>>>>> This happens >>>>>> in omap_vout_probe() and vidioc_s_fmt_vid_out(). >>>>>> >>>>>> The calls to omapvid_init(which internally calls set_overlay_info()) >>>>>> are removed >>>>>> from these functions. They don't need to be called as the >>>>>> omap_vout_device >>>>>> struct anyway maintains the overlay related changes made. Also, >>>>>> remove the >>>>>> explicit call to set_overlay_info() in vidioc_streamon(), this was >>>>>> used to set >>>>>> the paddr, this isn't needed as omapvid_init() does the same thing >>>>>> later. >>>>>> >>>>>> These changes are required as the DSS2 driver since 3.3 kernel >>>>>> doesn't let you >>>>>> set the overlay info with paddr as 0. >>>>>> >>>>>> Signed-off-by: Archit Taneja<archit@ti.com> >>>>>> --- >>>>>> drivers/media/video/omap/omap_vout.c | 36 >>>>>> ++++----------------------------- >>>>>> 1 files changed, 5 insertions(+), 31 deletions(-) >>>>>> >>>>>> diff --git a/drivers/media/video/omap/omap_vout.c >>>>>> b/drivers/media/video/omap/omap_vout.c >>>>>> index 1fb7d5b..dffcf66 100644 >>>>>> --- a/drivers/media/video/omap/omap_vout.c >>>>>> +++ b/drivers/media/video/omap/omap_vout.c >>>>>> @@ -1157,13 +1157,6 @@ static int vidioc_s_fmt_vid_out(struct file >>>>>> *file, void *fh, >>>>>> /* set default crop and win */ >>>>>> omap_vout_new_format(&vout->pix,&vout->fbuf,&vout->crop,&vout->win); >>>>>> >>>>>> - /* Save the changes in the overlay strcuture */ >>>>>> - ret = omapvid_init(vout, 0); >>>>>> - if (ret) { >>>>>> - v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); >>>>>> - goto s_fmt_vid_out_exit; >>>>>> - } >>>>>> - >>>>>> ret = 0; >>>>>> >>>>>> s_fmt_vid_out_exit: >>>>>> @@ -1664,20 +1657,6 @@ static int vidioc_streamon(struct file *file, >>>>>> void *fh, enum v4l2_buf_type i) >>>>>> >>>>>> omap_dispc_register_isr(omap_vout_isr, vout, mask); >>>>>> >>>>>> - for (j = 0; j< ovid->num_overlays; j++) { >>>>>> - struct omap_overlay *ovl = ovid->overlays[j]; >>>>>> - >>>>>> - if (ovl->manager&& ovl->manager->device) { >>>>>> - struct omap_overlay_info info; >>>>>> - ovl->get_overlay_info(ovl,&info); >>>>>> - info.paddr = addr; >>>>>> - if (ovl->set_overlay_info(ovl,&info)) { >>>>>> - ret = -EINVAL; >>>>>> - goto streamon_err1; >>>>>> - } >>>>>> - } >>>>>> - } >>>>>> - >>>>> >>>>> >>>>> Have you checked for build warnings? I am getting build warnings >>>>> >>>>> CC drivers/media/video/omap/omap_vout.o >>>>> CC drivers/media/video/omap/omap_voutlib.o >>>>> CC drivers/media/video/omap/omap_vout_vrfb.o >>>>> drivers/media/video/omap/omap_vout.c: In function 'vidioc_streamon': >>>>> drivers/media/video/omap/omap_vout.c:1619:25: warning: unused variable >>>>> 'ovid' >>>>> drivers/media/video/omap/omap_vout.c:1615:15: warning: unused variable >>>>> 'j' >>>>> LD drivers/media/video/omap/omap-vout.o >>>>> LD drivers/media/video/omap/built-in.o >>>>> >>>>> Can you fix this and submit the next version? >>> >>> >>> I applied the patch on the current mainline kernel, it doesn't give any >>> build warnings. Even after applying the patch, 'j and ovid' are still >>> used in vidioc_streamon(). >>> >>> Can you check if it was applied correctly? >>> >> >> Archit, >> >> I could able to trace what's going on here, >> >> I am using "v4l_for_linus" branch, which has one missing patch, >> >> commit aaa874a985158383c4b394c687c716ef26288741 >> Author: Tomi Valkeinen<tomi.valkeinen@ti.com> >> Date: Tue Nov 15 16:37:53 2011 +0200 >> >> OMAPDSS: APPLY: rewrite overlay enable/disable >> >> >> So, I do not have below changes, >> >> @@ -1686,6 +1681,16 @@ static int vidioc_streamon(struct file *file, void >> *fh, enum v4l2_buf_type i) >> if (ret) >> v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change >> mode\n"); >> >> + for (j = 0; j< ovid->num_overlays; j++) { >> + struct omap_overlay *ovl = ovid->overlays[j]; >> + >> + if (ovl->manager&& ovl->manager->device) { >> >> + ret = ovl->enable(ovl); >> + if (ret) >> + goto streamon_err1; >> + } >> + } >> + >> >> This explains why I am seeing these warnings. Let me give pull request >> based on master branch. > > > Okay. Thanks for looking into this. > > Archit Hi Vaibhav, This patch has been outstanding since March, and we have received reports from various users. Could you please push it ASAP to Mauro for the upcoming -rc? Or Did I miss a pull request from you containing this? Thanks and best regards, ~Sumit. > >> >> >> Thanks, >> Vaibhav >> >>> Regards, >>> Archit >>> >>>> >>>> Will fix this and submit. >>>> >>>> Archit >>>> >>>>> >>>>> Thanks, >>>>> Vaibhav >>>>> >>>>>> /* First save the configuration in ovelray structure */ >>>>>> ret = omapvid_init(vout, addr); >>>>>> if (ret) >>>>>> @@ -2071,11 +2050,12 @@ static int __init >>>>>> omap_vout_create_video_devices(struct platform_device *pdev) >>>>>> } >>>>>> video_set_drvdata(vfd, vout); >>>>>> >>>>>> - /* Configure the overlay structure */ >>>>>> - ret = omapvid_init(vid_dev->vouts[k], 0); >>>>>> - if (!ret) >>>>>> - goto success; >>>>>> + dev_info(&pdev->dev, ": registered and initialized" >>>>>> + " video device %d\n", vfd->minor); >>>>>> + if (k == (pdev->num_resources - 1)) >>>>>> + return 0; >>>>>> >>>>>> + continue; >>>>>> error2: >>>>>> if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) >>>>>> omap_vout_release_vrfb(vout); >>>>>> @@ -2085,12 +2065,6 @@ error1: >>>>>> error: >>>>>> kfree(vout); >>>>>> return ret; >>>>>> - >>>>>> -success: >>>>>> - dev_info(&pdev->dev, ": registered and initialized" >>>>>> - " video device %d\n", vfd->minor); >>>>>> - if (k == (pdev->num_resources - 1)) >>>>>> - return 0; >>>>>> } >>>>>> >>>>>> return -ENODEV; >>>>>> -- >>>>>> 1.7.5.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 -- 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
On Thursday 28 June 2012 11:36:48 Semwal, Sumit wrote: > On Mon, Mar 19, 2012 at 5:16 PM, Archit Taneja <a0393947@ti.com> wrote: > > On Monday 19 March 2012 02:15 PM, Hiremath, Vaibhav wrote: > >> On Fri, Mar 16, 2012 at 16:41:27, Taneja, Archit wrote: > >>> On Friday 16 March 2012 03:46 PM, Archit Taneja wrote: > >>>> On Monday 12 March 2012 03:34 PM, Hiremath, Vaibhav wrote: > >>>>> On Wed, Mar 07, 2012 at 14:31:16, Taneja, Archit wrote: > >>>>>> The omap_vout driver tries to set the DSS overlay_info using > >>>>>> set_overlay_info() when the physical address for the overlay is still > >>>>>> not configured. This happens in omap_vout_probe() and > >>>>>> vidioc_s_fmt_vid_out(). > >>>>>> > >>>>>> The calls to omapvid_init(which internally calls set_overlay_info()) > >>>>>> are removed from these functions. They don't need to be called as the > >>>>>> omap_vout_device struct anyway maintains the overlay related changes > >>>>>> made. Also, remove the explicit call to set_overlay_info() in > >>>>>> vidioc_streamon(), this was used to set the paddr, this isn't needed > >>>>>> as omapvid_init() does the same thing later. > >>>>>> > >>>>>> These changes are required as the DSS2 driver since 3.3 kernel > >>>>>> doesn't let you set the overlay info with paddr as 0. > >>>>>> > >>>>>> Signed-off-by: Archit Taneja<archit@ti.com> > >>>>>> --- > >>>>>> drivers/media/video/omap/omap_vout.c | 36 ++++----------------------- > >>>>>> 1 files changed, 5 insertions(+), 31 deletions(-) > >>>>>> > >>>>>> diff --git a/drivers/media/video/omap/omap_vout.c > >>>>>> b/drivers/media/video/omap/omap_vout.c > >>>>>> index 1fb7d5b..dffcf66 100644 > >>>>>> --- a/drivers/media/video/omap/omap_vout.c > >>>>>> +++ b/drivers/media/video/omap/omap_vout.c > >>>>>> @@ -1157,13 +1157,6 @@ static int vidioc_s_fmt_vid_out(struct file > >>>>>> *file, void *fh, > >>>>>> /* set default crop and win */ > >>>>>> omap_vout_new_format(&vout->pix,&vout->fbuf,&vout->crop,&vout->win); > >>>>>> > >>>>>> - /* Save the changes in the overlay strcuture */ > >>>>>> - ret = omapvid_init(vout, 0); > >>>>>> - if (ret) { > >>>>>> - v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); > >>>>>> - goto s_fmt_vid_out_exit; > >>>>>> - } > >>>>>> - > >>>>>> ret = 0; > >>>>>> > >>>>>> s_fmt_vid_out_exit: > >>>>>> @@ -1664,20 +1657,6 @@ static int vidioc_streamon(struct file *file, > >>>>>> void *fh, enum v4l2_buf_type i) > >>>>>> > >>>>>> omap_dispc_register_isr(omap_vout_isr, vout, mask); > >>>>>> > >>>>>> - for (j = 0; j< ovid->num_overlays; j++) { > >>>>>> - struct omap_overlay *ovl = ovid->overlays[j]; > >>>>>> - > >>>>>> - if (ovl->manager&& ovl->manager->device) { > >>>>>> - struct omap_overlay_info info; > >>>>>> - ovl->get_overlay_info(ovl,&info); > >>>>>> - info.paddr = addr; > >>>>>> - if (ovl->set_overlay_info(ovl,&info)) { > >>>>>> - ret = -EINVAL; > >>>>>> - goto streamon_err1; > >>>>>> - } > >>>>>> - } > >>>>>> - } > >>>>>> - > >>>>> > >>>>> Have you checked for build warnings? I am getting build warnings > >>>>> > >>>>> CC drivers/media/video/omap/omap_vout.o > >>>>> CC drivers/media/video/omap/omap_voutlib.o > >>>>> CC drivers/media/video/omap/omap_vout_vrfb.o > >>>>> drivers/media/video/omap/omap_vout.c: In function 'vidioc_streamon': > >>>>> drivers/media/video/omap/omap_vout.c:1619:25: warning: unused variable > >>>>> 'ovid' > >>>>> drivers/media/video/omap/omap_vout.c:1615:15: warning: unused variable > >>>>> 'j' > >>>>> LD drivers/media/video/omap/omap-vout.o > >>>>> LD drivers/media/video/omap/built-in.o > >>>>> > >>>>> Can you fix this and submit the next version? > >>> > >>> I applied the patch on the current mainline kernel, it doesn't give any > >>> build warnings. Even after applying the patch, 'j and ovid' are still > >>> used in vidioc_streamon(). > >>> > >>> Can you check if it was applied correctly? > >> > >> Archit, > >> > >> I could able to trace what's going on here, > >> > >> I am using "v4l_for_linus" branch, which has one missing patch, > >> > >> commit aaa874a985158383c4b394c687c716ef26288741 > >> Author: Tomi Valkeinen<tomi.valkeinen@ti.com> > >> Date: Tue Nov 15 16:37:53 2011 +0200 > >> > >> OMAPDSS: APPLY: rewrite overlay enable/disable > >> > >> > >> So, I do not have below changes, > >> > >> @@ -1686,6 +1681,16 @@ static int vidioc_streamon(struct file *file, void > >> *fh, enum v4l2_buf_type i) > >> if (ret) > >> v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change > >> mode\n"); > >> > >> + for (j = 0; j< ovid->num_overlays; j++) { > >> + struct omap_overlay *ovl = ovid->overlays[j]; > >> + > >> + if (ovl->manager&& ovl->manager->device) { > >> > >> + ret = ovl->enable(ovl); > >> + if (ret) > >> + goto streamon_err1; > >> + } > >> + } > >> + > >> > >> This explains why I am seeing these warnings. Let me give pull request > >> based on master branch. > > > > Okay. Thanks for looking into this. > > > > Archit > > Hi Vaibhav, > > This patch has been outstanding since March, and we have received > reports from various users. Could you please push it ASAP to Mauro for > the upcoming -rc? I second this request. Vaibhav, could you please take care of this ? > Or Did I miss a pull request from you containing this?
On 2012-03-09 10:03, Hiremath, Vaibhav wrote: > On Fri, Mar 09, 2012 at 05:17:41, Laurent Pinchart wrote: >> Hi Archit, >> >> On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote: >>> The omap_vout driver tries to set the DSS overlay_info using >>> set_overlay_info() when the physical address for the overlay is still not >>> configured. This happens in omap_vout_probe() and vidioc_s_fmt_vid_out(). >>> >>> The calls to omapvid_init(which internally calls set_overlay_info()) are >>> removed from these functions. They don't need to be called as the >>> omap_vout_device struct anyway maintains the overlay related changes made. >>> Also, remove the explicit call to set_overlay_info() in vidioc_streamon(), >>> this was used to set the paddr, this isn't needed as omapvid_init() does >>> the same thing later. >>> >>> These changes are required as the DSS2 driver since 3.3 kernel doesn't let >>> you set the overlay info with paddr as 0. >>> >>> Signed-off-by: Archit Taneja <archit@ti.com> >> >> Thanks for the patch. This seems to fix memory corruption that would result >> in sysfs-related crashes such as >> >> [ 31.279541] ------------[ cut here ]------------ >> [ 31.284423] WARNING: at fs/sysfs/file.c:343 sysfs_open_file+0x70/0x1f8() >> [ 31.291503] missing sysfs attribute operations for kobject: (null) >> [ 31.298004] Modules linked in: mt9p031 aptina_pll omap3_isp >> [ 31.303924] [<c0018260>] (unwind_backtrace+0x0/0xec) from [<c0034488>] (warn_slowpath_common+0x4c/0x64) >> [ 31.313812] [<c0034488>] (warn_slowpath_common+0x4c/0x64) from [<c0034520>] (warn_slowpath_fmt+0x2c/0x3c) >> [ 31.323913] [<c0034520>] (warn_slowpath_fmt+0x2c/0x3c) from [<c01219bc>] (sysfs_open_file+0x70/0x1f8) >> [ 31.333618] [<c01219bc>] (sysfs_open_file+0x70/0x1f8) from [<c00ccc94>] (__dentry_open+0x1f8/0x30c) >> [ 31.343139] [<c00ccc94>] (__dentry_open+0x1f8/0x30c) from [<c00cce58>] (nameidata_to_filp+0x50/0x5c) >> [ 31.352752] [<c00cce58>] (nameidata_to_filp+0x50/0x5c) from [<c00db4c0>] (do_last+0x55c/0x6a0) >> [ 31.361999] [<c00db4c0>] (do_last+0x55c/0x6a0) from [<c00db6bc>] (path_openat+0xb8/0x37c) >> [ 31.370605] [<c00db6bc>] (path_openat+0xb8/0x37c) from [<c00dba60>] (do_filp_open+0x30/0x7c) >> [ 31.379486] [<c00dba60>] (do_filp_open+0x30/0x7c) from [<c00cc904>] (do_sys_open+0xd8/0x170) >> [ 31.388366] [<c00cc904>] (do_sys_open+0xd8/0x170) from [<c0012760>] (ret_fast_syscall+0x0/0x3c) >> [ 31.397552] ---[ end trace 13639ab74f345d7e ]--- >> >> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> >> > > Thanks Laurent for testing this patch. > > >> Please push it to v3.3 :-) >> > > Will send a pull request today itself. Vaibhav, I don't see this crash fix in 3.3, 3.4, 3.5, 3.6 nor in 3.7-rc. Are you still maintaining the omap v4l2 driver? Can you finally push this fix? Tomi
On Thu, Oct 25, 2012 at 19:30:58, Valkeinen, Tomi wrote: > On 2012-03-09 10:03, Hiremath, Vaibhav wrote: > > On Fri, Mar 09, 2012 at 05:17:41, Laurent Pinchart wrote: > >> Hi Archit, > >> > >> On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote: > >>> The omap_vout driver tries to set the DSS overlay_info using > >>> set_overlay_info() when the physical address for the overlay is still not > >>> configured. This happens in omap_vout_probe() and vidioc_s_fmt_vid_out(). > >>> > >>> The calls to omapvid_init(which internally calls set_overlay_info()) are > >>> removed from these functions. They don't need to be called as the > >>> omap_vout_device struct anyway maintains the overlay related changes made. > >>> Also, remove the explicit call to set_overlay_info() in vidioc_streamon(), > >>> this was used to set the paddr, this isn't needed as omapvid_init() does > >>> the same thing later. > >>> > >>> These changes are required as the DSS2 driver since 3.3 kernel doesn't let > >>> you set the overlay info with paddr as 0. > >>> > >>> Signed-off-by: Archit Taneja <archit@ti.com> > >> > >> Thanks for the patch. This seems to fix memory corruption that would result > >> in sysfs-related crashes such as > >> > >> [ 31.279541] ------------[ cut here ]------------ > >> [ 31.284423] WARNING: at fs/sysfs/file.c:343 sysfs_open_file+0x70/0x1f8() > >> [ 31.291503] missing sysfs attribute operations for kobject: (null) > >> [ 31.298004] Modules linked in: mt9p031 aptina_pll omap3_isp > >> [ 31.303924] [<c0018260>] (unwind_backtrace+0x0/0xec) from [<c0034488>] (warn_slowpath_common+0x4c/0x64) > >> [ 31.313812] [<c0034488>] (warn_slowpath_common+0x4c/0x64) from [<c0034520>] (warn_slowpath_fmt+0x2c/0x3c) > >> [ 31.323913] [<c0034520>] (warn_slowpath_fmt+0x2c/0x3c) from [<c01219bc>] (sysfs_open_file+0x70/0x1f8) > >> [ 31.333618] [<c01219bc>] (sysfs_open_file+0x70/0x1f8) from [<c00ccc94>] (__dentry_open+0x1f8/0x30c) > >> [ 31.343139] [<c00ccc94>] (__dentry_open+0x1f8/0x30c) from [<c00cce58>] (nameidata_to_filp+0x50/0x5c) > >> [ 31.352752] [<c00cce58>] (nameidata_to_filp+0x50/0x5c) from [<c00db4c0>] (do_last+0x55c/0x6a0) > >> [ 31.361999] [<c00db4c0>] (do_last+0x55c/0x6a0) from [<c00db6bc>] (path_openat+0xb8/0x37c) > >> [ 31.370605] [<c00db6bc>] (path_openat+0xb8/0x37c) from [<c00dba60>] (do_filp_open+0x30/0x7c) > >> [ 31.379486] [<c00dba60>] (do_filp_open+0x30/0x7c) from [<c00cc904>] (do_sys_open+0xd8/0x170) > >> [ 31.388366] [<c00cc904>] (do_sys_open+0xd8/0x170) from [<c0012760>] (ret_fast_syscall+0x0/0x3c) > >> [ 31.397552] ---[ end trace 13639ab74f345d7e ]--- > >> > >> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > >> > > > > Thanks Laurent for testing this patch. > > > > > >> Please push it to v3.3 :-) > >> > > > > Will send a pull request today itself. > > Vaibhav, I don't see this crash fix in 3.3, 3.4, 3.5, 3.6 nor in 3.7-rc. > Are you still maintaining the omap v4l2 driver? Can you finally push > this fix? > Tomi, Sorry for delayed response. Laurent, Can you pull up this patch into your next pull request? Thanks, Vaibhav -- 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
Hi Vaibhav, On Friday 26 October 2012 09:13:20 Hiremath, Vaibhav wrote: > On Thu, Oct 25, 2012 at 19:30:58, Valkeinen, Tomi wrote: > > On 2012-03-09 10:03, Hiremath, Vaibhav wrote: > > > On Fri, Mar 09, 2012 at 05:17:41, Laurent Pinchart wrote: > > >> On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote: > > >>> The omap_vout driver tries to set the DSS overlay_info using > > >>> set_overlay_info() when the physical address for the overlay is still > > >>> not configured. This happens in omap_vout_probe() and > > >>> vidioc_s_fmt_vid_out(). > > >>> > > >>> The calls to omapvid_init(which internally calls set_overlay_info()) > > >>> are removed from these functions. They don't need to be called as the > > >>> omap_vout_device struct anyway maintains the overlay related changes > > >>> made. Also, remove the explicit call to set_overlay_info() in > > >>> vidioc_streamon(), this was used to set the paddr, this isn't needed > > >>> as omapvid_init() does the same thing later. > > >>> > > >>> These changes are required as the DSS2 driver since 3.3 kernel doesn't > > >>> let you set the overlay info with paddr as 0. > > >>> > > >>> Signed-off-by: Archit Taneja <archit@ti.com> > > >> > > >> Thanks for the patch. This seems to fix memory corruption that would > > >> result in sysfs-related crashes such as > > >> > > >> [ 31.279541] ------------[ cut here ]------------ > > >> [ 31.284423] WARNING: at fs/sysfs/file.c:343 > > >> sysfs_open_file+0x70/0x1f8() > > >> [ 31.291503] missing sysfs attribute operations for kobject: (null) > > >> [ 31.298004] Modules linked in: mt9p031 aptina_pll omap3_isp > > >> [ 31.303924] [<c0018260>] (unwind_backtrace+0x0/0xec) from > > >> [<c0034488>] (warn_slowpath_common+0x4c/0x64) [ 31.313812] > > >> [<c0034488>] (warn_slowpath_common+0x4c/0x64) from [<c0034520>] > > >> (warn_slowpath_fmt+0x2c/0x3c) [ 31.323913] [<c0034520>] > > >> (warn_slowpath_fmt+0x2c/0x3c) from [<c01219bc>] > > >> (sysfs_open_file+0x70/0x1f8) [ 31.333618] [<c01219bc>] > > >> (sysfs_open_file+0x70/0x1f8) from [<c00ccc94>] > > >> (__dentry_open+0x1f8/0x30c) [ 31.343139] [<c00ccc94>] > > >> (__dentry_open+0x1f8/0x30c) from [<c00cce58>] > > >> (nameidata_to_filp+0x50/0x5c) [ 31.352752] [<c00cce58>] > > >> (nameidata_to_filp+0x50/0x5c) from [<c00db4c0>] (do_last+0x55c/0x6a0) > > >> [ 31.361999] [<c00db4c0>] (do_last+0x55c/0x6a0) from [<c00db6bc>] > > >> (path_openat+0xb8/0x37c) [ 31.370605] [<c00db6bc>] > > >> (path_openat+0xb8/0x37c) from [<c00dba60>] (do_filp_open+0x30/0x7c) [ > > >> 31.379486] [<c00dba60>] (do_filp_open+0x30/0x7c) from [<c00cc904>] > > >> (do_sys_open+0xd8/0x170) [ 31.388366] [<c00cc904>] > > >> (do_sys_open+0xd8/0x170) from [<c0012760>] (ret_fast_syscall+0x0/0x3c) > > >> [ 31.397552] ---[ end trace 13639ab74f345d7e ]--- > > >> > > >> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > > > > Thanks Laurent for testing this patch. > > > > > >> Please push it to v3.3 :-) > > > > > > Will send a pull request today itself. > > > > Vaibhav, I don't see this crash fix in 3.3, 3.4, 3.5, 3.6 nor in 3.7-rc. > > Are you still maintaining the omap v4l2 driver? Can you finally push > > this fix? > > Tomi, Sorry for delayed response. > > Laurent, > Can you pull up this patch into your next pull request? I've asked Mauro to pull the patch for v3.8.
On Sat, Oct 27, 2012 at 17:01:09, Laurent Pinchart wrote: > Hi Vaibhav, > > On Friday 26 October 2012 09:13:20 Hiremath, Vaibhav wrote: > > On Thu, Oct 25, 2012 at 19:30:58, Valkeinen, Tomi wrote: > > > On 2012-03-09 10:03, Hiremath, Vaibhav wrote: > > > > On Fri, Mar 09, 2012 at 05:17:41, Laurent Pinchart wrote: > > > >> On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote: > > > >>> The omap_vout driver tries to set the DSS overlay_info using > > > >>> set_overlay_info() when the physical address for the overlay is still > > > >>> not configured. This happens in omap_vout_probe() and > > > >>> vidioc_s_fmt_vid_out(). > > > >>> > > > >>> The calls to omapvid_init(which internally calls set_overlay_info()) > > > >>> are removed from these functions. They don't need to be called as the > > > >>> omap_vout_device struct anyway maintains the overlay related changes > > > >>> made. Also, remove the explicit call to set_overlay_info() in > > > >>> vidioc_streamon(), this was used to set the paddr, this isn't needed > > > >>> as omapvid_init() does the same thing later. > > > >>> > > > >>> These changes are required as the DSS2 driver since 3.3 kernel doesn't > > > >>> let you set the overlay info with paddr as 0. > > > >>> > > > >>> Signed-off-by: Archit Taneja <archit@ti.com> > > > >> > > > >> Thanks for the patch. This seems to fix memory corruption that would > > > >> result in sysfs-related crashes such as > > > >> > > > >> [ 31.279541] ------------[ cut here ]------------ > > > >> [ 31.284423] WARNING: at fs/sysfs/file.c:343 > > > >> sysfs_open_file+0x70/0x1f8() > > > >> [ 31.291503] missing sysfs attribute operations for kobject: (null) > > > >> [ 31.298004] Modules linked in: mt9p031 aptina_pll omap3_isp > > > >> [ 31.303924] [<c0018260>] (unwind_backtrace+0x0/0xec) from > > > >> [<c0034488>] (warn_slowpath_common+0x4c/0x64) [ 31.313812] > > > >> [<c0034488>] (warn_slowpath_common+0x4c/0x64) from [<c0034520>] > > > >> (warn_slowpath_fmt+0x2c/0x3c) [ 31.323913] [<c0034520>] > > > >> (warn_slowpath_fmt+0x2c/0x3c) from [<c01219bc>] > > > >> (sysfs_open_file+0x70/0x1f8) [ 31.333618] [<c01219bc>] > > > >> (sysfs_open_file+0x70/0x1f8) from [<c00ccc94>] > > > >> (__dentry_open+0x1f8/0x30c) [ 31.343139] [<c00ccc94>] > > > >> (__dentry_open+0x1f8/0x30c) from [<c00cce58>] > > > >> (nameidata_to_filp+0x50/0x5c) [ 31.352752] [<c00cce58>] > > > >> (nameidata_to_filp+0x50/0x5c) from [<c00db4c0>] (do_last+0x55c/0x6a0) > > > >> [ 31.361999] [<c00db4c0>] (do_last+0x55c/0x6a0) from [<c00db6bc>] > > > >> (path_openat+0xb8/0x37c) [ 31.370605] [<c00db6bc>] > > > >> (path_openat+0xb8/0x37c) from [<c00dba60>] (do_filp_open+0x30/0x7c) [ > > > >> 31.379486] [<c00dba60>] (do_filp_open+0x30/0x7c) from [<c00cc904>] > > > >> (do_sys_open+0xd8/0x170) [ 31.388366] [<c00cc904>] > > > >> (do_sys_open+0xd8/0x170) from [<c0012760>] (ret_fast_syscall+0x0/0x3c) > > > >> [ 31.397552] ---[ end trace 13639ab74f345d7e ]--- > > > >> > > > >> Tested-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com> > > > > > > > > Thanks Laurent for testing this patch. > > > > > > > >> Please push it to v3.3 :-) > > > > > > > > Will send a pull request today itself. > > > > > > Vaibhav, I don't see this crash fix in 3.3, 3.4, 3.5, 3.6 nor in 3.7-rc. > > > Are you still maintaining the omap v4l2 driver? Can you finally push > > > this fix? > > > > Tomi, Sorry for delayed response. > > > > Laurent, > > Can you pull up this patch into your next pull request? > > I've asked Mauro to pull the patch for v3.8. > Thanks Laurent. Thanks, Vaibhav -- 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.c b/drivers/media/video/omap/omap_vout.c index 1fb7d5b..dffcf66 100644 --- a/drivers/media/video/omap/omap_vout.c +++ b/drivers/media/video/omap/omap_vout.c @@ -1157,13 +1157,6 @@ static int vidioc_s_fmt_vid_out(struct file *file, void *fh, /* set default crop and win */ omap_vout_new_format(&vout->pix, &vout->fbuf, &vout->crop, &vout->win); - /* Save the changes in the overlay strcuture */ - ret = omapvid_init(vout, 0); - if (ret) { - v4l2_err(&vout->vid_dev->v4l2_dev, "failed to change mode\n"); - goto s_fmt_vid_out_exit; - } - ret = 0; s_fmt_vid_out_exit: @@ -1664,20 +1657,6 @@ static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) omap_dispc_register_isr(omap_vout_isr, vout, mask); - for (j = 0; j < ovid->num_overlays; j++) { - struct omap_overlay *ovl = ovid->overlays[j]; - - if (ovl->manager && ovl->manager->device) { - struct omap_overlay_info info; - ovl->get_overlay_info(ovl, &info); - info.paddr = addr; - if (ovl->set_overlay_info(ovl, &info)) { - ret = -EINVAL; - goto streamon_err1; - } - } - } - /* First save the configuration in ovelray structure */ ret = omapvid_init(vout, addr); if (ret) @@ -2071,11 +2050,12 @@ static int __init omap_vout_create_video_devices(struct platform_device *pdev) } video_set_drvdata(vfd, vout); - /* Configure the overlay structure */ - ret = omapvid_init(vid_dev->vouts[k], 0); - if (!ret) - goto success; + dev_info(&pdev->dev, ": registered and initialized" + " video device %d\n", vfd->minor); + if (k == (pdev->num_resources - 1)) + return 0; + continue; error2: if (vout->vid_info.rotation_type == VOUT_ROT_VRFB) omap_vout_release_vrfb(vout); @@ -2085,12 +2065,6 @@ error1: error: kfree(vout); return ret; - -success: - dev_info(&pdev->dev, ": registered and initialized" - " video device %d\n", vfd->minor); - if (k == (pdev->num_resources - 1)) - return 0; } return -ENODEV;