All of lore.kernel.org
 help / color / mirror / Atom feed
* [meta-fsl-arm][PATCH] gst-fsl-plugin: fix build for kernel headers >= 3.10
@ 2014-07-27 23:05 Gary Bisson
  2014-07-28 21:51 ` Otavio Salvador
  0 siblings, 1 reply; 4+ messages in thread
From: Gary Bisson @ 2014-07-27 23:05 UTC (permalink / raw)
  To: meta-freescale; +Cc: 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 in
videodev2.h, this ioctl should never be used.
---
Hi all,
It has been reported that this package couldn't be built using a recent
toolchain such as CodeSourcery 2013.11 as its kernel headers are > 3.10.
After looking at the source code it appears it comes from the use of
VIDIOC_DBG_G_CHIP_IDENT ioctl. Also, 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.
It'd be great to have those call removed on next package release.
Thanks,
Gary
---
 recipes-multimedia/gstreamer/gst-fsl-plugin.inc    |  3 +-
 ...e-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch | 69 ++++++++++++++++++++++
 2 files changed, 71 insertions(+), 1 deletion(-)
 create mode 100644 recipes-multimedia/gstreamer/gst-fsl-plugin/Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch

diff --git a/recipes-multimedia/gstreamer/gst-fsl-plugin.inc b/recipes-multimedia/gstreamer/gst-fsl-plugin.inc
index dca9209..f8685bc 100644
--- a/recipes-multimedia/gstreamer/gst-fsl-plugin.inc
+++ b/recipes-multimedia/gstreamer/gst-fsl-plugin.inc
@@ -19,7 +19,8 @@ LIC_FILES_CHKSUM = "file://COPYING;md5=59530bdf33659b29e73d4adb9f9f6552 \
 S = "${WORKDIR}/gst-fsl-plugins-${PV}"
 
 SRC_URI = "${FSL_MIRROR}/gst-fsl-plugins-${PV}.tar.gz \
-           file://build-Fix-out-of-tree-build.patch"
+           file://build-Fix-out-of-tree-build.patch \
+           file://Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch"
 
 inherit autotools pkgconfig
 
diff --git a/recipes-multimedia/gstreamer/gst-fsl-plugin/Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch b/recipes-multimedia/gstreamer/gst-fsl-plugin/Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch
new file mode 100644
index 0000000..5635275
--- /dev/null
+++ b/recipes-multimedia/gstreamer/gst-fsl-plugin/Remove-use-of-obsolete-VIDIOC_DBG_G_CHIP_IDENT.patch
@@ -0,0 +1,69 @@
+From ce90794a3458af0aed43b8570cf44cd87900185d Mon Sep 17 00:00:00 2001
+From: Gary Bisson <bisson.gary@gmail.com>
+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 <bisson.gary@gmail.com>
+---
+ 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
+
-- 
2.0.1



^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [meta-fsl-arm][PATCH] gst-fsl-plugin: fix build for kernel headers >= 3.10
  2014-07-27 23:05 [meta-fsl-arm][PATCH] gst-fsl-plugin: fix build for kernel headers >= 3.10 Gary Bisson
@ 2014-07-28 21:51 ` Otavio Salvador
  2014-07-29 14:38   ` Lauren Post
  0 siblings, 1 reply; 4+ messages in thread
From: Otavio Salvador @ 2014-07-28 21:51 UTC (permalink / raw)
  To: Gary Bisson, Lauren Post; +Cc: meta-freescale

Hello Gary,

(adding Lauren in Cc)

On Sun, Jul 27, 2014 at 8:05 PM, Gary Bisson <bisson.gary@gmail.com> wrote:
> 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.

The patch seems fine for me. Lauren, can you ask internally for a review?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-fsl-arm][PATCH] gst-fsl-plugin: fix build for kernel headers >= 3.10
  2014-07-28 21:51 ` Otavio Salvador
@ 2014-07-29 14:38   ` Lauren Post
  2014-07-29 15:00     ` Otavio Salvador
  0 siblings, 1 reply; 4+ messages in thread
From: Lauren Post @ 2014-07-29 14:38 UTC (permalink / raw)
  To: Otavio Salvador, Gary Bisson; +Cc: meta-freescale

I've forwarded to multimedia team yesterday and waiting on their comment.

-----Original Message-----
From: otavio.salvador@gmail.com [mailto:otavio.salvador@gmail.com] On Behalf Of Otavio Salvador
Sent: Monday, July 28, 2014 4:51 PM
To: Gary Bisson; Post Lauren-RAA013
Cc: meta-freescale@yoctoproject.org
Subject: Re: [meta-freescale] [meta-fsl-arm][PATCH] gst-fsl-plugin: fix build for kernel headers >= 3.10

Hello Gary,

(adding Lauren in Cc)

On Sun, Jul 27, 2014 at 8:05 PM, Gary Bisson <bisson.gary@gmail.com> wrote:
> 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.

The patch seems fine for me. Lauren, can you ask internally for a review?

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [meta-fsl-arm][PATCH] gst-fsl-plugin: fix build for kernel headers >= 3.10
  2014-07-29 14:38   ` Lauren Post
@ 2014-07-29 15:00     ` Otavio Salvador
  0 siblings, 0 replies; 4+ messages in thread
From: Otavio Salvador @ 2014-07-29 15:00 UTC (permalink / raw)
  To: Lauren Post; +Cc: meta-freescale, Gary Bisson

On Tue, Jul 29, 2014 at 11:38 AM, Lauren Post <Lauren.Post@freescale.com> wrote:
> I've forwarded to multimedia team yesterday and waiting on their comment.

I have put it in master-next[1] and the build has suceed in all backends.

1. http://ci.ossystems.com.br/job/fsl-community-bsp-master/227/changes

-- 
Otavio Salvador                             O.S. Systems
http://www.ossystems.com.br        http://code.ossystems.com.br
Mobile: +55 (53) 9981-7854            Mobile: +1 (347) 903-9750


^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-07-29 15:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-07-27 23:05 [meta-fsl-arm][PATCH] gst-fsl-plugin: fix build for kernel headers >= 3.10 Gary Bisson
2014-07-28 21:51 ` Otavio Salvador
2014-07-29 14:38   ` Lauren Post
2014-07-29 15:00     ` Otavio Salvador

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.