gst-fsl-plugins: fix build for kernel headers >= 3.10
PATCH 1/1 gst-fsl-plugins: fix build for kernel headers >= 3.10
This package couldn't build using a toolchain with kernel headers >= 3.10 because of the use of VIDIOC_DBG_G_CHIP_IDENT. As stated in videodev2.h, this ioctl should never be used.
---
Yann, Thomas, all,
After looking at the source code it appears that nothing justifies the use of that obsolete ioctl. Its only purpose is to get the video device name so this patch actually removes those unnecessary calls.
Thanks,
Gary
--- ...e-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch | 69 ++++++++++++++++++++++ 1 file changed, 69 insertions(+) create mode 100644 package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0005-Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0005-Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch new file +69 -0
@@ -0,0 +1,69 @@ +From ce90794a3458af0aed43b8570cf44cd87900185d Mon Sep 17 00:00:00 2001 +From: Gary Bisson <[email protected]> +Date: Fri, 25 Jul 2014 16:44:53 -0700 +Subject: [PATCH] Remove use of obsolete VIDIOC_DBG_G_CHIP_IDENT + +This ioctl should never be used in application as +stated in videodev2.h header. +Moreover, its use in this plugin was very limited. + +Signed-off-by: Gary Bisson <[email protected]> +--- + src/misc/tvsrc/src/mfw_gst_tvsrc.c | 8 -------- + src/misc/v4l_source/src/mfw_gst_v4lsrc.c | 7 ------- + 2 files changed, 15 deletions(-) + +diff --git a/src/misc/tvsrc/src/mfw_gst_tvsrc.c b/src/misc/tvsrc/src/mfw_gst_tvsrc.c +index 67e0cd2..f495b6f 100755 +--- a/src/misc/tvsrc/src/mfw_gst_tvsrc.c ++++ b/src/misc/tvsrc/src/mfw_gst_tvsrc.c +@@ -450,7 +450,6 @@ mfw_gst_tvsrc_capture_setup (MFWGstTVSRC * v4l_src) + struct v4l2_format fmt; + struct v4l2_control ctrl; + struct v4l2_streamparm parm; +- struct v4l2_dbg_chip_ident chip; + gint fd_v4l = 0; + struct v4l2_mxc_offset off; + gint in_width = 0, in_height = 0; +@@ -461,13 +460,6 @@ mfw_gst_tvsrc_capture_setup (MFWGstTVSRC * v4l_src) + return 0; + } + +- if (ioctl (fd_v4l, VIDIOC_DBG_G_CHIP_IDENT, &chip)) { +- g_print ("VIDIOC_DBG_G_CHIP_IDENT failed.\n"); +- } else +- g_print ("sensor chip is %s\n", chip.match.name); +- +- +- + if (ioctl (fd_v4l, VIDIOC_G_STD, &id) < 0) { + g_print ("VIDIOC_G_STD failed\n"); + close (fd_v4l); +diff --git a/src/misc/v4l_source/src/mfw_gst_v4lsrc.c b/src/misc/v4l_source/src/mfw_gst_v4lsrc.c +index 2c2e838..85e7ff0 100755 +--- a/src/misc/v4l_source/src/mfw_gst_v4lsrc.c ++++ b/src/misc/v4l_source/src/mfw_gst_v4lsrc.c +@@ -464,7 +464,6 @@ mfw_gst_v4lsrc_capture_setup (MFWGstV4LSrc * v4l_src) + struct v4l2_format fmt = {0}; + struct v4l2_control ctrl = {0}; + struct v4l2_streamparm parm = {0}; +- struct v4l2_dbg_chip_ident chip = {0}; + struct v4l2_frmsizeenum fszenum = {0}; + gint input; + gint fd_v4l = 0; +@@ -476,12 +475,6 @@ mfw_gst_v4lsrc_capture_setup (MFWGstV4LSrc * v4l_src) + return 0; + } + +- if (ioctl (fd_v4l, VIDIOC_DBG_G_CHIP_IDENT, &chip)) { +- GST_ERROR ("VIDIOC_DBG_G_CHIP_IDENT failed."); +- } else +- GST_INFO ("sensor chip is %s", chip.match.name); +- +- + if (v4l_src->crop_pixel) { + in_width = v4l_src->capture_width - (2 * v4l_src->crop_pixel); + in_height = v4l_src->capture_height - (2 * v4l_src->crop_pixel); +-- +2.0.1 +
Signature · 1 line
2.0.1
PATCH 1/1 gst-fsl-plugins: fix build for kernel headers >= 3.10
Dear Gary Bisson,
Quoted 4 lines · Gary Bisson
This package couldn't build using a toolchain with kernel headers >= 3.10 because of the use of
VIDIOC_DBG_G_CHIP_IDENT. As stated invideodev2.h, this ioctl should never be used.
Quoted 8 lines
Signed-off-by Gary Bisson <[email protected]>---
Yann, Thomas, all,
After looking at the source code it appears that nothing justifies the use of that obsolete ioctl. Its only purpose is to get the video device name so this patch actually removes those unnecessary calls.
Thanks,
Gary
So, if I'm correct, this supersedes the patches from Yann
(http://patchwork.ozlabs.org/patch/373813/ and
http://patchwork.ozlabs.org/patch/373814/), right ?
Thanks,
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
PATCH 1/1 gst-fsl-plugins: fix build for kernel headers >= 3.10
Thomas, All,
On 2014-07-26 09:02 +0200, Thomas Petazzoni spake thusly:
Quoted 14 lines · Gary Bisson
Quoted 4 lines
This package couldn't build using a toolchain with kernel headers >= 3.10 because of the use of
VIDIOC_DBG_G_CHIP_IDENT. As stated invideodev2.h, this ioctl should never be used.Quoted 8 lines
Signed-off-by Gary Bisson <[email protected]>---
Yann, Thomas, all,
After looking at the source code it appears that nothing justifies the use of that obsolete ioctl. Its only purpose is to get the video device name so this patch actually removes those unnecessary calls.
Thanks,
Gary
Quoted 3 lines
So, if I'm correct, this supersedes the patches from Yann
(http://patchwork.ozlabs.org/patch/373813/ and
http://patchwork.ozlabs.org/patch/373814/), right ?
Well, 373813 is still valid: it is a clarification in the manual that _AT_LEAST_X_Y symbols can be used to require either lowest or highest headers version.
So, even if we end up noy needing this for this issue, it is still valid, no?
But indeed, 373814 is supersedded by this patch from Gary (and I'm happy of the outcome!) I'll mark the affected patches supserdded in Patchwork.
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 gst-fsl-plugins: fix build for kernel headers >= 3.10
Yann, Thomas, all,
Quoted 27 lines · Yann E. MORIN
Thomas, All,
On 2014-07-26 09:02 +0200, Thomas Petazzoni spake thusly:
Quoted 9 lines · Gary Bisson
Quoted 8 lines
This package couldn't build using a toolchain with kernel headers >= 3.10 because of the use of
VIDIOC_DBG_G_CHIP_IDENT. As stated invideodev2.h, this ioctl should never be used.Signed-off-by Gary Bisson <[email protected]>---
Yann, Thomas, all,
After looking at the source code it appears that nothing justifies theuse of
Quoted 1 line
Quoted 1 line
that obsolete ioctl. Its only purpose is to get the video device name
so this
Quoted 7 lines
Quoted 3 lines
patch actually removes those unnecessary calls.
Thanks,
GarySo, if I'm correct, this supersedes the patches from Yann
(http://patchwork.ozlabs.org/patch/373813/ and
http://patchwork.ozlabs.org/patch/373814/), right ?Well, 373813 is still valid: it is a clarification in the manual that
_AT_LEAST_X_Ysymbols can be used to require either lowest or highest headers version.
Quoted 6 lines
So, even if we end up noy needing this for this issue, it is still valid, no?
But indeed, 373814 is supersedded by this patch from Gary (and I'm happy of the outcome!) I'll mark the affected patches supserdded in Patchwork.
Agreed.
Regarding upstream gst-fsl-plugins, the patch will be sent to them this week-end.
Thanks,
Gary
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.busybox.net/pipermail/buildroot/attachments/20140726/c8031351/attachment.html>
PATCH 1/1 gst-fsl-plugins: fix build for kernel headers >= 3.10
Gary, All,
On 2014-07-26 10:12 -0700, Gary Bisson spake thusly:
Quoted 15 lines
Quoted 13 lines · Yann E. MORIN
On 2014-07-26 09:02 +0200, Thomas Petazzoni spake thusly:
Quoted 4 lines · Gary Bisson
Quoted 3 lines
This package couldn't build using a toolchain with kernel headers >= 3.10 because of the use of
VIDIOC_DBG_G_CHIP_IDENT. As stated invideodev2.h, this ioctl should never be used.Well, 373813 is still valid: it is a clarification in the manual that
_AT_LEAST_X_Ysymbols can be used to require either lowest or highest headers version.So, even if we end up noy needing this for this issue, it is still valid, no?
Quoted 6 lines
Quoted 2 lines
But indeed, 373814 is supersedded by this patch from Gary (and I'm happy of the outcome!) I'll mark the affected patches supserdded in Patchwork.
Agreed.
Regarding upstream gst-fsl-plugins, the patch will be sent to them this week-end.
Thank you! :-)
Regards,
Yann E. MORIN.
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
PATCH 1/1 gst-fsl-plugins: fix build for kernel headers >= 3.10
In reply to Gary BissonGary, All,
On 2014-07-25 22:34 -0700, Gary Bisson spake thusly:
Quoted 5 lines
This package couldn't build using a toolchain with kernel headers >= 3.10 because of the use of
VIDIOC_DBG_G_CHIP_IDENT. As stated invideodev2.h, this ioctl should never be used.Signed-off-by Gary Bisson <[email protected]>
But see below...
Quoted 6 lines
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0005-Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch new file +0
-0
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0005-Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch line 8
Quoted 8 lines
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0005-Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch new file +8
-0@@ -0,0 +1,69 @@ +From ce90794a3458af0aed43b8570cf44cd87900185d Mon Sep 17 00:00:00 2001 +From: Gary Bisson <[email protected]> +Date: Fri, 25 Jul 2014 16:44:53 -0700 +Subject: [PATCH] Remove use of obsolete VIDIOC_DBG_G_CHIP_IDENT + +This ioctl should never be used in application as +stated in videodev2.h header. +Moreover, its use in this plugin was very limited.
Do not forget to send this to upstream gst-fsl-plugins. ;-)
Regards,
Yann E. MORIN.
Quoted 63 lines
package/gstreamer/gst-fsl-plugins/gst-fsl-plugins-0005-Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch new file +60
-0+Signed-off-by: Gary Bisson <[email protected]> +--- + src/misc/tvsrc/src/mfw_gst_tvsrc.c | 8 -------- + src/misc/v4l_source/src/mfw_gst_v4lsrc.c | 7 ------- + 2 files changed, 15 deletions(-) + +diff --git a/src/misc/tvsrc/src/mfw_gst_tvsrc.c b/src/misc/tvsrc/src/mfw_gst_tvsrc.c +index 67e0cd2..f495b6f 100755 +--- a/src/misc/tvsrc/src/mfw_gst_tvsrc.c ++++ b/src/misc/tvsrc/src/mfw_gst_tvsrc.c +@@ -450,7 +450,6 @@ mfw_gst_tvsrc_capture_setup (MFWGstTVSRC * v4l_src) + struct v4l2_format fmt; + struct v4l2_control ctrl; + struct v4l2_streamparm parm; +- struct v4l2_dbg_chip_ident chip; + gint fd_v4l = 0; + struct v4l2_mxc_offset off; + gint in_width = 0, in_height = 0; +@@ -461,13 +460,6 @@ mfw_gst_tvsrc_capture_setup (MFWGstTVSRC * v4l_src) + return 0; + } + +- if (ioctl (fd_v4l, VIDIOC_DBG_G_CHIP_IDENT, &chip)) { +- g_print ("VIDIOC_DBG_G_CHIP_IDENT failed.\n"); +- } else +- g_print ("sensor chip is %s\n", chip.match.name); +- +- +- + if (ioctl (fd_v4l, VIDIOC_G_STD, &id) < 0) { + g_print ("VIDIOC_G_STD failed\n"); + close (fd_v4l); +diff --git a/src/misc/v4l_source/src/mfw_gst_v4lsrc.c b/src/misc/v4l_source/src/mfw_gst_v4lsrc.c +index 2c2e838..85e7ff0 100755 +--- a/src/misc/v4l_source/src/mfw_gst_v4lsrc.c ++++ b/src/misc/v4l_source/src/mfw_gst_v4lsrc.c +@@ -464,7 +464,6 @@ mfw_gst_v4lsrc_capture_setup (MFWGstV4LSrc * v4l_src) + struct v4l2_format fmt = {0}; + struct v4l2_control ctrl = {0}; + struct v4l2_streamparm parm = {0}; +- struct v4l2_dbg_chip_ident chip = {0}; + struct v4l2_frmsizeenum fszenum = {0}; + gint input; + gint fd_v4l = 0; +@@ -476,12 +475,6 @@ mfw_gst_v4lsrc_capture_setup (MFWGstV4LSrc * v4l_src) + return 0; + } + +- if (ioctl (fd_v4l, VIDIOC_DBG_G_CHIP_IDENT, &chip)) { +- GST_ERROR ("VIDIOC_DBG_G_CHIP_IDENT failed."); +- } else +- GST_INFO ("sensor chip is %s", chip.match.name); +- +- + if (v4l_src->crop_pixel) { + in_width = v4l_src->capture_width - (2 * v4l_src->crop_pixel); + in_height = v4l_src->capture_height - (2 * v4l_src->crop_pixel); +-- +2.0.1 +Signature · 1 line
2.0.1
Signature · 6 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------'
Thomas Petazzoni
AppliedPATCH 1/1 gst-fsl-plugins: fix build for kernel headers >= 3.10
In reply to Gary BissonDear Gary Bisson,
Quoted 5 lines · Gary Bisson
This package couldn't build using a toolchain with kernel headers >= 3.10 because of the use of
VIDIOC_DBG_G_CHIP_IDENT. As stated invideodev2.h, this ioctl should never be used.Signed-off-by Gary Bisson <[email protected]>
Applied, thanks.
Thomas
Signature · 3 lines
Thomas Petazzoni, CTO, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com