omap_vout: Set DSS overlay_info only if paddr is non zero
PATCH 1/1 omap_vout: Set DSS overlay_info only if paddr is non zero
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.
--- drivers/media/video/omap/omap_vout.c | 36 ++++----------------------------- 1 files changed, 5 insertions(+), 31 deletions(-)
drivers/media/video/omap/omap_vout.c +5 -31
@@ -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 ;
Signature · 1 line
1.7.5.4
Hi Archit,
Quoted 11 lines · On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote:
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()when the physical address for the overlay is still not configured. This happens inomap_vout_probe()andvidioc_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 theomap_vout_devicestruct anyway maintains the overlay related changes made. Also, remove the explicit call toset_overlay_info()invidioc_streamon(), this was used to set the paddr, this isn't needed asomapvid_init()does the same thing later.
Quoted 4 lines
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 <[email protected]>
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 ]---
Please push it to v3.3 :-)
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 38 lines · Laurent Pinchart
Hi Archit,
Quoted 11 lines · On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote:
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()when the physical address for the overlay is still not configured. This happens inomap_vout_probe()andvidioc_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 theomap_vout_devicestruct anyway maintains the overlay related changes made. Also, remove the explicit call toset_overlay_info()invidioc_streamon(), this was used to set the paddr, this isn't needed asomapvid_init()does the same thing later.Quoted 4 lines
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 <[email protected]>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 ]---
Quoted 2 lines
Tested-by Laurent Pinchart <[email protected]>
Thanks Laurent for testing this patch.
Quoted 2 lines
Please push it to v3.3 :-)
Will send a pull request today itself.
Thanks,
Vaibhav
Quoted 6 lines
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 44 lines · Archit
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()when the physical address for the overlay is still not configured. This happens inomap_vout_probe()andvidioc_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 theomap_vout_devicestruct anyway maintains the overlay related changes made. Also, remove the explicit call toset_overlay_info()invidioc_streamon(), this was used to set the paddr, this isn't needed asomapvid_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 <[email protected]>--- drivers/media/video/omap/omap_vout.c | 36 ++++----------------------------- 1 files changed, 5 insertions(+), 31 deletions(-)drivers/media/video/omap/omap_vout.c +0
-11@@ -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) {
drivers/media/video/omap/omap_vout.c static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) · line 1680
Quoted 10 lines
drivers/media/video/omap/omap_vout.c +0
-10-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
Quoted 37 lines
drivers/media/video/omap/omap_vout.c +5
-10/* 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 ;Signature · 1 line
1.7.5.4
Quoted 61 lines · Vaibhav
Quoted 44 lines · Archit
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()when the physical address for the overlay is still not configured. This happens inomap_vout_probe()andvidioc_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 theomap_vout_devicestruct anyway maintains the overlay related changes made. Also, remove the explicit call toset_overlay_info()invidioc_streamon(), this was used to set the paddr, this isn't needed asomapvid_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<[email protected]>--- drivers/media/video/omap/omap_vout.c | 36 ++++----------------------------- 1 files changed, 5 insertions(+), 31 deletions(-)drivers/media/video/omap/omap_vout.c +0
-11@@ -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) {drivers/media/video/omap/omap_vout.c static int vidioc_streamon(struct file *file, void *fh, enum v4l2_buf_type i) · line 1680
Quoted 10 lines
drivers/media/video/omap/omap_vout.c +0
-10-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
Quoted 7 lines
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'
LDdrivers/media/video/omap/omap-vout.o
LDdrivers/media/video/omap/built-in.oCan you fix this and submit the next version?
Will fix this and submit.
Archit
Quoted 43 lines
Thanks,
VaibhavQuoted 37 lines
drivers/media/video/omap/omap_vout.c +5
-11/* 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
Hi,
Quoted 82 lines · Archit Taneja
Quoted 81 lines · Vaibhav
Quoted 56 lines · Archit
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()
when the physical address for the overlay is still not configured. This happens
inomap_vout_probe()andvidioc_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 theomap_vout_device
struct anyway maintains the overlay related changes made. Also, remove the
explicit call toset_overlay_info()invidioc_streamon(), this was used to set
the paddr, this isn't needed asomapvid_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<[email protected]>---
drivers/media/video/omap/omap_vout.c| 36
++++-----------------------------1 files changed, 5 insertions(+), 31 deletions(-)drivers/media/video/omap/omap_vout.c +0
-7@@ -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:drivers/media/video/omap/omap_vout.c +0
-4@@ -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) {drivers/media/video/omap/omap_vout.c static int vidioc_streamon(struct file *file, · line 1681
Quoted 10 lines
drivers/media/video/omap/omap_vout.c +0
-10-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
CCdrivers/media/video/omap/omap_voutlib.o
CCdrivers/media/video/omap/omap_vout_vrfb.odrivers/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'
LDdrivers/media/video/omap/omap-vout.o
LDdrivers/media/video/omap/built-in.o
Quoted 1 line
Quoted 1 line
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
Quoted 51 lines
Will fix this and submit.
Archit
Quoted 44 lines
Thanks,
VaibhavQuoted 38 lines
drivers/media/video/omap/omap_vout.c +0
-0/* First save the configuration in ovelray structure */ ret =omapvid_init (vout, addr);if (ret)
drivers/media/video/omap/omap_vout.c +5
-4@@ -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);drivers/media/video/omap/omap_vout.c +0
-0@@ -2085,12 +2065,6 @@ error1:error:
kfree(vout);
return ret;drivers/media/video/omap/omap_vout.c +0
-6- -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
Quoted 85 lines · Archit
Hi,
Quoted 82 lines · Archit Taneja
Quoted 81 lines · Vaibhav
Quoted 56 lines · Archit
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()
when the physical address for the overlay is still not configured. This happens
inomap_vout_probe()andvidioc_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 theomap_vout_device
struct anyway maintains the overlay related changes made. Also, remove the
explicit call toset_overlay_info()invidioc_streamon(), this was used to set
the paddr, this isn't needed asomapvid_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<[email protected]>---
drivers/media/video/omap/omap_vout.c| 36
++++-----------------------------1 files changed, 5 insertions(+), 31 deletions(-)drivers/media/video/omap/omap_vout.c +0
-7@@ -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:drivers/media/video/omap/omap_vout.c +0
-4@@ -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) {drivers/media/video/omap/omap_vout.c static int vidioc_streamon(struct file *file, · line 1681
Quoted 10 lines
drivers/media/video/omap/omap_vout.c +0
-10-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
CCdrivers/media/video/omap/omap_voutlib.o
CCdrivers/media/video/omap/omap_vout_vrfb.odrivers/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'
LDdrivers/media/video/omap/omap-vout.o
LDdrivers/media/video/omap/built-in.o
Quoted 8 lines
Quoted 1 line
Quoted 1 line
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 <[email protected]> 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
Quoted 56 lines
Regards,
ArchitQuoted 51 lines
Will fix this and submit.
Archit
Quoted 44 lines
Thanks,
VaibhavQuoted 38 lines
drivers/media/video/omap/omap_vout.c +0
-0/* First save the configuration in ovelray structure */ ret =omapvid_init (vout, addr);if (ret)
drivers/media/video/omap/omap_vout.c +5
-4@@ -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);drivers/media/video/omap/omap_vout.c +0
-0@@ -2085,12 +2065,6 @@ error1:error:
kfree(vout);
return ret;drivers/media/video/omap/omap_vout.c +0
-6- -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
Quoted 125 lines · Vaibhav
Quoted 85 lines · Archit
Hi,
Quoted 82 lines · Archit Taneja
Quoted 81 lines · Vaibhav
Quoted 56 lines · Archit
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()
when the physical address for the overlay is still not configured. This happens
inomap_vout_probe()andvidioc_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 theomap_vout_device
struct anyway maintains the overlay related changes made. Also, remove the
explicit call toset_overlay_info()invidioc_streamon(), this was used to set
the paddr, this isn't needed asomapvid_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<[email protected]>---
drivers/media/video/omap/omap_vout.c| 36
++++-----------------------------1 files changed, 5 insertions(+), 31 deletions(-)drivers/media/video/omap/omap_vout.c +0
-7@@ -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:drivers/media/video/omap/omap_vout.c +0
-4@@ -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) {drivers/media/video/omap/omap_vout.c static int vidioc_streamon(struct file *file, · line 1681
Quoted 10 lines
drivers/media/video/omap/omap_vout.c +0
-10-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
CCdrivers/media/video/omap/omap_voutlib.o
CCdrivers/media/video/omap/omap_vout_vrfb.odrivers/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'
LDdrivers/media/video/omap/omap-vout.o
LDdrivers/media/video/omap/built-in.oQuoted 8 lines
Quoted 1 line
Quoted 1 line
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
aaa874a985158383c4b394c687c716ef26288741Author: Tomi Valkeinen<[email protected]> Date: Tue Nov 15 16:37:53 2011 +0200OMAPDSS: APPLY: rewrite overlay enable/disable
So, I do not have below changes,
(quoted diff) +10
-0@@ -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; + } + } +
Quoted 1 line
This explains why I am seeing these warnings. Let me give pull request based on master branch.
Okay. Thanks for looking into this.
Archit
Quoted 62 lines
Thanks,
VaibhavQuoted 56 lines
Regards,
ArchitQuoted 51 lines
Will fix this and submit.
Archit
Quoted 44 lines
Thanks,
VaibhavQuoted 38 lines
drivers/media/video/omap/omap_vout.c +0
-0/* First save the configuration in ovelray structure */ ret =omapvid_init (vout, addr);if (ret)
drivers/media/video/omap/omap_vout.c +5
-4@@ -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);drivers/media/video/omap/omap_vout.c +0
-0@@ -2085,12 +2065,6 @@ error1:error:
kfree(vout);
return ret;drivers/media/video/omap/omap_vout.c +0
-6- -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
Quoted 136 lines · Archit Taneja
Quoted 135 lines · Vaibhav
Quoted 90 lines · Archit
Hi,
Quoted 86 lines · Archit Taneja
Quoted 84 lines · Vaibhav
Quoted 57 lines · Archit
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()
when the physical address for the overlay is still not configured. This happens
inomap_vout_probe()andvidioc_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 theomap_vout_device
struct anyway maintains the overlay related changes made. Also, remove the
explicit call toset_overlay_info()invidioc_streamon(), this was used to set
the paddr, this isn't needed asomapvid_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<[email protected]>---
drivers/media/video/omap/omap_vout.c| 36
++++-----------------------------1 files changed, 5 insertions(+), 31 deletions(-)drivers/media/video/omap/omap_vout.c +0
-7@@ -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:drivers/media/video/omap/omap_vout.c +0
-4@@ -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) {drivers/media/video/omap/omap_vout.c static int vidioc_streamon(struct file *file, · line 1681
Quoted 10 lines
drivers/media/video/omap/omap_vout.c +0
-10-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
CCdrivers/media/video/omap/omap_voutlib.o
CCdrivers/media/video/omap/omap_vout_vrfb.odrivers/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'
LDdrivers/media/video/omap/omap-vout.o
LDdrivers/media/video/omap/built-in.oQuoted 9 lines
Quoted 1 line
Quoted 1 line
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<[email protected]>
Date: Tue Nov 15 16:37:53 2011 +0200OMAPDSS: APPLY: rewrite overlay enable/disable
So, I do not have below changes,
(quoted diff) +0
-0@@ -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++) {
+ structomap_overlay*ovl = ovid->overlays[j];(quoted diff) +8
-0+ + if (ovl->manager&& ovl->manager->device) { + ret = ovl->enable(ovl); + if (ret) + goto streamon_err1; + } + } +
Quoted 7 lines
Quoted 2 lines
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.
Quoted 68 lines
Quoted 63 lines
Thanks,
VaibhavQuoted 56 lines
Regards,
ArchitQuoted 51 lines
Will fix this and submit.
Archit
Quoted 44 lines
Thanks,
VaibhavQuoted 38 lines
drivers/media/video/omap/omap_vout.c +0
-0/* First save the configuration in ovelray structure */ ret =omapvid_init (vout, addr);if (ret)
drivers/media/video/omap/omap_vout.c +5
-4@@ -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);drivers/media/video/omap/omap_vout.c +0
-0@@ -2085,12 +2065,6 @@ error1:error:
kfree(vout);
return ret;drivers/media/video/omap/omap_vout.c +0
-6- -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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 125 lines · Sumit
Quoted 124 lines · Archit Taneja
Quoted 118 lines · Vaibhav
Quoted 76 lines · Archit
Quoted 75 lines · Archit Taneja
Quoted 74 lines · Vaibhav
Quoted 49 lines · Archit
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()when the physical address for the overlay is still not configured. This happens inomap_vout_probe()andvidioc_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 theomap_vout_devicestruct anyway maintains the overlay related changes made. Also, remove the explicit call toset_overlay_info()invidioc_streamon(), this was used to set the paddr, this isn't needed asomapvid_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<[email protected]>---
drivers/media/video/omap/omap_vout.c| 36 ++++-----------------------1 files changed, 5 insertions(+), 31 deletions(-)drivers/media/video/omap/omap_vout.c +0
-7@@ -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:drivers/media/video/omap/omap_vout.c +0
-4@@ -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) {drivers/media/video/omap/omap_vout.c static int vidioc_streamon(struct file *file, · line 1681
Quoted 10 lines
drivers/media/video/omap/omap_vout.c +0
-10-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
CCdrivers/media/video/omap/omap_voutlib.o
CCdrivers/media/video/omap/omap_vout_vrfb.odrivers/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'
LDdrivers/media/video/omap/omap-vout.o
LDdrivers/media/video/omap/built-in.oQuoted 7 lines
Quoted 1 line
Quoted 1 line
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
aaa874a985158383c4b394c687c716ef26288741Author: Tomi Valkeinen<[email protected]> Date: Tue Nov 15 16:37:53 2011 +0200OMAPDSS: APPLY: rewrite overlay enable/disable
So, I do not have below changes,
(quoted diff) +10
-0@@ -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; + } + } +Quoted 2 lines
This explains why I am seeing these warnings. Let me give pull request based on master branch.
Okay. Thanks for looking into this.
Quoted 7 lines
Quoted 1 line
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 ?
Quoted 1 line
Or Did I miss a pull request from you containing this?
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 42 lines · Vaibhav
Quoted 38 lines · Laurent Pinchart
Hi Archit,
Quoted 11 lines · On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote:
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()when the physical address for the overlay is still not configured. This happens inomap_vout_probe()andvidioc_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 theomap_vout_devicestruct anyway maintains the overlay related changes made. Also, remove the explicit call toset_overlay_info()invidioc_streamon(), this was used to set the paddr, this isn't needed asomapvid_init()does the same thing later.Quoted 4 lines
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 <[email protected]>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 ]---Quoted 2 lines
Tested-by Laurent Pinchart <[email protected]>
Quoted 7 lines
Thanks Laurent for testing this patch.
Quoted 2 lines
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
Quoted 46 lines · Tomi
Quoted 45 lines · Vaibhav
Quoted 38 lines · Laurent Pinchart
Hi Archit,
Quoted 11 lines · On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote:
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()when the physical address for the overlay is still not configured. This happens inomap_vout_probe()andvidioc_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 theomap_vout_devicestruct anyway maintains the overlay related changes made. Also, remove the explicit call toset_overlay_info()invidioc_streamon(), this was used to set the paddr, this isn't needed asomapvid_init()does the same thing later.Quoted 4 lines
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 <[email protected]>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 ]---Quoted 2 lines
Tested-by Laurent Pinchart <[email protected]>Thanks Laurent for testing this patch.
Quoted 9 lines
Quoted 4 lines
Quoted 2 lines
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
Hi Vaibhav,
Quoted 56 lines · Vaibhav
Quoted 55 lines · Tomi
Quoted 53 lines · Vaibhav
Quoted 38 lines · Laurent Pinchart
Quoted 12 lines · On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote:
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()when the physical address for the overlay is still not configured. This happens inomap_vout_probe()andvidioc_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 theomap_vout_devicestruct anyway maintains the overlay related changes made. Also, remove the explicit call toset_overlay_info()invidioc_streamon(), this was used to set the paddr, this isn't needed asomapvid_init()does the same thing later.Quoted 4 lines
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 <[email protected]>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>]Quoted 8 lines
(
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 <[email protected]>Thanks Laurent for testing this patch.
Quoted 1 line
Please push it to v3.3 :-)
Will send a pull request today itself.
Quoted 8 lines
Quoted 3 lines
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.
Signature · 3 lines
Regards, Laurent Pinchart
Quoted 63 lines · Laurent Pinchart
Hi Vaibhav,
Quoted 60 lines · Vaibhav
Quoted 58 lines · Tomi
Quoted 46 lines · Vaibhav
Quoted 45 lines · Laurent Pinchart
Quoted 12 lines · On Wednesday 07 March 2012 14:31:16 Archit Taneja wrote:
The
omap_voutdriver tries to set the DSSoverlay_infousingset_overlay_info()when the physical address for the overlay is still not configured. This happens inomap_vout_probe()andvidioc_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 theomap_vout_devicestruct anyway maintains the overlay related changes made. Also, remove the explicit call toset_overlay_info()invidioc_streamon(), this was used to set the paddr, this isn't needed asomapvid_init()does the same thing later.Quoted 4 lines
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 <[email protected]>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 ]---Quoted 7 lines
Quoted 1 line
Tested-by Laurent Pinchart <[email protected]>Thanks Laurent for testing this patch.
Quoted 1 line
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?
Quoted 7 lines
Quoted 4 lines
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