Re: [PATCH 1/6] adv7180: Remove duplicate unregister call
On 07/06/2014 12:26 AM, Ben Dooks wrote: From: Ian Molton ian.mol...@codethink.co.uk This driver moved over to v4l2_async_unregister_subdev() but still retained a call to v4l2_unregister_subdev(). Remove. Signed-off-by: Ian Molton ian.mol...@codethink.co.uk Signed-off-by: Ben Dooks ben.do...@codethink.co.uk Acked-by: Hans Verkuil hans.verk...@cisco.com Thanks, Hans --- drivers/media/i2c/adv7180.c | 1 - 1 file changed, 1 deletion(-) diff --git a/drivers/media/i2c/adv7180.c b/drivers/media/i2c/adv7180.c index ac1cdbe..821178d 100644 --- a/drivers/media/i2c/adv7180.c +++ b/drivers/media/i2c/adv7180.c @@ -663,7 +663,6 @@ static int adv7180_remove(struct i2c_client *client) if (state-irq 0) free_irq(client-irq, state); - v4l2_device_unregister_subdev(sd); adv7180_exit_controls(state); mutex_destroy(state-mutex); return 0; -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR v3.17] A bunch of
These are all little fixes for issues I found while working on the vivi replacement + some docbook fixes. Usually all for fairly obscure corner cases, but that's what you write a test driver for, after all. Regards, Hans The following changes since commit 3c0d394ea7022bb9666d9df97a5776c4bcc3045c: [media] dib8000: improve the message that reports per-layer locks (2014-07-07 09:59:01 -0300) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git core-fixes for you to fetch changes up to 2eb86fa0840ac281cc5ca0a63f1339fa00245c7d: v4l2-ioctl.c: check vfl_type in ENUM_FMT. (2014-07-14 14:55:47 +0200) Hans Verkuil (12): DocBook media: fix wrong spacing DocBook media: add missing dqevent src_change field. DocBook media: fix incorrect header reference v4l2-ioctl: call g_selection before calling cropcap v4l2-ioctl: clips, clipcount and bitmap should not be zeroed. v4l2-ioctl: clear reserved field of G/S_SELECTION. v4l2-ioctl: remove pointless INFO_FL_CLEAR. v4l2-dev: don't debug poll unless the debug level 2 videodev2.h: add V4L2_FIELD_HAS_T_OR_B macro v4l2-dev: streamon/off is only a valid ioctl for video, vbi and sdr v4l2-ioctl.c: fix enum_freq_bands handling v4l2-ioctl.c: check vfl_type in ENUM_FMT. Documentation/DocBook/media/v4l/pixfmt.xml | 2 +- Documentation/DocBook/media/v4l/selection-api.xml | 95 --- Documentation/DocBook/media/v4l/vidioc-dqevent.xml | 6 Documentation/DocBook/media/v4l/vidioc-g-selection.xml | 40 +-- drivers/media/v4l2-core/v4l2-dev.c | 6 ++-- drivers/media/v4l2-core/v4l2-ioctl.c | 103 + include/uapi/linux/videodev2.h | 4 +++ 7 files changed, 148 insertions(+), 108 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL FOR v3.17] A bunch of
OK, so the full subject line should have been: A bunch of little v4l2 core fixes :-) Hans On 07/17/2014 10:09 AM, Hans Verkuil wrote: These are all little fixes for issues I found while working on the vivi replacement + some docbook fixes. Usually all for fairly obscure corner cases, but that's what you write a test driver for, after all. Regards, Hans The following changes since commit 3c0d394ea7022bb9666d9df97a5776c4bcc3045c: [media] dib8000: improve the message that reports per-layer locks (2014-07-07 09:59:01 -0300) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git core-fixes for you to fetch changes up to 2eb86fa0840ac281cc5ca0a63f1339fa00245c7d: v4l2-ioctl.c: check vfl_type in ENUM_FMT. (2014-07-14 14:55:47 +0200) Hans Verkuil (12): DocBook media: fix wrong spacing DocBook media: add missing dqevent src_change field. DocBook media: fix incorrect header reference v4l2-ioctl: call g_selection before calling cropcap v4l2-ioctl: clips, clipcount and bitmap should not be zeroed. v4l2-ioctl: clear reserved field of G/S_SELECTION. v4l2-ioctl: remove pointless INFO_FL_CLEAR. v4l2-dev: don't debug poll unless the debug level 2 videodev2.h: add V4L2_FIELD_HAS_T_OR_B macro v4l2-dev: streamon/off is only a valid ioctl for video, vbi and sdr v4l2-ioctl.c: fix enum_freq_bands handling v4l2-ioctl.c: check vfl_type in ENUM_FMT. Documentation/DocBook/media/v4l/pixfmt.xml | 2 +- Documentation/DocBook/media/v4l/selection-api.xml | 95 --- Documentation/DocBook/media/v4l/vidioc-dqevent.xml | 6 Documentation/DocBook/media/v4l/vidioc-g-selection.xml | 40 +-- drivers/media/v4l2-core/v4l2-dev.c | 6 ++-- drivers/media/v4l2-core/v4l2-ioctl.c | 103 + include/uapi/linux/videodev2.h | 4 +++ 7 files changed, 148 insertions(+), 108 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: vb2_reqbufs() is not allowing more than VIDEO_MAX_FRAME
Hi Divneil, This patch is all messed up and doesn't apply. Check your mailer settings: it clearly replaced hard tabs by a space. Can you repost? Regards, Hans On 07/07/2014 09:27 AM, Divneil Wadhawan wrote: Hi Hans, include/media/davinci/vpfe_capture.h It uses videobuf-dma-contig.h, so, I left it out. drivers/media/platform/vivi-core.c Cannot find this one. Checked with find, in case it changed location, but couldn't. drivers/media/pci/saa7134/* Updated. Please find below the patch. I am hoping it's good to go. Regards, Divneil From 1792d75dc0f893a181d991a0b238bbd0ead945c1 Mon Sep 17 00:00:00 2001 From: Divneil Wadhawan divneil.wadha...@st.com Date: Mon, 7 Jul 2014 12:38:06 +0530 Subject: [PATCH] v4l2: vb2: replace VIDEO_MAX_FRAME with VB2_MAX_FRAME - vb2 drivers to rely on VB2_MAX_FRAME. - VB2_MAX_FRAME bumps the value to 64 from current 32 Change-Id: I3d7998898df43553486166c44b54524aac449deb Signed-off-by: Divneil Wadhawan divneil.wadha...@st.com --- drivers/media/pci/saa7134/saa7134-ts.c|4 ++-- drivers/media/pci/saa7134/saa7134-vbi.c |4 ++-- drivers/media/pci/saa7134/saa7134-video.c |2 +- drivers/media/platform/mem2mem_testdev.c |2 +- drivers/media/platform/ti-vpe/vpe.c |2 +- drivers/media/v4l2-core/videobuf2-core.c |8 include/media/videobuf2-core.h|4 +++- 7 files changed, 14 insertions(+), 12 deletions(-) diff --git a/drivers/media/pci/saa7134/saa7134-ts.c b/drivers/media/pci/saa7134/saa7134-ts.c index bd25323..0d04995 100644 --- a/drivers/media/pci/saa7134/saa7134-ts.c +++ b/drivers/media/pci/saa7134/saa7134-ts.c @@ -227,8 +227,8 @@ int saa7134_ts_init1(struct saa7134_dev *dev) /* sanitycheck insmod options */ if (tsbufs 2) tsbufs = 2; - if (tsbufs VIDEO_MAX_FRAME) - tsbufs = VIDEO_MAX_FRAME; + if (tsbufs VB2_MAX_FRAME) + tsbufs = VB2_MAX_FRAME; if (ts_nr_packets 4) ts_nr_packets = 4; if (ts_nr_packets 312) diff --git a/drivers/media/pci/saa7134/saa7134-vbi.c b/drivers/media/pci/saa7134/saa7134-vbi.c index c06dbe1..15b5860 100644 --- a/drivers/media/pci/saa7134/saa7134-vbi.c +++ b/drivers/media/pci/saa7134/saa7134-vbi.c @@ -203,8 +203,8 @@ int saa7134_vbi_init1(struct saa7134_dev *dev) if (vbibufs 2) vbibufs = 2; - if (vbibufs VIDEO_MAX_FRAME) - vbibufs = VIDEO_MAX_FRAME; + if (vbibufs VB2_MAX_FRAME) + vbibufs = VB2_MAX_FRAME; return 0; } diff --git a/drivers/media/pci/saa7134/saa7134-video.c b/drivers/media/pci/saa7134/saa7134-video.c index d375999..47dda6c 100644 --- a/drivers/media/pci/saa7134/saa7134-video.c +++ b/drivers/media/pci/saa7134/saa7134-video.c @@ -2032,7 +2032,7 @@ int saa7134_video_init1(struct saa7134_dev *dev) int ret; /* sanitycheck insmod options */ - if (gbuffers 2 || gbuffers VIDEO_MAX_FRAME) + if (gbuffers 2 || gbuffers VB2_MAX_FRAME) gbuffers = 2; if (gbufsize gbufsize_max) gbufsize = gbufsize_max; diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/media/platform/mem2mem_testdev.c index 0714070..fe3235d 100644 --- a/drivers/media/platform/mem2mem_testdev.c +++ b/drivers/media/platform/mem2mem_testdev.c @@ -55,7 +55,7 @@ MODULE_PARM_DESC(debug, activates debug info); #define MEM2MEM_NAME m2m-testdev /* Per queue */ -#define MEM2MEM_DEF_NUM_BUFS VIDEO_MAX_FRAME +#define MEM2MEM_DEF_NUM_BUFS VB2_MAX_FRAME /* In bytes, per queue */ #define MEM2MEM_VID_MEM_LIMIT (16 * 1024 * 1024) diff --git a/drivers/media/platform/ti-vpe/vpe.c b/drivers/media/platform/ti-vpe/vpe.c index 972f43f..6b370ed 100644 --- a/drivers/media/platform/ti-vpe/vpe.c +++ b/drivers/media/platform/ti-vpe/vpe.c @@ -1970,7 +1970,7 @@ static const struct v4l2_ctrl_config vpe_bufs_per_job = { .type = V4L2_CTRL_TYPE_INTEGER, .def = VPE_DEF_BUFS_PER_JOB, .min = 1, - .max = VIDEO_MAX_FRAME, + .max = VB2_MAX_FRAME, .step = 1, }; diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 7c4489c..09bc9bb 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -904,7 +904,7 @@ static int __reqbufs(struct vb2_queue *q, struct v4l2_requestbuffers *req) /* * Make sure the requested values and current defaults are sane. */ - num_buffers = min_t(unsigned int, req-count, VIDEO_MAX_FRAME); + num_buffers = min_t(unsigned int, req-count, VB2_MAX_FRAME); num_buffers = max_t(unsigned int, num_buffers, q-min_buffers_needed); memset(q-plane_sizes, 0, sizeof(q-plane_sizes)); memset(q-alloc_ctx, 0, sizeof(q-alloc_ctx)); @@ -1005,7 +1005,7 @@ static int __create_bufs(struct vb2_queue *q, struct v4l2_create_buffers *create unsigned int num_planes = 0, num_buffers, allocated_buffers; int ret; - if (q-num_buffers == VIDEO_MAX_FRAME) { + if (q-num_buffers == VB2_MAX_FRAME) { dprintk(1, maximum
Re: [PATCH v2] media: vb2: verify data_offset only if nonzero bytesused
Hi Nikhil, First of all, sorry for the delay in answering. I needed some time to really look at this. Anyway, this patch as is is not good enough since it does not handle the case where data_offset is length and bytesused == 0. However, I think the solution should be done differently. I'll prepare a patch for this and CC it to you so you can take a look at it. Regards, Hans On 06/23/2014 11:45 AM, Nikhil Devshatwar wrote: verify_length would fail if the user space fills up the data_offset field and bytesused is left as zero. Correct this. If bytesused is not populated, it means bytesused is same as length. Checking data offset = bytesused makes sense only if bytesused is valid. Signed-off-by: Nikhil Devshatwar nikhil...@ti.com --- drivers/media/v4l2-core/videobuf2-core.c |2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 7c4489c..369a155 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -590,7 +590,7 @@ static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b) if (b-m.planes[plane].bytesused length) return -EINVAL; - if (b-m.planes[plane].data_offset 0 + if (b-m.planes[plane].bytesused 0 b-m.planes[plane].data_offset = b-m.planes[plane].bytesused) return -EINVAL; -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR v3.17] Assorted patches
Mostly little cleanups and adding a new card to cx23885. Hans The following changes since commit 3c0d394ea7022bb9666d9df97a5776c4bcc3045c: [media] dib8000: improve the message that reports per-layer locks (2014-07-07 09:59:01 -0300) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git for-v3.17b for you to fetch changes up to 46c9074bfa73aaf1dfce77d078fcf636652d4e99: zoran: remove duplicate ZR050_MO_COMP define (2014-07-17 10:49:11 +0200) Andreas Weber (1): DocBook media: fix number of bits filled with zeros for Andrey Utkin (3): solo6x10: expose encoder quantization setting as V4L2 control solo6x10: update GOP size, QP immediately media: pvrusb2: make logging code sane Anil Belur (1): staging: media: bcm2048: radio-bcm2048.c - removed IRQF_DISABLED macro Dan Carpenter (1): zoran: remove duplicate ZR050_MO_COMP define Geert Uytterhoeven (1): staging/solo6x10: SOLO6X10 should select BITREVERSE Hans Verkuil (3): cx23885: fix UNSET/TUNER_ABSENT confusion. cx23885: add support for Hauppauge ImpactVCB-e hdpvr: fix reported HDTV colorspace Himangi Saraogi (1): saa7164-dvb: Remove unnecessary null test Luke Hart (1): radio-bcm2048.c: Fix some checkpatch.pl errors Documentation/DocBook/media/v4l/pixfmt-srggb12.xml | 2 +- drivers/media/pci/cx23885/cx23885-417.c| 8 drivers/media/pci/cx23885/cx23885-cards.c | 31 ++- drivers/media/pci/cx23885/cx23885-video.c | 11 ++- drivers/media/pci/cx23885/cx23885.h| 1 + drivers/media/pci/saa7164/saa7164-dvb.c| 32 ++-- drivers/media/pci/zoran/zr36050.h | 1 - drivers/media/usb/hdpvr/hdpvr-video.c | 2 +- drivers/media/usb/pvrusb2/pvrusb2-v4l2.c | 12 +++- drivers/staging/media/bcm2048/radio-bcm2048.c | 22 +++--- drivers/staging/media/solo6x10/Kconfig | 1 + drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 9 + 12 files changed, 81 insertions(+), 51 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] vb2: fix bytesused == 0 handling
The original report from Nikhil was that if data_offset 0 and bytesused == 0, then the check in __verify_length() would fail, even though the spec says that if bytes_used == 0, then it will be replaced by the actual length of the buffer. After digging into it a bit more I realized that there were several other things wrong: - in __verify_length() it would use the application-provided length value for USERPTR and the vb2 core length for other memory models, but it should have used the application-provided length as well for DMABUF. - in __fill_vb2_buffer() on the other hand it would replace bytesused == 0 by the application-provided length, even for MMAP buffers where the length is determined by the vb2 core. - in __fill_vb2_buffer() it tries to figure out if all the planes have bytesused == 0 before it will decide to replace bytesused by length. However, the spec makes no such provision, and it makes for convoluted code. So just replace any bytesused == 0 by the proper length. The idea behind this was that you could use bytesused to signal empty planes, something that is currently not supported. But that is better done in the future by using one of the reserved fields in strucy v4l2_plane. This patch fixes all these issues. Regards, Hans Signed-off-by: Hans Verkuil hans.verk...@cisco.com Reported-by: Nikhil Devshatwar nikhil...@ti.com Cc: Nikhil Devshatwar nikhil...@ti.com --- drivers/media/v4l2-core/videobuf2-core.c | 78 1 file changed, 38 insertions(+), 40 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-core.c index 7c4489c..f255c14 100644 --- a/drivers/media/v4l2-core/videobuf2-core.c +++ b/drivers/media/v4l2-core/videobuf2-core.c @@ -576,6 +576,7 @@ static int __verify_planes_array(struct vb2_buffer *vb, const struct v4l2_buffer static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b) { unsigned int length; + unsigned int bytesused; unsigned int plane; if (!V4L2_TYPE_IS_OUTPUT(b-type)) @@ -583,21 +584,24 @@ static int __verify_length(struct vb2_buffer *vb, const struct v4l2_buffer *b) if (V4L2_TYPE_IS_MULTIPLANAR(b-type)) { for (plane = 0; plane vb-num_planes; ++plane) { - length = (b-memory == V4L2_MEMORY_USERPTR) + length = (b-memory == V4L2_MEMORY_USERPTR || + b-memory == V4L2_MEMORY_DMABUF) ? b-m.planes[plane].length : vb-v4l2_planes[plane].length; + bytesused = b-m.planes[plane].bytesused + ? b-m.planes[plane].bytesused : length; if (b-m.planes[plane].bytesused length) return -EINVAL; if (b-m.planes[plane].data_offset 0 - b-m.planes[plane].data_offset = - b-m.planes[plane].bytesused) + b-m.planes[plane].data_offset = bytesused) return -EINVAL; } } else { length = (b-memory == V4L2_MEMORY_USERPTR) ? b-length : vb-v4l2_planes[0].length; + bytesused = b-bytesused ? b-bytesused : length; if (b-bytesused length) return -EINVAL; @@ -1234,35 +1238,6 @@ static void __fill_vb2_buffer(struct vb2_buffer *vb, const struct v4l2_buffer *b unsigned int plane; if (V4L2_TYPE_IS_MULTIPLANAR(b-type)) { - /* Fill in driver-provided information for OUTPUT types */ - if (V4L2_TYPE_IS_OUTPUT(b-type)) { - bool bytesused_is_used; - - /* Check if bytesused == 0 for all planes */ - for (plane = 0; plane vb-num_planes; ++plane) - if (b-m.planes[plane].bytesused) - break; - bytesused_is_used = plane vb-num_planes; - - /* -* Will have to go up to b-length when API starts -* accepting variable number of planes. -* -* If bytesused_is_used is false, then fall back to the -* full buffer size. In that case userspace clearly -* never bothered to set it and it's a safe assumption -* that they really meant to use the full plane sizes. -*/ - for (plane = 0; plane vb-num_planes; ++plane) { - struct v4l2_plane *pdst = v4l2_planes[plane]; - struct v4l2_plane *psrc = b-m.planes[plane]; - - pdst-bytesused =
[GIT PULL FOR v3.17] OMAP4 ISS fixes and enhancements
Hi Mauro, The following changes since commit 3c0d394ea7022bb9666d9df97a5776c4bcc3045c: [media] dib8000: improve the message that reports per-layer locks (2014-07-07 09:59:01 -0300) are available in the git repository at: git://linuxtv.org/pinchartl/media.git omap4iss/next for you to fetch changes up to 97c9a001293360b566cb20853df2bd4b772d820f: MAINTAINERS: Add the OMAP4 ISS driver (2014-07-17 12:10:07 +0200) Arnd Bergmann (1): v4l: omap4iss: tighten omap4iss dependencies Laurent Pinchart (7): v4l: vb2: Don't return POLLERR during transient buffer underruns v4l: vb2: Add fatal error condition flag v4l: omap4iss: Don't reinitialize the video qlock at every streamon v4l: omap4iss: Add module debug parameter v4l: omap4iss: Use the devm_* managed allocators v4l: omap4iss: Signal fatal errors to the vb2 queue MAINTAINERS: Add the OMAP4 ISS driver Vitaly Osipov (1): v4l: omap4iss: Copy paste error in iss_get_clocks MAINTAINERS| 3 +- drivers/media/v4l2-core/videobuf2-core.c | 40 -- drivers/staging/media/omap4iss/Kconfig | 2 +- drivers/staging/media/omap4iss/iss.c | 86 +++-- drivers/staging/media/omap4iss/iss_video.c | 22 +- include/media/videobuf2-core.h | 3 ++ 6 files changed, 64 insertions(+), 92 deletions(-) -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] smiapp: Set sub-device owner
Hi Sakari, What happened to this patch ? 1/3 and 3/3 from the same series seem to have been applied, but not 2/3. On Friday 28 March 2014 16:35:12 Sakari Ailus wrote: The smiapp driver is the owner of the sub-devices exposed by the smiapp driver. This prevents unloading the module whilst it's in use. Signed-off-by: Sakari Ailus sakari.ai...@linux.intel.com --- drivers/media/i2c/smiapp/smiapp-core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 69c11ec..5179cf4 100644 --- a/drivers/media/i2c/smiapp/smiapp-core.c +++ b/drivers/media/i2c/smiapp/smiapp-core.c @@ -2569,7 +2569,7 @@ static int smiapp_registered(struct v4l2_subdev *subdev) this-sd.flags |= V4L2_SUBDEV_FL_HAS_DEVNODE; this-sd.internal_ops = smiapp_internal_ops; - this-sd.owner = NULL; + this-sd.owner = THIS_MODULE; v4l2_set_subdevdata(this-sd, client); rval = media_entity_init(this-sd.entity, -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR v3.17] mt9v032 sensor patches
Hi Mauro, The following changes since commit 3c0d394ea7022bb9666d9df97a5776c4bcc3045c: [media] dib8000: improve the message that reports per-layer locks (2014-07-07 09:59:01 -0300) are available in the git repository at: git://linuxtv.org/pinchartl/media.git sensors/next for you to fetch changes up to 0a7db4ceaa58c01bce53e33928049491fd9215fc: mt9v032: use regmap (2014-07-17 12:35:39 +0200) Philipp Zabel (5): mt9v032: fix hblank calculation mt9v032: do not clear reserved bits in read mode register mt9v032: add support for mt9v022 and mt9v024 mt9v032: register v4l2 asynchronous subdevice mt9v032: use regmap drivers/media/i2c/Kconfig | 1 + drivers/media/i2c/mt9v032.c | 166 --- 2 files changed, 93 insertions(+), 74 deletions(-) -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR v3.17] Three trivial davinci patches
The following changes since commit 3c0d394ea7022bb9666d9df97a5776c4bcc3045c: [media] dib8000: improve the message that reports per-layer locks (2014-07-07 09:59:01 -0300) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git davinci for you to fetch changes up to 5588d119ac994cc8929e0fa5d0655811ee02df3a: davinci: vpfe: dm365: remove duplicate RSZ_LPF_INT_MASK (2014-07-17 12:58:57 +0200) Dan Carpenter (1): davinci: vpfe: dm365: remove duplicate RSZ_LPF_INT_MASK Lad, Prabhakar (2): staging: media: davinci_vpfe: fix checkpatch warning media: davinci_vpfe: dm365_resizer: fix sparse warning drivers/staging/media/davinci_vpfe/dm365_ipipe.c| 2 ++ drivers/staging/media/davinci_vpfe/dm365_ipipe_hw.h | 1 - drivers/staging/media/davinci_vpfe/dm365_resizer.c | 4 ++-- 3 files changed, 4 insertions(+), 3 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 3/3] [media] atmel-isi: add primary DT support
Hi Josh, What's the status of this patch set ? Do you plan to rebase and resubmit it ? On Monday 31 March 2014 17:05:13 Josh Wu wrote: Dear Guennadi On 3/31/2014 5:20 AM, Guennadi Liakhovetski wrote: Hi Josh, Please correct me if I'm wrong, but I don't see how this is going to work without the central part - building asynchronous V4L2 data structures from the DT, something that your earlier patch Here you mean Bryan Wu not me, right? ;-) Bryan write the patch [v2] media: soc-camera: OF cameras in: https://patchwork.linuxtv.org/patch/22288/. And I saw Ben Dooks already sent out his patch to support soc-camera OF now (https://patchwork.linuxtv.org/patch/23304/) which is simpler than Bryan's. media: soc-camera: OF cameras was doing, but which you stopped developing after a discussion with Ben (added to Cc). And yes, atmel-isi dt patch should not work without above SoC-Camera of support patch. But as the atmel-isi dt binding document and port node can be finalized. So I think this patch is ready for the mainline. BTW: I will test Ben's patch with atmel-isi. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 2/3] smiapp: Set sub-device owner
On Thu, Jul 17, 2014 at 12:22:47PM +0200, Laurent Pinchart wrote: Hi Sakari, What happened to this patch ? 1/3 and 3/3 from the same series seem to have been applied, but not 2/3. I think this must have fallen through the cracks when I added a number of other patches to the set. Thanks for notifying me. -- Kind regards, Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/28] IPUv3 prep for video capture
Hi Steve, I don't know what your plan is, but when you want to mainline this it is the gpu subsystem that needs to review it. I noticed it wasn't cross-posted to the dri-devel mailinglist. I am a bit worried about the amount of v4l2-specific stuff that is going into drivers/gpu/ipu-v3. Do things like csc and csi really belong there instead of under drivers/media? Let me know if this was just preliminary code, or if this was intended to be the final code. I suspect the former. Regards, Hans On 06/26/2014 03:05 AM, Steve Longerbeam wrote: Hi Philip, Sascha, Here is a rebased set of IPU patches that prepares for video capture support. Video capture is not included in this set. I've addressed all your IPU-specific concerns from the previous patch set, the major ones being: - the IOMUXC control for CSI input selection has been removed. This should be part of a future CSI media entity driver. - the ipu-irt unit has been removed. Enabling the IRT module is folded into ipu-ic unit. The ipu-ic unit is also cleaned up a bit. - the ipu-csi APIs are consolidated/simplified. - added CSI and IC base offsets for i.MX51/i.MX53. Steve Longerbeam (28): ARM: dts: imx6qdl: Add ipu aliases gpu: ipu-v3: Add ipu_get_num() gpu: ipu-v3: Add functions to set CSI/IC source muxes gpu: ipu-v3: Rename and add IDMAC channels gpu: ipu-v3: Add units required for video capture gpu: ipu-v3: smfc: Move enable/disable to ipu-smfc.c gpu: ipu-v3: smfc: Convert to per-channel gpu: ipu-v3: smfc: Add ipu_smfc_set_watermark() gpu: ipu-v3: Add ipu_mbus_code_to_colorspace() gpu: ipu-v3: Add rotation mode conversion utilities gpu: ipu-v3: Add helper function checking if pixfmt is planar gpu: ipu-v3: Move IDMAC channel names to imx-ipu-v3.h gpu: ipu-v3: Add ipu_idmac_buffer_is_ready() gpu: ipu-v3: Add ipu_idmac_clear_buffer() gpu: ipu-v3: Add __ipu_idmac_reset_current_buffer() gpu: ipu-v3: Add ipu_stride_to_bytes() gpu: ipu-v3: Add ipu_idmac_enable_watermark() gpu: ipu-v3: Add ipu_idmac_lock_enable() gpu: ipu-v3: Add idmac channel linking support gpu: ipu-v3: Add ipu-cpmem unit staging: imx-drm: Convert to new ipu_cpmem API gpu: ipu-cpmem: Add ipu_cpmem_set_block_mode() gpu: ipu-cpmem: Add ipu_cpmem_set_axi_id() gpu: ipu-cpmem: Add ipu_cpmem_set_rotation() gpu: ipu-cpmem: Add second buffer support to ipu_cpmem_set_image() gpu: ipu-v3: Add more planar formats support gpu: ipu-cpmem: Add ipu_cpmem_dump() gpu: ipu-v3: Add ipu_dump() arch/arm/boot/dts/imx6q.dtsi |1 + arch/arm/boot/dts/imx6qdl.dtsi|1 + drivers/gpu/ipu-v3/Makefile |3 +- drivers/gpu/ipu-v3/ipu-common.c | 1077 +++-- drivers/gpu/ipu-v3/ipu-cpmem.c| 817 + drivers/gpu/ipu-v3/ipu-csi.c | 701 + drivers/gpu/ipu-v3/ipu-ic.c | 812 + drivers/gpu/ipu-v3/ipu-prv.h | 103 +++- drivers/gpu/ipu-v3/ipu-smfc.c | 156 - drivers/staging/imx-drm/ipuv3-plane.c | 16 +- include/video/imx-ipu-v3.h| 371 +++- 11 files changed, 3389 insertions(+), 669 deletions(-) create mode 100644 drivers/gpu/ipu-v3/ipu-cpmem.c create mode 100644 drivers/gpu/ipu-v3/ipu-csi.c create mode 100644 drivers/gpu/ipu-v3/ipu-ic.c -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR v3.17] Replace V4L2_FIELD_ANY with V4L2_FIELD_NONE in subdev drivers
Hi Mauro, The following changes since commit 3c0d394ea7022bb9666d9df97a5776c4bcc3045c: [media] dib8000: improve the message that reports per-layer locks (2014-07-07 09:59:01 -0300) are available in the git repository at: git://linuxtv.org/pinchartl/media.git v4l2/field for you to fetch changes up to dce4c80f5842f80527c31b8a07e2910b5d489ee6: v4l: s3c-camif: Return V4L2_FIELD_NONE from pad-level set format (2014-07-17 13:16:51 +0200) Laurent Pinchart (6): v4l: noon010p30: Return V4L2_FIELD_NONE from pad-level set format v4l: s5k4ecgx: Return V4L2_FIELD_NONE from pad-level set format v4l: s5k5baf: Return V4L2_FIELD_NONE from pad-level set format v4l: s5k6a3: Return V4L2_FIELD_NONE from pad-level set format v4l: smiapp: Return V4L2_FIELD_NONE from pad-level get/set format v4l: s3c-camif: Return V4L2_FIELD_NONE from pad-level set format drivers/media/i2c/noon010pc30.c | 1 + drivers/media/i2c/s5k4ecgx.c | 1 + drivers/media/i2c/s5k5baf.c | 2 ++ drivers/media/i2c/s5k6a3.c | 1 + drivers/media/i2c/smiapp/smiapp-core.c | 3 +++ drivers/media/platform/s3c-camif/camif-capture.c | 2 ++ 6 files changed, 10 insertions(+) -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] tvp5150: Use i2c_smbus_(read|write)_byte_data
Hi Mauro, Ping ? On Monday 26 May 2014 21:31:28 Laurent Pinchart wrote: Replace the custom I2C read/write implementation with SMBUS functions to simplify the driver. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/i2c/tvp5150.c | 31 +++ 1 file changed, 11 insertions(+), 20 deletions(-) diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index 937e48b..193e7d6 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c @@ -56,38 +56,29 @@ static inline struct v4l2_subdev *to_sd(struct v4l2_ctrl *ctrl) static int tvp5150_read(struct v4l2_subdev *sd, unsigned char addr) { struct i2c_client *c = v4l2_get_subdevdata(sd); - unsigned char buffer[1]; int rc; - struct i2c_msg msg[] = { - { .addr = c-addr, .flags = 0, - .buf = addr, .len = 1 }, - { .addr = c-addr, .flags = I2C_M_RD, - .buf = buffer, .len = 1 } - }; - - rc = i2c_transfer(c-adapter, msg, 2); - if (rc 0 || rc != 2) { - v4l2_err(sd, i2c i/o error: rc == %d (should be 2)\n, rc); - return rc 0 ? rc : -EIO; + + rc = i2c_smbus_read_byte_data(c, addr); + if (rc 0) { + v4l2_err(sd, i2c i/o error: rc == %d\n, rc); + return rc; } - v4l2_dbg(2, debug, sd, tvp5150: read 0x%02x = 0x%02x\n, addr, buffer[0]); + v4l2_dbg(2, debug, sd, tvp5150: read 0x%02x = 0x%02x\n, addr, rc); - return (buffer[0]); + return rc; } static inline void tvp5150_write(struct v4l2_subdev *sd, unsigned char addr, unsigned char value) { struct i2c_client *c = v4l2_get_subdevdata(sd); - unsigned char buffer[2]; int rc; - buffer[0] = addr; - buffer[1] = value; - v4l2_dbg(2, debug, sd, tvp5150: writing 0x%02x 0x%02x\n, buffer[0], buffer[1]); - if (2 != (rc = i2c_master_send(c, buffer, 2))) - v4l2_dbg(0, debug, sd, i2c i/o error: rc == %d (should be 2)\n, rc); + v4l2_dbg(2, debug, sd, tvp5150: writing 0x%02x 0x%02x\n, addr, value); + rc = i2c_smbus_write_byte_data(c, addr, value); + if (rc 0) + v4l2_dbg(0, debug, sd, i2c i/o error: rc == %d\n, rc); } static void dump_reg_range(struct v4l2_subdev *sd, char *s, u8 init, -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] tvp5150: Fix device ID kernel log message
Hi Mauro, Ping ? On Monday 26 May 2014 21:28:31 Laurent Pinchart wrote: The driver mistakenly prints the ROM version instead of the device ID to the kernel log when detecting the chip. Fix it. Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/i2c/tvp5150.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/tvp5150.c b/drivers/media/i2c/tvp5150.c index a912125..937e48b 100644 --- a/drivers/media/i2c/tvp5150.c +++ b/drivers/media/i2c/tvp5150.c @@ -1148,10 +1148,10 @@ static int tvp5150_probe(struct i2c_client *c, /* Is TVP5150A */ if (tvp5150_id[2] == 3 || tvp5150_id[3] == 0x21) { v4l2_info(sd, tvp%02x%02xa detected.\n, - tvp5150_id[2], tvp5150_id[3]); + tvp5150_id[0], tvp5150_id[1]); } else { v4l2_info(sd, *** unknown tvp%02x%02x chip detected.\n, - tvp5150_id[2], tvp5150_id[3]); + tvp5150_id[0], tvp5150_id[1]); v4l2_info(sd, *** Rom ver is %d.%d\n, tvp5150_id[2], tvp5150_id[3]); } -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] media: Set entity-links NULL in cleanup
Hi Sakari, Thank you for the patch. On Tuesday 27 May 2014 16:27:49 Sakari Ailus wrote: Calling media_entity_cleanup() on a cleaned-up entity would result into double free of the entity-links pointer and likely memory corruption as well. My first question is, why would anyone do that ? :-) Setting entity-links as NULL right after the kfree() avoids this. Signed-off-by: Sakari Ailus sakari.ai...@linux.intel.com --- drivers/media/media-entity.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/media-entity.c b/drivers/media/media-entity.c index 37c334e..c404354 100644 --- a/drivers/media/media-entity.c +++ b/drivers/media/media-entity.c @@ -83,6 +83,7 @@ void media_entity_cleanup(struct media_entity *entity) { kfree(entity-links); + entity-links = NULL; } EXPORT_SYMBOL_GPL(media_entity_cleanup); -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] media-device: Remove duplicated memset() in media_enum_entities()
Hi Salva, Thank you for the patch. On Saturday 07 June 2014 16:41:44 Salva Peiró wrote: After the zeroing the whole struct struct media_entity_desc u_ent, it is no longer necessary to memset(0) its u_ent.name field. Signed-off-by: Salva Peiró spe...@ai2.upv.es To: Mauro Carvalho Chehab m.che...@samsung.com CC: linux-media@vger.kernel.org CC: linux-ker...@vger.kernel.org CC: linux-ker...@vger.kernel.org CC: sta...@kernel.org Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com and applied to my tree. --- drivers/media/media-device.c |2 -- 1 file changed, 2 deletions(-) diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 703560f..88c1606 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -106,8 +106,6 @@ static long media_device_enum_entities(struct media_device *mdev, if (ent-name) { strncpy(u_ent.name, ent-name, sizeof(u_ent.name)); u_ent.name[sizeof(u_ent.name) - 1] = '\0'; - } else { - memset(u_ent.name, 0, sizeof(u_ent.name)); } u_ent.type = ent-type; u_ent.revision = ent-revision; -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] media: Set entity-links NULL in cleanup
Hi Laurent, On Thu, Jul 17, 2014 at 01:43:09PM +0200, Laurent Pinchart wrote: On Tuesday 27 May 2014 16:27:49 Sakari Ailus wrote: Calling media_entity_cleanup() on a cleaned-up entity would result into double free of the entity-links pointer and likely memory corruption as well. My first question is, why would anyone do that ? :-) Because it makes error handling easier. Many cleanup functions work this way, but not media_entity_cleanup(). -- Sakari Ailus e-mail: sakari.ai...@iki.fi XMPP: sai...@retiisi.org.uk -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] media: Use strlcpy instead of custom code
Replace strncpy + manually setting the terminating '\0' with an strlcpy call. Reported-by: Joe Perches j...@perches.com Signed-off-by: Laurent Pinchart laurent.pinch...@ideasonboard.com --- drivers/media/media-device.c | 6 ++ 1 file changed, 2 insertions(+), 4 deletions(-) This patch applies on top of media-device: Remove duplicated memset() in media_enum_entities(). diff --git a/drivers/media/media-device.c b/drivers/media/media-device.c index 73a4329..7b39440 100644 --- a/drivers/media/media-device.c +++ b/drivers/media/media-device.c @@ -103,10 +103,8 @@ static long media_device_enum_entities(struct media_device *mdev, return -EINVAL; u_ent.id = ent-id; - if (ent-name) { - strncpy(u_ent.name, ent-name, sizeof(u_ent.name)); - u_ent.name[sizeof(u_ent.name) - 1] = '\0'; - } + if (ent-name) + strlcpy(u_ent.name, ent-name, sizeof(u_ent.name)); u_ent.type = ent-type; u_ent.revision = ent-revision; u_ent.flags = ent-flags; -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR v3.17] MC and V4L2 core fixes
Hi Mauro, The following changes since commit 3c0d394ea7022bb9666d9df97a5776c4bcc3045c: [media] dib8000: improve the message that reports per-layer locks (2014-07-07 09:59:01 -0300) are available in the git repository at: git://linuxtv.org/pinchartl/media.git v4l2/core for you to fetch changes up to 65ab45056f0f777bf0e98c4060c74e91c624: media-device: Remove duplicated memset() in media_enum_entities() (2014-07-17 13:56:08 +0200) Sakari Ailus (1): v4l: subdev: Unify argument validation across IOCTLs Salva Peiró (1): media-device: Remove duplicated memset() in media_enum_entities() drivers/media/media-device.c | 2 - drivers/media/v4l2-core/v4l2-subdev.c | 120 + 2 files changed, 74 insertions(+), 48 deletions(-) -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] media: Set entity-links NULL in cleanup
On Thursday 17 July 2014 14:53:49 Sakari Ailus wrote: On Thu, Jul 17, 2014 at 01:43:09PM +0200, Laurent Pinchart wrote: On Tuesday 27 May 2014 16:27:49 Sakari Ailus wrote: Calling media_entity_cleanup() on a cleaned-up entity would result into double free of the entity-links pointer and likely memory corruption as well. My first question is, why would anyone do that ? :-) Because it makes error handling easier. Many cleanup functions work this way, but not media_entity_cleanup(). Do the cleanup functions support being called multiple times, or do they just support being called on memory that has been zeroed and not further initialized ? The media_entity_cleanup() function supports the latter. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] media:platform: OMAP3 camera support needs VIDEOBUF2_DMA_CONTIG
Hi Peter, Thank you for the patch. On Friday 04 July 2014 09:51:47 Peter Meerwald wrote: drivers/built-in.o: In function `isp_video_open': /src/linux/drivers/media/platform/omap3isp/ispvideo.c:1253: undefined reference to `vb2_dma_contig_memops' drivers/built-in.o: In function `omap3isp_video_init': /src/linux/drivers/media/platform/omap3isp/ispvideo.c:1344: undefined reference to `vb2_dma_contig_init_ctx' /src/linux/drivers/media/platform/omap3isp/ispvideo.c:1350: undefined reference to `vb2_dma_contig_cleanup_ctx' drivers/built-in.o: In function `omap3isp_video_cleanup': /src/linux/drivers/media/platform/omap3isp/ispvideo.c:1381: undefined reference to `vb2_dma_contig_cleanup_ctx' make: *** [vmlinux] Error 1 Signed-off-by: Peter Meerwald pme...@pmeerw.net Acked-by: Laurent Pinchart laurent.pinch...@ideasonboard.com and applied to my tree, with the select VIDEOBUF2_DMA_CONTIG and select OMAP_IOMMU lines swapped below to keep them alphabetically sorted. --- not sure if this is the right way to fix, at least my kernel compiles drivers/media/platform/Kconfig | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 8108c69..e1ff228 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -95,6 +95,7 @@ config VIDEO_OMAP3 tristate OMAP 3 Camera support depends on VIDEO_V4L2 I2C VIDEO_V4L2_SUBDEV_API ARCH_OMAP3 select ARM_DMA_USE_IOMMU + select VIDEOBUF2_DMA_CONTIG select OMAP_IOMMU ---help--- Driver for an OMAP 3 camera controller. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] [RFC] [media] omap3isp: try to fix dependencies
Hi Arnd, Sorry for the late reply. On Friday 13 June 2014 14:02:01 Arnd Bergmann wrote: commit 2a0a5472af5c (omap3isp: Use the ARM DMA IOMMU-aware operations) brought the omap3isp driver closer to using standard APIs, but also introduced two problems: a) it selects a particular IOMMU driver for no good reason. This just causes hard to track dependency chains, in my case breaking an experimental patch set that tries to reenable !MMU support on ARM multiplatform kernels. Since the driver doesn't have a dependency on the actual IOMMU implementation (other than sitting on the same SoC), this changes the 'select OMAP_IOMMU' to a generic 'depends on IOMMU_API' that reflects the actual usage. That sounds good to me. b) The driver incorrectly calls into low-level helpers designed to be used by the IOMMU implementation: arm_iommu_{create,attach,release}_mapping. I agree with you, and that's my plan, but I haven't been able to fix the problem yet. It's somewhere on my (too big) to-do list. Please note that, while the problem hasn't been introduced by commit 2a0a5472af5c, the driver was in an even worse shape before that, as it called in the OMAP IOMMU driver directly. I'm not fixing this here, but adding a FIXME and a dependency on ARM_DMA_USE_IOMMU. I believe the correct solution is to move the calls into the omap iommu driver that currently doesn't have them, and change the isp driver to call generic functions. OMAP_IOMMU doesn't select ARM_DMA_USE_IOMMU :-/ That should be fixed first, otherwise the OMAP3 ISP driver won't be available at all. In addition, this also adds the missing 'select VIDEOBUF2_DMA_CONTIG' that is needed since fbac1400bd1 ([media] omap3isp: Move to videobuf2) That's already fixed in my tree, so I'll skip that part. Signed-off-by: Arnd Bergmann a...@arndb.de Hi Laurent, Could you have a look at this? It's possible I'm missing something important here, but this is what I currently need to get randconfig builds to use the omap3isp driver. diff --git a/drivers/media/platform/Kconfig b/drivers/media/platform/Kconfig index 8108c69..15bf61b 100644 --- a/drivers/media/platform/Kconfig +++ b/drivers/media/platform/Kconfig @@ -94,8 +94,9 @@ config VIDEO_M32R_AR_M64278 config VIDEO_OMAP3 tristate OMAP 3 Camera support depends on VIDEO_V4L2 I2C VIDEO_V4L2_SUBDEV_API ARCH_OMAP3 - select ARM_DMA_USE_IOMMU - select OMAP_IOMMU + depends on ARM_DMA_USE_IOMMU # FIXME: use iommu API instead of low-level ARM calls + depends on IOMMU_API + select VIDEOBUF2_DMA_CONTIG ---help--- Driver for an OMAP 3 camera controller. -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL FOR v3.17] OMAP3 ISP fix
Hi Mauro, The following changes since commit 3c0d394ea7022bb9666d9df97a5776c4bcc3045c: [media] dib8000: improve the message that reports per-layer locks (2014-07-07 09:59:01 -0300) are available in the git repository at: git://linuxtv.org/pinchartl/media.git omap3isp/next for you to fetch changes up to c4f186967492e8f44478657d6993ce71545bfaef: media:platform: OMAP3 camera support needs VIDEOBUF2_DMA_CONTIG (2014-07-17 14:17:54 +0200) Peter Meerwald (1): media:platform: OMAP3 camera support needs VIDEOBUF2_DMA_CONTIG drivers/media/platform/Kconfig | 1 + 1 file changed, 1 insertion(+) -- Regards, Laurent Pinchart -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [RFC/PATCH 0/5] Add Video Processing Front End Support
On Tue, Jul 15, 2014 at 6:56 PM, Felipe Balbi ba...@ti.com wrote: Hi all, the following patches add suport for AM43xx's Video Processing Front End (VPFE). Full documentation is available at [1] chapter 14. This driver has been tested with linux-next from yesterday, plus my (already queued) am437x starter kit patches, plus these patches, plus the sensor driver which, saddly enough, we're not allowed to release :-( This driver has almost full v4l2-compliance with only 2 failures (I'll take hints on how to properly fix them) as below: fail: v4l2-compliance.cpp(419): !doioctl(node2, VIDIOC_S_PRIORITY, prio) test VIDIOC_G/S_PRIORITY: FAIL fail: v4l2-test-formats.cpp(319): pixelformat != V4L2_PIX_FMT_JPEG colorspace == V4L2_COLORSPACE_JPEG fail: v4l2-test-formats.cpp(418): testColorspace(pix.pixelformat, pix.colorspace) test VIDIOC_G_FMT: FAIL I have also tested with gst-launch using fbdevsink and I can see my ugly mug just fine. Please give this a thorough review and let me know of any problems which need to be sorted out and I'll try to help out as time allows. cheers [1] http://www.ti.com/lit/pdf/spruhl7 Benoit Parrot (4): Media: platform: Add ti-vpfe driver for AM437x device arm: omap: hwmod: add hwmod entries for AM437x VPFE arm: boot: dts: am4372: add vpfe DTS entries arm: dts: am43x-epos: Add VPFE DTS entries Darren Etheridge (1): ARM: dts: am437x-sk-evm: add vpfe support and ov2659 sensor arch/arm/boot/dts/am4372.dtsi | 16 + arch/arm/boot/dts/am437x-sk-evm.dts | 63 + arch/arm/boot/dts/am43x-epos-evm.dts | 54 + arch/arm/mach-omap2/omap_hwmod_43xx_data.c| 56 + arch/arm/mach-omap2/prcm43xx.h|3 +- drivers/media/platform/Kconfig|1 + drivers/media/platform/Makefile |2 + drivers/media/platform/ti-vpfe/Kconfig| 12 + drivers/media/platform/ti-vpfe/Makefile |2 + drivers/media/platform/ti-vpfe/am437x_isif.c | 1053 + drivers/media/platform/ti-vpfe/am437x_isif.h | 355 +++ drivers/media/platform/ti-vpfe/am437x_isif_regs.h | 144 ++ drivers/media/platform/ti-vpfe/vpfe_capture.c | 2478 + drivers/media/platform/ti-vpfe/vpfe_capture.h | 263 +++ 14 files changed, 4501 insertions(+), 1 deletion(-) Missing documentation for DT ? Thanks, --Prabhakar Lad create mode 100644 drivers/media/platform/ti-vpfe/Kconfig create mode 100644 drivers/media/platform/ti-vpfe/Makefile create mode 100644 drivers/media/platform/ti-vpfe/am437x_isif.c create mode 100644 drivers/media/platform/ti-vpfe/am437x_isif.h create mode 100644 drivers/media/platform/ti-vpfe/am437x_isif_regs.h create mode 100644 drivers/media/platform/ti-vpfe/vpfe_capture.c create mode 100644 drivers/media/platform/ti-vpfe/vpfe_capture.h -- 2.0.0.390.gcb682f8 -- To unsubscribe from this list: send the line unsubscribe linux-omap in the body of a message to majord...@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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/2] DocBook improvement for U8 and U16 control types
Removed the This type is only used-in array controls. sentence in DocBook which was thought to only confuse. Signed-off-by: Hans Verkuil hans.verk...@cisco.com diff --git a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml index d9a3f23..62163d9 100644 --- a/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml +++ b/Documentation/DocBook/media/v4l/vidioc-queryctrl.xml @@ -518,8 +518,8 @@ Older drivers which do not support this feature return an entryany/entry entryAn unsigned 8-bit valued control ranging from minimum to maximum inclusive. The step value indicates the increment between -values which are actually different on the hardware. This type is only used -in array controls./entry +values which are actually different on the hardware. +/entry /row row entryconstantV4L2_CTRL_TYPE_U16/constant/entry @@ -528,8 +528,8 @@ in array controls./entry entryany/entry entryAn unsigned 16-bit valued control ranging from minimum to maximum inclusive. The step value indicates the increment between -values which are actually different on the hardware. This type is only used -in array controls./entry +values which are actually different on the hardware. +/entry /row /tbody /tgroup -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/2] v4l2-ctrls: fix compiler warning
Fixed a compiler warning in v4l_print_query_ext_ctrl() due to the change from dims[8] to dims[4]. Signed-off-by: Hans Verkuil hans.verk...@cisco.com diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index c38a620..96bc117 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -531,13 +531,12 @@ static void v4l_print_query_ext_ctrl(const void *arg, bool write_only) pr_cont(id=0x%x, type=%d, name=%.*s, min/max=%lld/%lld, step=%lld, default=%lld, flags=0x%08x, elem_size=%u, elems=%u, - nr_of_dims=%u, dims=%u,%u,%u,%u,%u,%u,%u,%u\n, + nr_of_dims=%u, dims=%u,%u,%u,%u\n, p-id, p-type, (int)sizeof(p-name), p-name, p-minimum, p-maximum, p-step, p-default_value, p-flags, p-elem_size, p-elems, p-nr_of_dims, - p-dims[0], p-dims[1], p-dims[2], p-dims[3], - p-dims[4], p-dims[5], p-dims[6], p-dims[7]); + p-dims[0], p-dims[1], p-dims[2], p-dims[3]); } static void v4l_print_querymenu(const void *arg, bool write_only) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [ATTN] Please review/check the REVIEWv4 compound control patch series
Hello Hans I am planning to test this patchset for dead pixels by the end of this week and the beggining of the next. I am thinking about comparing the performance a list of deadpixels against a list of all pixels with their property (ok pixel, dead pixel, white pixel, slow pixel...) Will write back (hopefully) soon Regards! On Thu, Jun 12, 2014 at 2:08 PM, Hans Verkuil hverk...@xs4all.nl wrote: Mauro anyone else with an interest, I'd appreciate it if this patch series was reviewed, in particular with respect to the handling of multi-dimensional arrays: http://www.mail-archive.com/linux-media@vger.kernel.org/msg75929.html This patch series incorporates all comments from the REVIEWv3 series except for two (see the cover letter of the patch series for details), If support for arrays with more than 8 dimensions is really needed, then I would like to know asap so I can implement that in time for 3.17. Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- Ricardo Ribalda -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH for v3.17] Fix 64-bit division fall-out from 64-bit control ranges
Commit 0ba2aeb6dab80920edd9cf5b93b1ea4d6913b8f3 increased the internal control ranges to 64 bit, but that caused problems in drivers that use the minimum/maximum/step/default_value control values in a division or modulus operations since not all architectures support those natively. Luckily, in almost all cases it is possible to just cast to 32 bits (the control value is known to be 32 bits, so it is safe to cast). Only in v4l2-ctrls.c was it necessary to use do_div in one function. Signed-off-by: Hans Verkuil hans.verk...@cisco.com diff --git a/drivers/media/i2c/soc_camera/mt9m001.c b/drivers/media/i2c/soc_camera/mt9m001.c index df97033..dbd8c14 100644 --- a/drivers/media/i2c/soc_camera/mt9m001.c +++ b/drivers/media/i2c/soc_camera/mt9m001.c @@ -403,7 +403,7 @@ static int mt9m001_s_ctrl(struct v4l2_ctrl *ctrl) if (ctrl-val = ctrl-default_value) { /* Pack it into 0..1 step 0.125, register values 0..8 */ unsigned long range = ctrl-default_value - ctrl-minimum; - data = ((ctrl-val - ctrl-minimum) * 8 + range / 2) / range; + data = ((ctrl-val - (s32)ctrl-minimum) * 8 + range / 2) / range; dev_dbg(client-dev, Setting gain %d\n, data); data = reg_write(client, MT9M001_GLOBAL_GAIN, data); @@ -413,7 +413,7 @@ static int mt9m001_s_ctrl(struct v4l2_ctrl *ctrl) /* Pack it into 1.125..15 variable step, register values 9..67 */ /* We assume qctrl-maximum - qctrl-default_value - 1 0 */ unsigned long range = ctrl-maximum - ctrl-default_value - 1; - unsigned long gain = ((ctrl-val - ctrl-default_value - 1) * + unsigned long gain = ((ctrl-val - (s32)ctrl-default_value - 1) * 111 + range / 2) / range + 9; if (gain = 32) @@ -434,7 +434,7 @@ static int mt9m001_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_EXPOSURE_AUTO: if (ctrl-val == V4L2_EXPOSURE_MANUAL) { unsigned long range = exp-maximum - exp-minimum; - unsigned long shutter = ((exp-val - exp-minimum) * 1048 + + unsigned long shutter = ((exp-val - (s32)exp-minimum) * 1048 + range / 2) / range + 1; dev_dbg(client-dev, diff --git a/drivers/media/i2c/soc_camera/mt9t031.c b/drivers/media/i2c/soc_camera/mt9t031.c index ee7bb0f..f8358c4 100644 --- a/drivers/media/i2c/soc_camera/mt9t031.c +++ b/drivers/media/i2c/soc_camera/mt9t031.c @@ -474,7 +474,7 @@ static int mt9t031_s_ctrl(struct v4l2_ctrl *ctrl) if (ctrl-val = ctrl-default_value) { /* Pack it into 0..1 step 0.125, register values 0..8 */ unsigned long range = ctrl-default_value - ctrl-minimum; - data = ((ctrl-val - ctrl-minimum) * 8 + range / 2) / range; + data = ((ctrl-val - (s32)ctrl-minimum) * 8 + range / 2) / range; dev_dbg(client-dev, Setting gain %d\n, data); data = reg_write(client, MT9T031_GLOBAL_GAIN, data); @@ -485,7 +485,7 @@ static int mt9t031_s_ctrl(struct v4l2_ctrl *ctrl) /* We assume qctrl-maximum - qctrl-default_value - 1 0 */ unsigned long range = ctrl-maximum - ctrl-default_value - 1; /* calculated gain: map 65..127 to 9..1024 step 0.125 */ - unsigned long gain = ((ctrl-val - ctrl-default_value - 1) * + unsigned long gain = ((ctrl-val - (s32)ctrl-default_value - 1) * 1015 + range / 2) / range + 9; if (gain = 32) /* calculated gain 9..32 - 9..32 */ @@ -507,7 +507,7 @@ static int mt9t031_s_ctrl(struct v4l2_ctrl *ctrl) case V4L2_CID_EXPOSURE_AUTO: if (ctrl-val == V4L2_EXPOSURE_MANUAL) { unsigned int range = exp-maximum - exp-minimum; - unsigned int shutter = ((exp-val - exp-minimum) * 1048 + + unsigned int shutter = ((exp-val - (s32)exp-minimum) * 1048 + range / 2) / range + 1; u32 old; diff --git a/drivers/media/i2c/soc_camera/mt9v022.c b/drivers/media/i2c/soc_camera/mt9v022.c index f9f95f8..99022c8 100644 --- a/drivers/media/i2c/soc_camera/mt9v022.c +++ b/drivers/media/i2c/soc_camera/mt9v022.c @@ -583,7 +583,7 @@ static int mt9v022_s_ctrl(struct v4l2_ctrl *ctrl) /* mt9v022 has minimum == default */ unsigned long range = gain-maximum - gain-minimum; /* Valid values 16 to 64, 32 to 64
[linuxtv-media:master] 2181d142707a2cf5df44840ac7112ac4568b03c9 BUILD DONE
git://linuxtv.org/media_tree.git master 2181d142707a2cf5df44840ac7112ac4568b03c9 Merge branch 'sched_warn_fix' into patchwork (.text+0x281c8b0): undefined reference to `__divdi3' ERROR: __udivdi3 [drivers/media/v4l2-core/videodev.ko] undefined! ERROR: __umoddi3 [drivers/media/v4l2-core/videodev.ko] undefined! mt9m001.c:(.text+0x2424def): undefined reference to `__divdi3' mt9t031.c:(.text+0x2427d22): undefined reference to `__divdi3' pac7302.c:(.text+0x283d216): undefined reference to `__divdi3' radio-keene.c:(.text+0x294c621): undefined reference to `__udivdi3' rtl2832_sdr.c:(.text+0x3079b82): undefined reference to `__udivdi3' sonixb.c:(.text+0x2846fd8): undefined reference to `__divdi3' v4l2-ctrls.c:(.text+0x1ea2df): undefined reference to `__udivdi3' v4l2-ctrls.c:(.text+0x1ea33c): undefined reference to `__umoddi3' elapsed time: 587m configs tested: 75 alpha defconfig pariscallnoconfig parisc b180_defconfig pariscc3000_defconfig parisc defconfig mips allmodconfig mips allnoconfig mips fuloong2e_defconfig mips jz4740 mips txx9 sh allmodconfig shallnoconfig sh rsk7269_defconfig sh sh7785lcr_32bit_defconfig shtitan_defconfig i386 randconfig-ha4-0718 i386 randconfig-ha2-0718 i386 randconfig-ha0-0718 i386 randconfig-ha3-0718 i386 randconfig-ha1-0718 i386 randconfig-ha5-0718 ia64 alldefconfig ia64 allmodconfig ia64 allnoconfig ia64defconfig microblaze allyesconfig microblaze mmu_defconfig microblazenommu_defconfig x86_64randconfig-ha0-0718 x86_64randconfig-ha1-0718 x86_64randconfig-ha2-0718 x86_64randconfig-ha3-0718 x86_64randconfig-ha4-0718 x86_64randconfig-ha5-0718 sparc defconfig sparc64 allmodconfig sparc64 allnoconfig sparc64 defconfig m32r m32104ut_defconfig m32r mappi3.smp_defconfig m32r opsput_defconfig m32r usrv_defconfig xtensa common_defconfig xtensa iss_defconfig i386 allyesconfig blackfinBF526-EZBRD_defconfig blackfinBF533-EZKIT_defconfig blackfinBF561-EZKIT-SMP_defconfig blackfin TCM-BF537_defconfig cris etrax-100lx_v2_defconfig i386 randconfig-r0-0717 i386 randconfig-r1-0717 i386 randconfig-r2-0717 i386 randconfig-r3-0717 s390 allmodconfig s390 allnoconfig s390defconfig x86_64 allmodconfig avr32 atngw100_defconfig avr32 atstk1006_defconfig frv defconfig mn10300 asb2364_defconfig openriscor1ksim_defconfig tile tilegx_defconfig um i386_defconfig um x86_64_defconfig x86_64lkp x86_64 rhel powerpc allmodconfig powerpc allnoconfig powerpc defconfig powerpc ppc64_defconfig x86_64 acpi-redef x86_64 allyesdebian x86_64nfsroot Thanks, Fengguang -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 10/11] [media] coda: default to h.264 decoder on invalid formats
If the user provides an invalid format, let the decoder device default to h.264. Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index e63226b..ed5fa4c 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -685,7 +685,7 @@ static int coda_try_fmt_vid_cap(struct file *file, void *priv, struct v4l2_format *f) { struct coda_ctx *ctx = fh_to_ctx(priv); - struct coda_codec *codec; + struct coda_codec *codec = NULL; struct vb2_queue *src_vq; int ret; @@ -738,6 +738,12 @@ static int coda_try_fmt_vid_out(struct file *file, void *priv, /* Determine codec by encoded format, returns NULL if raw or invalid */ codec = coda_find_codec(ctx-dev, f-fmt.pix.pixelformat, V4L2_PIX_FMT_YUV420); + if (!codec ctx-inst_type == CODA_INST_DECODER) { + codec = coda_find_codec(ctx-dev, V4L2_PIX_FMT_H264, + V4L2_PIX_FMT_YUV420); + if (!codec) + return -EINVAL; + } if (!f-fmt.pix.colorspace) f-fmt.pix.colorspace = V4L2_COLORSPACE_REC709; -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 07/11] [media] coda: lock capture frame size to output frame size when streaming
As soon as the output queue is streaming, let try_fmt on the capture side only allow the frame size that was set on the output side. Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 3d57986..6b659c8 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -721,6 +721,9 @@ static int coda_try_fmt_vid_cap(struct file *file, void *priv, f-fmt.pix.pixelformat); if (!codec) return -EINVAL; + + f-fmt.pix.width = q_data_src-width; + f-fmt.pix.height = q_data_src-height; } else { /* Otherwise determine codec by encoded format, if possible */ codec = coda_find_codec(ctx-dev, V4L2_PIX_FMT_YUV420, -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 08/11] [media] coda: split userspace interface into encoder and decoder device
Userspace has a hard time making sense of format enumerations on V4L2 mem2mem devices if there are restrictions on which input and output formats can be used together. Alleviate the problem by splitting the video4linux device into separate encoder and decoder devices which list only raw formats on one side and only encoded formats on the other side. With this patch, the instance type (encoder or decoder) is already determined by the open file operation. Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 167 ++ 1 file changed, 120 insertions(+), 47 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 6b659c8..4a159031 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -129,7 +129,7 @@ struct coda_aux_buf { struct coda_dev { struct v4l2_device v4l2_dev; - struct video_device vfd; + struct video_device vfd[2]; struct platform_device *plat_dev; const struct coda_devtype *devtype; @@ -1580,14 +1580,22 @@ static void coda_set_tiled_map_type(struct coda_ctx *ctx, int tiled_map_type) static void set_default_params(struct coda_ctx *ctx) { + u32 src_fourcc, dst_fourcc; int max_w; int max_h; - ctx-codec = ctx-dev-devtype-codecs[0]; + if (ctx-inst_type == CODA_INST_ENCODER) { + src_fourcc = V4L2_PIX_FMT_YUV420; + dst_fourcc = V4L2_PIX_FMT_H264; + } else { + src_fourcc = V4L2_PIX_FMT_H264; + dst_fourcc = V4L2_PIX_FMT_YUV420; + } + ctx-codec = coda_find_codec(ctx-dev, src_fourcc, dst_fourcc); max_w = ctx-codec-max_w; max_h = ctx-codec-max_h; - ctx-params.codec_mode = CODA_MODE_INVALID; + ctx-params.codec_mode = ctx-codec-mode; ctx-colorspace = V4L2_COLORSPACE_REC709; ctx-params.framerate = 30; ctx-aborting = 0; @@ -1597,12 +1605,19 @@ static void set_default_params(struct coda_ctx *ctx) ctx-q_data[V4L2_M2M_DST].fourcc = ctx-codec-dst_fourcc; ctx-q_data[V4L2_M2M_SRC].width = max_w; ctx-q_data[V4L2_M2M_SRC].height = max_h; - ctx-q_data[V4L2_M2M_SRC].bytesperline = max_w; - ctx-q_data[V4L2_M2M_SRC].sizeimage = (max_w * max_h * 3) / 2; ctx-q_data[V4L2_M2M_DST].width = max_w; ctx-q_data[V4L2_M2M_DST].height = max_h; - ctx-q_data[V4L2_M2M_DST].bytesperline = 0; - ctx-q_data[V4L2_M2M_DST].sizeimage = CODA_MAX_FRAME_SIZE; + if (ctx-codec-src_fourcc == V4L2_PIX_FMT_YUV420) { + ctx-q_data[V4L2_M2M_SRC].bytesperline = max_w; + ctx-q_data[V4L2_M2M_SRC].sizeimage = (max_w * max_h * 3) / 2; + ctx-q_data[V4L2_M2M_DST].bytesperline = 0; + ctx-q_data[V4L2_M2M_DST].sizeimage = CODA_MAX_FRAME_SIZE; + } else { + ctx-q_data[V4L2_M2M_SRC].bytesperline = 0; + ctx-q_data[V4L2_M2M_SRC].sizeimage = CODA_MAX_FRAME_SIZE; + ctx-q_data[V4L2_M2M_DST].bytesperline = max_w; + ctx-q_data[V4L2_M2M_DST].sizeimage = (max_w * max_h * 3) / 2; + } ctx-q_data[V4L2_M2M_SRC].rect.width = max_w; ctx-q_data[V4L2_M2M_SRC].rect.height = max_h; ctx-q_data[V4L2_M2M_DST].rect.width = max_w; @@ -2293,11 +2308,6 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count) } ctx-streamon_out = 1; - - if (coda_format_is_yuv(q_data_src-fourcc)) - ctx-inst_type = CODA_INST_ENCODER; - else - ctx-inst_type = CODA_INST_DECODER; } else { if (count 1) return -EINVAL; @@ -2719,7 +2729,7 @@ static void coda_stop_streaming(struct vb2_queue *q) } } -static struct vb2_ops coda_qops = { +static const struct vb2_ops coda_qops = { .queue_setup= coda_queue_setup, .buf_prepare= coda_buf_prepare, .buf_queue = coda_buf_queue, @@ -2871,35 +2881,55 @@ static int coda_ctrls_setup(struct coda_ctx *ctx) return v4l2_ctrl_handler_setup(ctx-ctrls); } -static int coda_queue_init(void *priv, struct vb2_queue *src_vq, - struct vb2_queue *dst_vq) +static int coda_queue_init(struct coda_ctx *ctx, struct vb2_queue *vq) +{ + vq-drv_priv = ctx; + vq-ops = coda_qops; + vq-buf_struct_size = sizeof(struct v4l2_m2m_buffer); + vq-timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; + vq-lock = ctx-dev-dev_mutex; + + return vb2_queue_init(vq); +} + +static int coda_encoder_queue_init(void *priv, struct vb2_queue *src_vq, + struct vb2_queue *dst_vq) { - struct coda_ctx *ctx = priv; int ret; src_vq-type = V4L2_BUF_TYPE_VIDEO_OUTPUT; src_vq-io_modes = VB2_DMABUF |
[PATCH 09/11] [media] coda: split format enumeration for encoder end decoder device
Let the decoder capture side and encoder output side only list uncompressed formats, and the decoder output and encoder capture side only list compressed formats. Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 57 +++ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 4a159031..e63226b 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -542,8 +542,8 @@ static int coda_querycap(struct file *file, void *priv, return 0; } -static int enum_fmt(void *priv, struct v4l2_fmtdesc *f, - enum v4l2_buf_type type, int src_fourcc) +static int coda_enum_fmt(struct file *file, void *priv, +struct v4l2_fmtdesc *f) { struct coda_ctx *ctx = fh_to_ctx(priv); struct coda_codec *codecs = ctx-dev-devtype-codecs; @@ -552,11 +552,19 @@ static int enum_fmt(void *priv, struct v4l2_fmtdesc *f, int num_codecs = ctx-dev-devtype-num_codecs; int num_formats = ARRAY_SIZE(coda_formats); int i, k, num = 0; + bool yuv; + + if (ctx-inst_type == CODA_INST_ENCODER) + yuv = (f-type == V4L2_BUF_TYPE_VIDEO_OUTPUT); + else + yuv = (f-type == V4L2_BUF_TYPE_VIDEO_CAPTURE); for (i = 0; i num_formats; i++) { - /* Both uncompressed formats are always supported */ - if (coda_format_is_yuv(formats[i].fourcc) - !coda_format_is_yuv(src_fourcc)) { + /* Skip either raw or compressed formats */ + if (yuv != coda_format_is_yuv(formats[i].fourcc)) + continue; + /* All uncompressed formats are always supported */ + if (yuv) { if (num == f-index) break; ++num; @@ -564,12 +572,10 @@ static int enum_fmt(void *priv, struct v4l2_fmtdesc *f, } /* Compressed formats may be supported, check the codec list */ for (k = 0; k num_codecs; k++) { - /* if src_fourcc is set, only consider matching codecs */ - if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE - formats[i].fourcc == codecs[k].dst_fourcc - (!src_fourcc || src_fourcc == codecs[k].src_fourcc)) + if (f-type == V4L2_BUF_TYPE_VIDEO_CAPTURE + formats[i].fourcc == codecs[k].dst_fourcc) break; - if (type == V4L2_BUF_TYPE_VIDEO_OUTPUT + if (f-type == V4L2_BUF_TYPE_VIDEO_OUTPUT formats[i].fourcc == codecs[k].src_fourcc) break; } @@ -584,7 +590,7 @@ static int enum_fmt(void *priv, struct v4l2_fmtdesc *f, fmt = formats[i]; strlcpy(f-description, fmt-name, sizeof(f-description)); f-pixelformat = fmt-fourcc; - if (!coda_format_is_yuv(fmt-fourcc)) + if (!yuv) f-flags |= V4L2_FMT_FLAG_COMPRESSED; return 0; } @@ -593,31 +599,6 @@ static int enum_fmt(void *priv, struct v4l2_fmtdesc *f, return -EINVAL; } -static int coda_enum_fmt_vid_cap(struct file *file, void *priv, -struct v4l2_fmtdesc *f) -{ - struct coda_ctx *ctx = fh_to_ctx(priv); - struct vb2_queue *src_vq; - struct coda_q_data *q_data_src; - - /* If the source format is already fixed, only list matching formats */ - src_vq = v4l2_m2m_get_vq(ctx-fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); - if (vb2_is_streaming(src_vq)) { - q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); - - return enum_fmt(priv, f, V4L2_BUF_TYPE_VIDEO_CAPTURE, - q_data_src-fourcc); - } - - return enum_fmt(priv, f, V4L2_BUF_TYPE_VIDEO_CAPTURE, 0); -} - -static int coda_enum_fmt_vid_out(struct file *file, void *priv, -struct v4l2_fmtdesc *f) -{ - return enum_fmt(priv, f, V4L2_BUF_TYPE_VIDEO_OUTPUT, 0); -} - static int coda_g_fmt(struct file *file, void *priv, struct v4l2_format *f) { @@ -972,12 +953,12 @@ static int coda_subscribe_event(struct v4l2_fh *fh, static const struct v4l2_ioctl_ops coda_ioctl_ops = { .vidioc_querycap= coda_querycap, - .vidioc_enum_fmt_vid_cap = coda_enum_fmt_vid_cap, + .vidioc_enum_fmt_vid_cap = coda_enum_fmt, .vidioc_g_fmt_vid_cap = coda_g_fmt, .vidioc_try_fmt_vid_cap = coda_try_fmt_vid_cap, .vidioc_s_fmt_vid_cap = coda_s_fmt_vid_cap, - .vidioc_enum_fmt_vid_out = coda_enum_fmt_vid_out, +
[PATCH 11/11] [media] coda: mark constant structures as such
The format and codec lists and the ops structures are read-only. Mark them as const. Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index ed5fa4c..b644f2b 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -102,7 +102,7 @@ struct coda_codec { struct coda_devtype { char*firmware; enum coda_product product; - struct coda_codec *codecs; + const struct coda_codec *codecs; unsigned intnum_codecs; size_t workbuf_size; size_t tempbuf_size; @@ -225,7 +225,7 @@ struct coda_ctx { u32 sequence_offset; struct coda_q_data q_data[2]; enum coda_inst_type inst_type; - struct coda_codec *codec; + const struct coda_codec *codec; enum v4l2_colorspacecolorspace; struct coda_params params; struct v4l2_ctrl_handlerctrls; @@ -390,7 +390,7 @@ static struct coda_q_data *get_q_data(struct coda_ctx *ctx, /* * Array of all formats supported by any version of Coda: */ -static struct coda_fmt coda_formats[] = { +static const struct coda_fmt coda_formats[] = { { .name = YUV 4:2:0 Planar, YCbCr, .fourcc = V4L2_PIX_FMT_YUV420, @@ -419,19 +419,19 @@ static struct coda_fmt coda_formats[] = { * i.MX6 - coda960 * Use V4L2_PIX_FMT_YUV420 as placeholder for all supported YUV 4:2:0 variants */ -static struct coda_codec codadx6_codecs[] = { +static const struct coda_codec codadx6_codecs[] = { CODA_CODEC(CODADX6_MODE_ENCODE_H264, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_H264, 720, 576), CODA_CODEC(CODADX6_MODE_ENCODE_MP4, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_MPEG4, 720, 576), }; -static struct coda_codec coda7_codecs[] = { +static const struct coda_codec coda7_codecs[] = { CODA_CODEC(CODA7_MODE_ENCODE_H264, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_H264, 1280, 720), CODA_CODEC(CODA7_MODE_ENCODE_MP4, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_MPEG4, 1280, 720), CODA_CODEC(CODA7_MODE_DECODE_H264, V4L2_PIX_FMT_H264, V4L2_PIX_FMT_YUV420, 1920, 1080), CODA_CODEC(CODA7_MODE_DECODE_MP4, V4L2_PIX_FMT_MPEG4, V4L2_PIX_FMT_YUV420, 1920, 1080), }; -static struct coda_codec coda9_codecs[] = { +static const struct coda_codec coda9_codecs[] = { CODA_CODEC(CODA9_MODE_ENCODE_H264, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_H264, 1920, 1080), CODA_CODEC(CODA9_MODE_ENCODE_MP4, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_MPEG4, 1920, 1080), CODA_CODEC(CODA9_MODE_DECODE_H264, V4L2_PIX_FMT_H264, V4L2_PIX_FMT_YUV420, 1920, 1080), @@ -458,10 +458,10 @@ static u32 coda_format_normalize_yuv(u32 fourcc) return coda_format_is_yuv(fourcc) ? V4L2_PIX_FMT_YUV420 : fourcc; } -static struct coda_codec *coda_find_codec(struct coda_dev *dev, int src_fourcc, - int dst_fourcc) +static const struct coda_codec *coda_find_codec(struct coda_dev *dev, + int src_fourcc, int dst_fourcc) { - struct coda_codec *codecs = dev-devtype-codecs; + const struct coda_codec *codecs = dev-devtype-codecs; int num_codecs = dev-devtype-num_codecs; int k; @@ -483,10 +483,10 @@ static struct coda_codec *coda_find_codec(struct coda_dev *dev, int src_fourcc, } static void coda_get_max_dimensions(struct coda_dev *dev, - struct coda_codec *codec, + const struct coda_codec *codec, int *max_w, int *max_h) { - struct coda_codec *codecs = dev-devtype-codecs; + const struct coda_codec *codecs = dev-devtype-codecs; int num_codecs = dev-devtype-num_codecs; unsigned int w, h; int k; @@ -546,9 +546,9 @@ static int coda_enum_fmt(struct file *file, void *priv, struct v4l2_fmtdesc *f) { struct coda_ctx *ctx = fh_to_ctx(priv); - struct coda_codec *codecs = ctx-dev-devtype-codecs; - struct coda_fmt *formats = coda_formats; - struct coda_fmt *fmt; + const struct coda_codec *codecs = ctx-dev-devtype-codecs; + const struct coda_fmt *formats = coda_formats; + const struct coda_fmt *fmt; int num_codecs = ctx-dev-devtype-num_codecs; int num_formats = ARRAY_SIZE(coda_formats); int i, k, num = 0; @@ -621,7 +621,7 @@ static int coda_g_fmt(struct file *file, void *priv, return 0; } -static int coda_try_fmt(struct coda_ctx *ctx, struct coda_codec *codec, +static int coda_try_fmt(struct coda_ctx *ctx, const struct coda_codec
[PATCH 02/11] [media] coda: initialize hardware on pm runtime resume only if firmware available
If no firmware was found and the coda module is unloaded, coda_runtime_resume will be called without an allocated code buffer. Do not call coda_hw_init in this case. Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index d5abb7c..10f9278 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -3904,7 +3904,7 @@ static int coda_runtime_resume(struct device *dev) struct coda_dev *cdev = dev_get_drvdata(dev); int ret = 0; - if (dev-pm_domain) { + if (dev-pm_domain cdev-codebuf.vaddr) { ret = coda_hw_init(cdev); if (ret) v4l2_err(cdev-v4l2_dev, HW initialization failed\n); -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 03/11] [media] coda: remove CAPTURE and OUTPUT caps
This is a mem2mem driver, pure capture or output modes are not supported. Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 10f9278..f52d17c 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -536,13 +536,7 @@ static int coda_querycap(struct file *file, void *priv, strlcpy(cap-card, coda_product_name(ctx-dev-devtype-product), sizeof(cap-card)); strlcpy(cap-bus_info, platform: CODA_NAME, sizeof(cap-bus_info)); - /* -* This is only a mem-to-mem video device. The capture and output -* device capability flags are left only for backward compatibility -* and are scheduled for removal. -*/ - cap-device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT | - V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 01/11] [media] coda: fix CODA7541 hardware reset
Do not try to read the CODA960 GDI status register on CODA7541. Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 17 ++--- 1 file changed, 10 insertions(+), 7 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 7e69eda..d5abb7c 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -350,19 +350,22 @@ static int coda_hw_reset(struct coda_ctx *ctx) idx = coda_read(dev, CODA_REG_BIT_RUN_INDEX); - timeout = jiffies + msecs_to_jiffies(100); - coda_write(dev, 0x11, CODA9_GDI_BUS_CTRL); - while (coda_read(dev, CODA9_GDI_BUS_STATUS) != 0x77) { - if (time_after(jiffies, timeout)) - return -ETIME; - cpu_relax(); + if (dev-devtype-product == CODA_960) { + timeout = jiffies + msecs_to_jiffies(100); + coda_write(dev, 0x11, CODA9_GDI_BUS_CTRL); + while (coda_read(dev, CODA9_GDI_BUS_STATUS) != 0x77) { + if (time_after(jiffies, timeout)) + return -ETIME; + cpu_relax(); + } } ret = reset_control_reset(dev-rstc); if (ret 0) return ret; - coda_write(dev, 0x00, CODA9_GDI_BUS_CTRL); + if (dev-devtype-product == CODA_960) + coda_write(dev, 0x00, CODA9_GDI_BUS_CTRL); coda_write(dev, CODA_REG_BIT_BUSY_FLAG, CODA_REG_BIT_BUSY); coda_write(dev, CODA_REG_RUN_ENABLE, CODA_REG_BIT_CODE_RUN); ret = coda_wait_timeout(dev); -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 06/11] [media] coda: delay coda_fill_bitstream()
From: Michael Olbrich m.olbr...@pengutronix.de coda_fill_bitstream() calls v4l2_m2m_buf_done() which is no longer allowed before streaming was started. Delay coda_fill_bitstream() until coda_start_streaming() and explicitly set 'start_streaming_called' before calling coda_fill_bitstream() Signed-off-by: Michael Olbrich m.olbr...@pengutronix.de Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 141ec29..3d57986 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -1682,7 +1682,8 @@ static void coda_buf_queue(struct vb2_buffer *vb) } mutex_lock(ctx-bitstream_mutex); v4l2_m2m_buf_queue(ctx-fh.m2m_ctx, vb); - coda_fill_bitstream(ctx); + if (vb2_is_streaming(vb-vb2_queue)) + coda_fill_bitstream(ctx); mutex_unlock(ctx-bitstream_mutex); } else { v4l2_m2m_buf_queue(ctx-fh.m2m_ctx, vb); @@ -2272,6 +2273,15 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count) q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); if (q-type == V4L2_BUF_TYPE_VIDEO_OUTPUT) { if (q_data_src-fourcc == V4L2_PIX_FMT_H264) { + struct vb2_queue *vq; + /* start_streaming_called must be set, for v4l2_m2m_buf_done() */ + vq = v4l2_m2m_get_vq(ctx-fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); + vq-start_streaming_called = 1; + /* copy the buffers that where queued before streamon */ + mutex_lock(ctx-bitstream_mutex); + coda_fill_bitstream(ctx); + mutex_unlock(ctx-bitstream_mutex); + if (coda_get_bitstream_payload(ctx) 512) return -EINVAL; } else { -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 04/11] [media] coda: remove VB2_USERPTR from queue io_modes
Disallow USERPTR buffers, videobuf2-dma-contig doesn't support them. Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index f52d17c..917727e 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -2865,7 +2865,7 @@ static int coda_queue_init(void *priv, struct vb2_queue *src_vq, int ret; src_vq-type = V4L2_BUF_TYPE_VIDEO_OUTPUT; - src_vq-io_modes = VB2_DMABUF | VB2_MMAP | VB2_USERPTR; + src_vq-io_modes = VB2_DMABUF | VB2_MMAP; src_vq-drv_priv = ctx; src_vq-buf_struct_size = sizeof(struct v4l2_m2m_buffer); src_vq-ops = coda_qops; @@ -2878,7 +2878,7 @@ static int coda_queue_init(void *priv, struct vb2_queue *src_vq, return ret; dst_vq-type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - dst_vq-io_modes = VB2_DMABUF | VB2_MMAP | VB2_USERPTR; + dst_vq-io_modes = VB2_DMABUF | VB2_MMAP; dst_vq-drv_priv = ctx; dst_vq-buf_struct_size = sizeof(struct v4l2_m2m_buffer); dst_vq-ops = coda_qops; -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 05/11] [media] coda: use CODA_MAX_FRAME_SIZE everywhere
From: Michael Olbrich m.olbr...@pengutronix.de Without this changing CODA_MAX_FRAME_SIZE to anything other than 0x10 can break the bitstram handling Signed-off-by: Michael Olbrich m.olbr...@pengutronix.de Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 917727e..141ec29 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -3106,7 +3106,7 @@ static void coda_finish_decode(struct coda_ctx *ctx) * by up to 512 bytes */ if (ctx-bit_stream_param CODA_BIT_STREAM_END_FLAG) { - if (coda_get_bitstream_payload(ctx) = 0x10 - 512) + if (coda_get_bitstream_payload(ctx) = CODA_MAX_FRAME_SIZE - 512) kfifo_init(ctx-bitstream_fifo, ctx-bitstream.vaddr, ctx-bitstream.size); } -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 00/11] CODA encoder/decoder device split
Hi, the following patches add a few fixes and cleanups and split the coda video4linux2 device into encoder and decoder. Following the principle of least surprise, this way the format enumeration on the output and capture sides is fixed and does not change depending on whether the given instance is currently configured as encoder or decoder. regards Philipp Michael Olbrich (2): [media] coda: use CODA_MAX_FRAME_SIZE everywhere [media] coda: delay coda_fill_bitstream() Philipp Zabel (9): [media] coda: fix CODA7541 hardware reset [media] coda: initialize hardware on pm runtime resume only if firmware available [media] coda: remove CAPTURE and OUTPUT caps [media] coda: remove VB2_USERPTR from queue io_modes [media] coda: lock capture frame size to output frame size when streaming [media] coda: split userspace interface into encoder and decoder device [media] coda: split format enumeration for encoder end decoder device [media] coda: default to h.264 decoder on invalid formats [media] coda: mark constant structures as such drivers/media/platform/coda.c | 316 ++ 1 file changed, 193 insertions(+), 123 deletions(-) -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 03/11] [media] coda: remove CAPTURE and OUTPUT caps
On 07/17/2014 06:05 PM, Philipp Zabel wrote: This is a mem2mem driver, pure capture or output modes are not supported. Signed-off-by: Philipp Zabel p.za...@pengutronix.de Acked-by: Hans Verkuil hans.verk...@cisco.com Regards, Hans --- drivers/media/platform/coda.c | 8 +--- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 10f9278..f52d17c 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -536,13 +536,7 @@ static int coda_querycap(struct file *file, void *priv, strlcpy(cap-card, coda_product_name(ctx-dev-devtype-product), sizeof(cap-card)); strlcpy(cap-bus_info, platform: CODA_NAME, sizeof(cap-bus_info)); - /* - * This is only a mem-to-mem video device. The capture and output - * device capability flags are left only for backward compatibility - * and are scheduled for removal. - */ - cap-device_caps = V4L2_CAP_VIDEO_CAPTURE | V4L2_CAP_VIDEO_OUTPUT | -V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; + cap-device_caps = V4L2_CAP_VIDEO_M2M | V4L2_CAP_STREAMING; cap-capabilities = cap-device_caps | V4L2_CAP_DEVICE_CAPS; return 0; -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 07/11] [media] coda: lock capture frame size to output frame size when streaming
On 07/17/2014 06:05 PM, Philipp Zabel wrote: As soon as the output queue is streaming, let try_fmt on the capture side only allow the frame size that was set on the output side. Signed-off-by: Philipp Zabel p.za...@pengutronix.de Acked-by: Hans Verkuil hans.verk...@cisco.com Regards, Hans --- drivers/media/platform/coda.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 3d57986..6b659c8 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -721,6 +721,9 @@ static int coda_try_fmt_vid_cap(struct file *file, void *priv, f-fmt.pix.pixelformat); if (!codec) return -EINVAL; + + f-fmt.pix.width = q_data_src-width; + f-fmt.pix.height = q_data_src-height; } else { /* Otherwise determine codec by encoded format, if possible */ codec = coda_find_codec(ctx-dev, V4L2_PIX_FMT_YUV420, -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 06/11] [media] coda: delay coda_fill_bitstream()
On 07/17/2014 06:05 PM, Philipp Zabel wrote: From: Michael Olbrich m.olbr...@pengutronix.de coda_fill_bitstream() calls v4l2_m2m_buf_done() which is no longer allowed before streaming was started. Delay coda_fill_bitstream() until coda_start_streaming() and explicitly set 'start_streaming_called' before calling coda_fill_bitstream() Signed-off-by: Michael Olbrich m.olbr...@pengutronix.de Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 141ec29..3d57986 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -1682,7 +1682,8 @@ static void coda_buf_queue(struct vb2_buffer *vb) } mutex_lock(ctx-bitstream_mutex); v4l2_m2m_buf_queue(ctx-fh.m2m_ctx, vb); - coda_fill_bitstream(ctx); + if (vb2_is_streaming(vb-vb2_queue)) + coda_fill_bitstream(ctx); mutex_unlock(ctx-bitstream_mutex); } else { v4l2_m2m_buf_queue(ctx-fh.m2m_ctx, vb); @@ -2272,6 +2273,15 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count) q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); if (q-type == V4L2_BUF_TYPE_VIDEO_OUTPUT) { if (q_data_src-fourcc == V4L2_PIX_FMT_H264) { + struct vb2_queue *vq; + /* start_streaming_called must be set, for v4l2_m2m_buf_done() */ + vq = v4l2_m2m_get_vq(ctx-fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); + vq-start_streaming_called = 1; Why set start_streaming_called to 1? It is set before calling start_streaming. This is a recent change in videobuf2-core.c though. BTW, you should test with CONFIG_VIDEO_ADV_DEBUG on and force start_streaming errors to check whether vb2_buffer_done(buf, VB2_BUF_STATE_DEQUEUED) is called for the queued buffers in case of start_streaming failure. With that config option vb2 will complain about unbalanced vb2 operations. I strongly suspect this code does not play well with this. BTW, isn't it time to split up the coda driver? Over 3000 lines... Regards, Hans + /* copy the buffers that where queued before streamon */ + mutex_lock(ctx-bitstream_mutex); + coda_fill_bitstream(ctx); + mutex_unlock(ctx-bitstream_mutex); + if (coda_get_bitstream_payload(ctx) 512) return -EINVAL; } else { -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 04/11] [media] coda: remove VB2_USERPTR from queue io_modes
On 07/17/2014 06:05 PM, Philipp Zabel wrote: Disallow USERPTR buffers, videobuf2-dma-contig doesn't support them. Acked-by: Hans Verkuil hans.verk...@cisco.com Regards, Hans Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index f52d17c..917727e 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -2865,7 +2865,7 @@ static int coda_queue_init(void *priv, struct vb2_queue *src_vq, int ret; src_vq-type = V4L2_BUF_TYPE_VIDEO_OUTPUT; - src_vq-io_modes = VB2_DMABUF | VB2_MMAP | VB2_USERPTR; + src_vq-io_modes = VB2_DMABUF | VB2_MMAP; src_vq-drv_priv = ctx; src_vq-buf_struct_size = sizeof(struct v4l2_m2m_buffer); src_vq-ops = coda_qops; @@ -2878,7 +2878,7 @@ static int coda_queue_init(void *priv, struct vb2_queue *src_vq, return ret; dst_vq-type = V4L2_BUF_TYPE_VIDEO_CAPTURE; - dst_vq-io_modes = VB2_DMABUF | VB2_MMAP | VB2_USERPTR; + dst_vq-io_modes = VB2_DMABUF | VB2_MMAP; dst_vq-drv_priv = ctx; dst_vq-buf_struct_size = sizeof(struct v4l2_m2m_buffer); dst_vq-ops = coda_qops; -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 08/11] [media] coda: split userspace interface into encoder and decoder device
On 07/17/2014 06:05 PM, Philipp Zabel wrote: Userspace has a hard time making sense of format enumerations on V4L2 mem2mem devices if there are restrictions on which input and output formats can be used together. Alleviate the problem by splitting the video4linux device into separate encoder and decoder devices which list only raw formats on one side and only encoded formats on the other side. With this patch, the instance type (encoder or decoder) is already determined by the open file operation. Signed-off-by: Philipp Zabel p.za...@pengutronix.de Nice! This is indeed a much better solution. Acked-by: Hans Verkuil hans.verk...@cisco.com Regards, Hans --- drivers/media/platform/coda.c | 167 ++ 1 file changed, 120 insertions(+), 47 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 6b659c8..4a159031 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -129,7 +129,7 @@ struct coda_aux_buf { struct coda_dev { struct v4l2_device v4l2_dev; - struct video_device vfd; + struct video_device vfd[2]; struct platform_device *plat_dev; const struct coda_devtype *devtype; @@ -1580,14 +1580,22 @@ static void coda_set_tiled_map_type(struct coda_ctx *ctx, int tiled_map_type) static void set_default_params(struct coda_ctx *ctx) { + u32 src_fourcc, dst_fourcc; int max_w; int max_h; - ctx-codec = ctx-dev-devtype-codecs[0]; + if (ctx-inst_type == CODA_INST_ENCODER) { + src_fourcc = V4L2_PIX_FMT_YUV420; + dst_fourcc = V4L2_PIX_FMT_H264; + } else { + src_fourcc = V4L2_PIX_FMT_H264; + dst_fourcc = V4L2_PIX_FMT_YUV420; + } + ctx-codec = coda_find_codec(ctx-dev, src_fourcc, dst_fourcc); max_w = ctx-codec-max_w; max_h = ctx-codec-max_h; - ctx-params.codec_mode = CODA_MODE_INVALID; + ctx-params.codec_mode = ctx-codec-mode; ctx-colorspace = V4L2_COLORSPACE_REC709; ctx-params.framerate = 30; ctx-aborting = 0; @@ -1597,12 +1605,19 @@ static void set_default_params(struct coda_ctx *ctx) ctx-q_data[V4L2_M2M_DST].fourcc = ctx-codec-dst_fourcc; ctx-q_data[V4L2_M2M_SRC].width = max_w; ctx-q_data[V4L2_M2M_SRC].height = max_h; - ctx-q_data[V4L2_M2M_SRC].bytesperline = max_w; - ctx-q_data[V4L2_M2M_SRC].sizeimage = (max_w * max_h * 3) / 2; ctx-q_data[V4L2_M2M_DST].width = max_w; ctx-q_data[V4L2_M2M_DST].height = max_h; - ctx-q_data[V4L2_M2M_DST].bytesperline = 0; - ctx-q_data[V4L2_M2M_DST].sizeimage = CODA_MAX_FRAME_SIZE; + if (ctx-codec-src_fourcc == V4L2_PIX_FMT_YUV420) { + ctx-q_data[V4L2_M2M_SRC].bytesperline = max_w; + ctx-q_data[V4L2_M2M_SRC].sizeimage = (max_w * max_h * 3) / 2; + ctx-q_data[V4L2_M2M_DST].bytesperline = 0; + ctx-q_data[V4L2_M2M_DST].sizeimage = CODA_MAX_FRAME_SIZE; + } else { + ctx-q_data[V4L2_M2M_SRC].bytesperline = 0; + ctx-q_data[V4L2_M2M_SRC].sizeimage = CODA_MAX_FRAME_SIZE; + ctx-q_data[V4L2_M2M_DST].bytesperline = max_w; + ctx-q_data[V4L2_M2M_DST].sizeimage = (max_w * max_h * 3) / 2; + } ctx-q_data[V4L2_M2M_SRC].rect.width = max_w; ctx-q_data[V4L2_M2M_SRC].rect.height = max_h; ctx-q_data[V4L2_M2M_DST].rect.width = max_w; @@ -2293,11 +2308,6 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count) } ctx-streamon_out = 1; - - if (coda_format_is_yuv(q_data_src-fourcc)) - ctx-inst_type = CODA_INST_ENCODER; - else - ctx-inst_type = CODA_INST_DECODER; } else { if (count 1) return -EINVAL; @@ -2719,7 +2729,7 @@ static void coda_stop_streaming(struct vb2_queue *q) } } -static struct vb2_ops coda_qops = { +static const struct vb2_ops coda_qops = { .queue_setup= coda_queue_setup, .buf_prepare= coda_buf_prepare, .buf_queue = coda_buf_queue, @@ -2871,35 +2881,55 @@ static int coda_ctrls_setup(struct coda_ctx *ctx) return v4l2_ctrl_handler_setup(ctx-ctrls); } -static int coda_queue_init(void *priv, struct vb2_queue *src_vq, - struct vb2_queue *dst_vq) +static int coda_queue_init(struct coda_ctx *ctx, struct vb2_queue *vq) +{ + vq-drv_priv = ctx; + vq-ops = coda_qops; + vq-buf_struct_size = sizeof(struct v4l2_m2m_buffer); + vq-timestamp_flags = V4L2_BUF_FLAG_TIMESTAMP_COPY; + vq-lock = ctx-dev-dev_mutex; + + return vb2_queue_init(vq); +} + +static int coda_encoder_queue_init(void *priv, struct vb2_queue *src_vq, +struct vb2_queue *dst_vq) { -
Re: [PATCH 11/11] [media] coda: mark constant structures as such
On 07/17/2014 06:05 PM, Philipp Zabel wrote: The format and codec lists and the ops structures are read-only. Mark them as const. Signed-off-by: Philipp Zabel p.za...@pengutronix.de Acked-by: Hans Verkuil hans.verk...@cisco.com Regards, Hans --- drivers/media/platform/coda.c | 38 +++--- 1 file changed, 19 insertions(+), 19 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index ed5fa4c..b644f2b 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -102,7 +102,7 @@ struct coda_codec { struct coda_devtype { char*firmware; enum coda_product product; - struct coda_codec *codecs; + const struct coda_codec *codecs; unsigned intnum_codecs; size_t workbuf_size; size_t tempbuf_size; @@ -225,7 +225,7 @@ struct coda_ctx { u32 sequence_offset; struct coda_q_data q_data[2]; enum coda_inst_type inst_type; - struct coda_codec *codec; + const struct coda_codec *codec; enum v4l2_colorspacecolorspace; struct coda_params params; struct v4l2_ctrl_handlerctrls; @@ -390,7 +390,7 @@ static struct coda_q_data *get_q_data(struct coda_ctx *ctx, /* * Array of all formats supported by any version of Coda: */ -static struct coda_fmt coda_formats[] = { +static const struct coda_fmt coda_formats[] = { { .name = YUV 4:2:0 Planar, YCbCr, .fourcc = V4L2_PIX_FMT_YUV420, @@ -419,19 +419,19 @@ static struct coda_fmt coda_formats[] = { * i.MX6 - coda960 * Use V4L2_PIX_FMT_YUV420 as placeholder for all supported YUV 4:2:0 variants */ -static struct coda_codec codadx6_codecs[] = { +static const struct coda_codec codadx6_codecs[] = { CODA_CODEC(CODADX6_MODE_ENCODE_H264, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_H264, 720, 576), CODA_CODEC(CODADX6_MODE_ENCODE_MP4, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_MPEG4, 720, 576), }; -static struct coda_codec coda7_codecs[] = { +static const struct coda_codec coda7_codecs[] = { CODA_CODEC(CODA7_MODE_ENCODE_H264, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_H264, 1280, 720), CODA_CODEC(CODA7_MODE_ENCODE_MP4, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_MPEG4, 1280, 720), CODA_CODEC(CODA7_MODE_DECODE_H264, V4L2_PIX_FMT_H264, V4L2_PIX_FMT_YUV420, 1920, 1080), CODA_CODEC(CODA7_MODE_DECODE_MP4, V4L2_PIX_FMT_MPEG4, V4L2_PIX_FMT_YUV420, 1920, 1080), }; -static struct coda_codec coda9_codecs[] = { +static const struct coda_codec coda9_codecs[] = { CODA_CODEC(CODA9_MODE_ENCODE_H264, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_H264, 1920, 1080), CODA_CODEC(CODA9_MODE_ENCODE_MP4, V4L2_PIX_FMT_YUV420, V4L2_PIX_FMT_MPEG4, 1920, 1080), CODA_CODEC(CODA9_MODE_DECODE_H264, V4L2_PIX_FMT_H264, V4L2_PIX_FMT_YUV420, 1920, 1080), @@ -458,10 +458,10 @@ static u32 coda_format_normalize_yuv(u32 fourcc) return coda_format_is_yuv(fourcc) ? V4L2_PIX_FMT_YUV420 : fourcc; } -static struct coda_codec *coda_find_codec(struct coda_dev *dev, int src_fourcc, - int dst_fourcc) +static const struct coda_codec *coda_find_codec(struct coda_dev *dev, + int src_fourcc, int dst_fourcc) { - struct coda_codec *codecs = dev-devtype-codecs; + const struct coda_codec *codecs = dev-devtype-codecs; int num_codecs = dev-devtype-num_codecs; int k; @@ -483,10 +483,10 @@ static struct coda_codec *coda_find_codec(struct coda_dev *dev, int src_fourcc, } static void coda_get_max_dimensions(struct coda_dev *dev, - struct coda_codec *codec, + const struct coda_codec *codec, int *max_w, int *max_h) { - struct coda_codec *codecs = dev-devtype-codecs; + const struct coda_codec *codecs = dev-devtype-codecs; int num_codecs = dev-devtype-num_codecs; unsigned int w, h; int k; @@ -546,9 +546,9 @@ static int coda_enum_fmt(struct file *file, void *priv, struct v4l2_fmtdesc *f) { struct coda_ctx *ctx = fh_to_ctx(priv); - struct coda_codec *codecs = ctx-dev-devtype-codecs; - struct coda_fmt *formats = coda_formats; - struct coda_fmt *fmt; + const struct coda_codec *codecs = ctx-dev-devtype-codecs; + const struct coda_fmt *formats = coda_formats; + const struct coda_fmt *fmt; int num_codecs = ctx-dev-devtype-num_codecs; int num_formats = ARRAY_SIZE(coda_formats); int i, k, num = 0; @@ -621,7 +621,7 @@ static int coda_g_fmt(struct file *file, void *priv, return 0; } -static int
Re: [PATCH 09/11] [media] coda: split format enumeration for encoder end decoder device
On 07/17/2014 06:05 PM, Philipp Zabel wrote: Let the decoder capture side and encoder output side only list uncompressed formats, and the decoder output and encoder capture side only list compressed formats. Signed-off-by: Philipp Zabel p.za...@pengutronix.de Acked-by: Hans Verkuil hans.verk...@cisco.com Regards, Hans --- drivers/media/platform/coda.c | 57 +++ 1 file changed, 19 insertions(+), 38 deletions(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index 4a159031..e63226b 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -542,8 +542,8 @@ static int coda_querycap(struct file *file, void *priv, return 0; } -static int enum_fmt(void *priv, struct v4l2_fmtdesc *f, - enum v4l2_buf_type type, int src_fourcc) +static int coda_enum_fmt(struct file *file, void *priv, + struct v4l2_fmtdesc *f) { struct coda_ctx *ctx = fh_to_ctx(priv); struct coda_codec *codecs = ctx-dev-devtype-codecs; @@ -552,11 +552,19 @@ static int enum_fmt(void *priv, struct v4l2_fmtdesc *f, int num_codecs = ctx-dev-devtype-num_codecs; int num_formats = ARRAY_SIZE(coda_formats); int i, k, num = 0; + bool yuv; + + if (ctx-inst_type == CODA_INST_ENCODER) + yuv = (f-type == V4L2_BUF_TYPE_VIDEO_OUTPUT); + else + yuv = (f-type == V4L2_BUF_TYPE_VIDEO_CAPTURE); for (i = 0; i num_formats; i++) { - /* Both uncompressed formats are always supported */ - if (coda_format_is_yuv(formats[i].fourcc) - !coda_format_is_yuv(src_fourcc)) { + /* Skip either raw or compressed formats */ + if (yuv != coda_format_is_yuv(formats[i].fourcc)) + continue; + /* All uncompressed formats are always supported */ + if (yuv) { if (num == f-index) break; ++num; @@ -564,12 +572,10 @@ static int enum_fmt(void *priv, struct v4l2_fmtdesc *f, } /* Compressed formats may be supported, check the codec list */ for (k = 0; k num_codecs; k++) { - /* if src_fourcc is set, only consider matching codecs */ - if (type == V4L2_BUF_TYPE_VIDEO_CAPTURE - formats[i].fourcc == codecs[k].dst_fourcc - (!src_fourcc || src_fourcc == codecs[k].src_fourcc)) + if (f-type == V4L2_BUF_TYPE_VIDEO_CAPTURE + formats[i].fourcc == codecs[k].dst_fourcc) break; - if (type == V4L2_BUF_TYPE_VIDEO_OUTPUT + if (f-type == V4L2_BUF_TYPE_VIDEO_OUTPUT formats[i].fourcc == codecs[k].src_fourcc) break; } @@ -584,7 +590,7 @@ static int enum_fmt(void *priv, struct v4l2_fmtdesc *f, fmt = formats[i]; strlcpy(f-description, fmt-name, sizeof(f-description)); f-pixelformat = fmt-fourcc; - if (!coda_format_is_yuv(fmt-fourcc)) + if (!yuv) f-flags |= V4L2_FMT_FLAG_COMPRESSED; return 0; } @@ -593,31 +599,6 @@ static int enum_fmt(void *priv, struct v4l2_fmtdesc *f, return -EINVAL; } -static int coda_enum_fmt_vid_cap(struct file *file, void *priv, - struct v4l2_fmtdesc *f) -{ - struct coda_ctx *ctx = fh_to_ctx(priv); - struct vb2_queue *src_vq; - struct coda_q_data *q_data_src; - - /* If the source format is already fixed, only list matching formats */ - src_vq = v4l2_m2m_get_vq(ctx-fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); - if (vb2_is_streaming(src_vq)) { - q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); - - return enum_fmt(priv, f, V4L2_BUF_TYPE_VIDEO_CAPTURE, - q_data_src-fourcc); - } - - return enum_fmt(priv, f, V4L2_BUF_TYPE_VIDEO_CAPTURE, 0); -} - -static int coda_enum_fmt_vid_out(struct file *file, void *priv, - struct v4l2_fmtdesc *f) -{ - return enum_fmt(priv, f, V4L2_BUF_TYPE_VIDEO_OUTPUT, 0); -} - static int coda_g_fmt(struct file *file, void *priv, struct v4l2_format *f) { @@ -972,12 +953,12 @@ static int coda_subscribe_event(struct v4l2_fh *fh, static const struct v4l2_ioctl_ops coda_ioctl_ops = { .vidioc_querycap= coda_querycap, - .vidioc_enum_fmt_vid_cap = coda_enum_fmt_vid_cap, + .vidioc_enum_fmt_vid_cap = coda_enum_fmt, .vidioc_g_fmt_vid_cap = coda_g_fmt, .vidioc_try_fmt_vid_cap = coda_try_fmt_vid_cap, .vidioc_s_fmt_vid_cap =
Re: [PATCH 10/11] [media] coda: default to h.264 decoder on invalid formats
On 07/17/2014 06:05 PM, Philipp Zabel wrote: If the user provides an invalid format, let the decoder device default to h.264. Acked-by: Hans Verkuil hans.verk...@cisco.com Regards, Hans Signed-off-by: Philipp Zabel p.za...@pengutronix.de --- drivers/media/platform/coda.c | 8 +++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/coda.c b/drivers/media/platform/coda.c index e63226b..ed5fa4c 100644 --- a/drivers/media/platform/coda.c +++ b/drivers/media/platform/coda.c @@ -685,7 +685,7 @@ static int coda_try_fmt_vid_cap(struct file *file, void *priv, struct v4l2_format *f) { struct coda_ctx *ctx = fh_to_ctx(priv); - struct coda_codec *codec; + struct coda_codec *codec = NULL; struct vb2_queue *src_vq; int ret; @@ -738,6 +738,12 @@ static int coda_try_fmt_vid_out(struct file *file, void *priv, /* Determine codec by encoded format, returns NULL if raw or invalid */ codec = coda_find_codec(ctx-dev, f-fmt.pix.pixelformat, V4L2_PIX_FMT_YUV420); + if (!codec ctx-inst_type == CODA_INST_DECODER) { + codec = coda_find_codec(ctx-dev, V4L2_PIX_FMT_H264, + V4L2_PIX_FMT_YUV420); + if (!codec) + return -EINVAL; + } if (!f-fmt.pix.colorspace) f-fmt.pix.colorspace = V4L2_COLORSPACE_REC709; -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 2/4] drivers/staging/media/davinci_vpfe/dm365_ipipeif.c: fix negativity check
[linux-3.16-rc5/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c:210]: (style) Checking if unsigned variable 'val' is less than zero. val = get_oneshot_mode(ipipeif-input); if (val 0) { pr_err(ipipeif: links setup required); return -EINVAL; } but static int get_oneshot_mode(enum ipipeif_input_entity input) Introduced temporary variable for negativity check. val is afterwards used in a lot of bitwise operations, so changing its type to signed is not safe, according to CERT C Secure Coding Standards chapter INT13-C: Use bitwise operators only on unsigned operands https://www.securecoding.cert.org/confluence/display/seccode/INT13-C.+Use+bitwise+operators+only+on+unsigned+operands Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=80521 Reported-by: David Binderman dcb...@hotmail.com Signed-off-by: Andrey Utkin andrey.krieger.ut...@gmail.com --- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c index 59540cd..6d4893b 100644 --- a/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c +++ b/drivers/staging/media/davinci_vpfe/dm365_ipipeif.c @@ -196,6 +196,7 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd) int data_shift; int pack_mode; int source1; + int tmp; ipipeif_base_addr = ipipeif-ipipeif_base_addr; @@ -206,8 +207,8 @@ static int ipipeif_hw_setup(struct v4l2_subdev *sd) outformat = ipipeif-formats[IPIPEIF_PAD_SOURCE]; /* Combine all the fields to make CFG1 register of IPIPEIF */ - val = get_oneshot_mode(ipipeif-input); - if (val 0) { + tmp = val = get_oneshot_mode(ipipeif-input); + if (tmp 0) { pr_err(ipipeif: links setup required); return -EINVAL; } -- 1.8.5.5 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 06/11] [media] coda: delay coda_fill_bitstream()
Hi Hans, thank you for the review. Am Donnerstag, den 17.07.2014, 18:17 +0200 schrieb Hans Verkuil: @@ -2272,6 +2273,15 @@ static int coda_start_streaming(struct vb2_queue *q, unsigned int count) q_data_src = get_q_data(ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); if (q-type == V4L2_BUF_TYPE_VIDEO_OUTPUT) { if (q_data_src-fourcc == V4L2_PIX_FMT_H264) { + struct vb2_queue *vq; + /* start_streaming_called must be set, for v4l2_m2m_buf_done() */ + vq = v4l2_m2m_get_vq(ctx-fh.m2m_ctx, V4L2_BUF_TYPE_VIDEO_OUTPUT); + vq-start_streaming_called = 1; Why set start_streaming_called to 1? It is set before calling start_streaming. This is a recent change in videobuf2-core.c though. Because I hadn't seen [media] v4l: vb2: Fix stream start and buffer completion race yet. I'll update this patch. BTW, you should test with CONFIG_VIDEO_ADV_DEBUG on and force start_streaming errors to check whether vb2_buffer_done(buf, VB2_BUF_STATE_DEQUEUED) is called for the queued buffers in case of start_streaming failure. With that config option vb2 will complain about unbalanced vb2 operations. I strongly suspect this code does not play well with this. Yes, I will fix this. BTW, isn't it time to split up the coda driver? Over 3000 lines... Indeed. This is also on my list. regards Philipp -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] si2168: Set symbol_rate in set_frontend for DVB-C delivery system.
This patch adds symbol rate setting to the driver. Signed-off-by: Luis Alves lja...@gmail.com --- drivers/media/dvb-frontends/si2168.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 0422925..7980741 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -278,6 +278,18 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; + /* set DVB-C symbol rate */ + if (c-delivery_system == SYS_DVBC_ANNEX_A) { + memcpy(cmd.args, \x14\x00\x02\x11, 4); + cmd.args[4] = (c-symbol_rate / 1000) 0xff; + cmd.args[5] = ((c-symbol_rate / 1000) 8) 0xff; + cmd.wlen = 6; + cmd.rlen = 4; + ret = si2168_cmd_execute(s, cmd); + if (ret) + goto err; + } + memcpy(cmd.args, \x14\x00\x0f\x10\x10\x00, 6); cmd.wlen = 6; cmd.rlen = 4; -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
RTL2836 analysis
I would like to analyse my DTMB / DMB-TH TV tuner, and here is the components: USB bridge: RTL2832P, Demod: RTL2836S, Tuner: FC0012 Thanks to Antti's analysis tool, I have generated some codes. I can match parts of codes with Realtek original source code rtl2832u-2.2.2. But the beginning codes I cannot really understand. What it actually performs, such as power-on demod, tuner, or something else? ret = rtl28xx_wr_regs(d, 0x2148, \x10\x02, 2); // generated -- usb_epa_fifo_reset():write_usb_sys_register(p_state, RTD2831_RMAP_INDEX_USB_EPA_CTL, 0x0210) ret = rtl28xx_wr_regs(d, 0x2148, \x00\x00, 2); // generated -- rtl2832u_power_ctrl():rtl28xx_wr_regs(d, USB_EPA_CTL, \x00\x00, 2) ret = rtl28xx_wr_regs(d, 0x300b, \x02, 1); // generated -- DEMOD_CTL1 (rtl2831u.c:rtl2831u_power_ctrl()) ret = rtl28xx_wr_regs(d, 0x3000, \xa0, 1); // generated -- DEMOD_CTL (#1010 ) ret = rtl28xx_wr_regs(d, 0x3000, \x80, 1); // generated -- DEMOD_CTL (#1000 ): set BIT5 off ret = rtl28xx_wr_regs(d, 0x3000, \xa0, 1); // generated -- DEMOD_CTL (#1010 ): set BIT5 on ret = rtl28xx_wr_regs(d, 0x3000, \xa8, 1); // generated -- DEMOD_CTL (#1010 1000): set BIT3 on ret = rtl28xx_wr_regs(d, 0x3000, \xe8, 1); // generated -- DEMOD_CTL (#1110 1000): set BIT6 on ret = rtl28xx_wr_regs(d, 0x3001, \x09, 1); // generated -- GPIO_OUTPUT_VAL (# 1001) ret = rtl28xx_wr_regs(d, 0x3001, \x29, 1); // generated -- GPIO_OUTPUT_VAL (#0010 1001): set BIT5 on ret = rtl28xx_wr_regs(d, 0x3004, \x02, 1); // generated ret = rtl28xx_wr_regs(d, 0x3003, \xfd, 1); // generated ret = rtl28xx_wr_regs(d, 0x3001, \x09, 1); // generated -- GPIO_OUTPUT_VAL (# 1001): set BIT5 off ret = rtl28xx_wr_regs(d, 0x3004, \x02, 1); // generated ret = rtl28xx_wr_regs(d, 0x3003, \xfd, 1); // generated ret = rtl28xx_wr_regs(d, 0x3001, \x08, 1); // generated -- GPIO_OUTPUT_VAL (# 1000): set BIT0 off ret = rtl28xx_wr_regs(d, 0x3004, \x02, 1); // generated ret = rtl28xx_wr_regs(d, 0x3003, \xfd, 1); // generated ret = rtl28xx_wr_regs(d, 0x3001, \x48, 1); // generated -- GPIO_OUTPUT_VAL (#0100 1000): set BIT6 on ret = rtl28xx_wr_regs(d, 0x3004, \x02, 1); // generated ret = rtl28xx_wr_regs(d, 0x3003, \xfd, 1); // generated Below the remaining parts of the codes that I have analysed: ret = rtl2836_wr_regs(priv, 0x01, 0, \x05, 1); // generated -- demod_rtl2836:InitRegTable[] begin ret = rtl2836_wr_regs(priv, 0x02, 0, \x20, 1); // generated ... ret = rtl2836_wr_regs(priv, 0x03, 0, \x00, 1); // generated ret = rtl2836_wr_regs(priv, 0x0e, 0, \x25, 1); // generated ret = rtl2836_wr_regs(priv, 0x11, 0, \x53, 1); // generated ret = rtl2836_wr_regs(priv, 0x12, 0, \x91, 1); // generated ret = rtl2836_wr_regs(priv, 0x16, 0, \x03, 1); // generated ret = rtl2836_wr_regs(priv, 0x19, 0, \x19, 1); // generated ret = rtl2836_wr_regs(priv, 0x1b, 0, \xcc, 1); // generated ret = rtl2836_wr_regs(priv, 0x1f, 0, \x05, 1); // generated ret = rtl2836_wr_regs(priv, 0x20, 0, \x77, 1); // generated ret = rtl2836_wr_regs(priv, 0x20, 0, \x77, 1); // generated ret = rtl2836_wr_regs(priv, 0x03, 1, \x38, 1); // generated ret = rtl2836_wr_regs(priv, 0x31, 1, \x01, 1); // generated ret = rtl2836_wr_regs(priv, 0x67, 1, \x30, 1); // generated ret = rtl2836_wr_regs(priv, 0x68, 1, \x10, 1); // generated ret = rtl2836_wr_regs(priv, 0x7f, 1, \x05, 1); // generated ret = rtl2836_wr_regs(priv, 0xda, 1, \x91, 1); // generated ret = rtl2836_wr_regs(priv, 0xdb, 1, \x05, 1); // generated ret = rtl2836_wr_regs(priv, 0x09, 2, \x0a, 1); // generated ret = rtl2836_wr_regs(priv, 0x10, 2, \x31, 1); // generated ret = rtl2836_wr_regs(priv, 0x11, 2, \x31, 1); // generated ret = rtl2836_wr_regs(priv, 0x1b, 2, \x1e, 1); // generated ret = rtl2836_wr_regs(priv, 0x1e, 2, \x3a, 1); // generated ret = rtl2836_wr_regs(priv, 0x1f, 2, \x1f, 1); // generated ret = rtl2836_wr_regs(priv, 0x21, 2, \x3f, 1); // generated ret = rtl2836_wr_regs(priv, 0x24, 2, \x01, 1); // generated ret = rtl2836_wr_regs(priv, 0x27, 2, \x17, 1); // generated ret = rtl2836_wr_regs(priv, 0x31, 2, \x35, 1); // generated ret = rtl2836_wr_regs(priv, 0x32, 2, \x3f, 1); // generated ret = rtl2836_wr_regs(priv, 0x4f, 2, \x1a, 1); // generated ret = rtl2836_wr_regs(priv, 0x5a, 2, \x05, 1); // generated ret = rtl2836_wr_regs(priv, 0x5b, 2, \x08, 1); // generated ret = rtl2836_wr_regs(priv, 0x5c, 2, \x08, 1); // generated ret = rtl2836_wr_regs(priv, 0x5e, 2, \xa8, 1); // generated ret = rtl2836_wr_regs(priv, 0x70, 2, \x0c, 1); // generated ret = rtl2836_wr_regs(priv, 0x77, 2, \x29, 1); // generated ret = rtl2836_wr_regs(priv, 0x7a, 2, \x2f, 1); // generated ret = rtl2836_wr_regs(priv, 0x81, 2, \x0a, 1); // generated ret = rtl2836_wr_regs(priv, 0x8d, 2, \x77, 1); // generated ret = rtl2836_wr_regs(priv, 0x8e, 2, \x87, 1); // generated ret = rtl2836_wr_regs(priv, 0x93, 2, \xff, 1); // generated ret = rtl2836_wr_regs(priv, 0x94, 2, \x03, 1); // generated ret = rtl2836_wr_regs(priv, 0x9d, 2, \xff, 1); // generated ret = rtl2836_wr_regs(priv, 0x9e, 2, \x03, 1); //
[GIT PULL FOR v3.17] A few more fixes for 3.17
The following changes since commit bdc2df62ae38bbab044078f4d25a7a3d9e2379c9: [media] v4l: vsp1: uds: Fix scaling of alpha layer (2014-07-17 12:45:00 -0300) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git for-v3.17c for you to fetch changes up to 12ae380f97c884b21c1eefb1c7dfd0f411639f70: v4l: ctrls: Unlocked variants of v4l2_ctrl_s_ctrl{,_int64}() (2014-07-17 20:41:16 +0200) Andrey Utkin (1): drivers/staging/media/davinci_vpfe/dm365_ipipeif.c: fix negativity check Hans Verkuil (1): saa7146: fix compile warning Ian Molton (1): adv7180: Remove duplicate unregister call Sakari Ailus (3): v4l: ctrls: Move control lock/unlock above the control access functions v4l: ctrls: Provide an unlocked variant of v4l2_ctrl_modify_range() v4l: ctrls: Unlocked variants of v4l2_ctrl_s_ctrl{,_int64}() drivers/media/common/saa7146/saa7146_fops.c| 13 ++--- drivers/media/i2c/adv7180.c| 1 - drivers/media/v4l2-core/v4l2-ctrls.c | 34 -- drivers/staging/media/davinci_vpfe/dm365_ipipeif.c | 5 +++-- include/media/v4l2-ctrls.h | 75 +++--- 5 files changed, 89 insertions(+), 39 deletions(-) -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] si2168: improve scanning performance by setting property 0301 with a value from Windows driver.
Signed-off-by: Olli Salonen olli.salo...@iki.fi --- drivers/media/dvb-frontends/si2168.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 0422925..56811e1 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -313,6 +313,13 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; + memcpy(cmd.args, \x14\x00\x01\x03\x0c\x00, 6); + cmd.wlen = 6; + cmd.rlen = 4; + ret = si2168_cmd_execute(s, cmd); + if (ret) + goto err; + memcpy(cmd.args, \x85, 1); cmd.wlen = 1; cmd.rlen = 1; -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH for v3.17] saa7146: fix compile warning
Fall-out from the recent struct v4l2_framebuffer change. drivers/media/common/saa7146/saa7146_fops.c: In function ‘saa7146_vv_init’: drivers/media/common/saa7146/saa7146_fops.c:536:6: warning: assignment from incompatible pointer type [enabled by default] fmt = vv-ov_fb.fmt; ^ Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/common/saa7146/saa7146_fops.c | 13 ++--- 1 file changed, 6 insertions(+), 7 deletions(-) diff --git a/drivers/media/common/saa7146/saa7146_fops.c b/drivers/media/common/saa7146/saa7146_fops.c index f2cc521..d9e1d63 100644 --- a/drivers/media/common/saa7146/saa7146_fops.c +++ b/drivers/media/common/saa7146/saa7146_fops.c @@ -533,13 +533,12 @@ int saa7146_vv_init(struct saa7146_dev* dev, struct saa7146_ext_vv *ext_vv) if (dev-ext_vv_data-capabilities V4L2_CAP_VBI_CAPTURE) saa7146_vbi_uops.init(dev,vv); - fmt = vv-ov_fb.fmt; - fmt-width = vv-standard-h_max_out; - fmt-height = vv-standard-v_max_out; - fmt-pixelformat = V4L2_PIX_FMT_RGB565; - fmt-bytesperline = 2 * fmt-width; - fmt-sizeimage = fmt-bytesperline * fmt-height; - fmt-colorspace = V4L2_COLORSPACE_SRGB; + vv-ov_fb.fmt.width = vv-standard-h_max_out; + vv-ov_fb.fmt.height = vv-standard-v_max_out; + vv-ov_fb.fmt.pixelformat = V4L2_PIX_FMT_RGB565; + vv-ov_fb.fmt.bytesperline = 2 * vv-ov_fb.fmt.width; + vv-ov_fb.fmt.sizeimage = vv-ov_fb.fmt.bytesperline * vv-ov_fb.fmt.height; + vv-ov_fb.fmt.colorspace = V4L2_COLORSPACE_SRGB; fmt = vv-video_fmt; fmt-width = 384; -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] si2168: improve scanning performance by setting property 0301 with a value from Windows driver.
This would be best done during init and not every time on set_frontend. Regards, Luis On Thu, Jul 17, 2014 at 7:43 PM, Olli Salonen olli.salo...@iki.fi wrote: Signed-off-by: Olli Salonen olli.salo...@iki.fi --- drivers/media/dvb-frontends/si2168.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 0422925..56811e1 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -313,6 +313,13 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; + memcpy(cmd.args, \x14\x00\x01\x03\x0c\x00, 6); + cmd.wlen = 6; + cmd.rlen = 4; + ret = si2168_cmd_execute(s, cmd); + if (ret) + goto err; + memcpy(cmd.args, \x85, 1); cmd.wlen = 1; cmd.rlen = 1; -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] si2168: Fix i2c_add_mux_adapter return value in probe function. In case it failed the return value was always 0.
Signed-off-by: Luis Alves lja...@gmail.com --- drivers/media/dvb-frontends/si2168.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 7980741..3fed522 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -619,8 +619,10 @@ static int si2168_probe(struct i2c_client *client, /* create mux i2c adapter for tuner */ s-adapter = i2c_add_mux_adapter(client-adapter, client-dev, s, 0, 0, 0, si2168_select, si2168_deselect); - if (s-adapter == NULL) + if (s-adapter == NULL) { + ret = -ENODEV; goto err; + } /* create dvb_frontend */ memcpy(s-fe.ops, si2168_ops, sizeof(struct dvb_frontend_ops)); -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
davinci compiler warnings
Hi Prabhakar, Can you take a look at these new warnings? I've just upgraded my compiler for the daily build to 4.9.1, so that's probably why they weren't seen before. Regards, Hans /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c: In function 'vpif_remove': /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:1389:36: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] vb2_dma_contig_cleanup_ctx(common-alloc_ctx); ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:1385:2: note: containing loop for (i = 0; i VPIF_DISPLAY_MAX_DEVICES; i++) { ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_remove': /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1581:36: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] vb2_dma_contig_cleanup_ctx(common-alloc_ctx); ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1577:2: note: containing loop for (i = 0; i VPIF_CAPTURE_MAX_DEVICES; i++) { ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1580:23: warning: array subscript is above array bounds [-Warray-bounds] common = ch-common[i]; ^ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: davinci compiler warnings
Hi Hans On Thu, Jul 17, 2014 at 8:41 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Prabhakar, Can you take a look at these new warnings? I've just upgraded my compiler for the daily build to 4.9.1, so that's probably why they weren't seen before. Ok will look at it. BTW are these errors from the media/master branch or from your tree ? Thanks, --Prabhakar Lad Regards, Hans /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c: In function 'vpif_remove': /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:1389:36: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] vb2_dma_contig_cleanup_ctx(common-alloc_ctx); ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:1385:2: note: containing loop for (i = 0; i VPIF_DISPLAY_MAX_DEVICES; i++) { ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_remove': /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1581:36: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] vb2_dma_contig_cleanup_ctx(common-alloc_ctx); ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1577:2: note: containing loop for (i = 0; i VPIF_CAPTURE_MAX_DEVICES; i++) { ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1580:23: warning: array subscript is above array bounds [-Warray-bounds] common = ch-common[i]; ^ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: davinci compiler warnings
On 07/17/2014 09:49 PM, Prabhakar Lad wrote: Hi Hans On Thu, Jul 17, 2014 at 8:41 PM, Hans Verkuil hverk...@xs4all.nl wrote: Hi Prabhakar, Can you take a look at these new warnings? I've just upgraded my compiler for the daily build to 4.9.1, so that's probably why they weren't seen before. Ok will look at it. BTW are these errors from the media/master branch or from your tree ? media/master Thanks, --Prabhakar Lad Regards, Hans /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c: In function 'vpif_remove': /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:1389:36: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] vb2_dma_contig_cleanup_ctx(common-alloc_ctx); ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_display.c:1385:2: note: containing loop for (i = 0; i VPIF_DISPLAY_MAX_DEVICES; i++) { ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c: In function 'vpif_remove': /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1581:36: warning: iteration 1u invokes undefined behavior [-Waggressive-loop-optimizations] vb2_dma_contig_cleanup_ctx(common-alloc_ctx); ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1577:2: note: containing loop for (i = 0; i VPIF_CAPTURE_MAX_DEVICES; i++) { ^ /home/hans/work/build/media-git/drivers/media/platform/davinci/vpif_capture.c:1580:23: warning: array subscript is above array bounds [-Warray-bounds] common = ch-common[i]; ^ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 00/28] IPUv3 prep for video capture
On 07/17/2014 04:10 AM, Hans Verkuil wrote: Hi Steve, I don't know what your plan is, but when you want to mainline this it is the gpu subsystem that needs to review it. I noticed it wasn't cross-posted to the dri-devel mailinglist. Hi Hans, I'm reworking these patches, I've merged in some of the changes posted by Philip Zabel ([RFC PATCH 00/26] i.MX5/6 IPUv3 CSI/IC), specifically I've decided to use their version of ipu-ic.c, and also brought in their video-mux subdev driver. So I'm fine with cancelling this patch set. When/if I post the reworked v4l2 drivers that implement the media entity/device framework I will post the ipu-v3 specific changes to dri-devel as well. The reason I like Philip's version of ipu-ic is that it implements tiling to allow resizing output frames larger than 1024x1024. We (Mentor Graphics) did the same IC tiling, but it was done inside a separate mem2mem driver. By moving the tiling into ipu-ic, it allows 1024x1024 resizing to be part of an imx-ipuv3-ic media entity, and this entity can be part of multiple video pipelines (capture, video output, mem2mem). I am a bit worried about the amount of v4l2-specific stuff that is going into drivers/gpu/ipu-v3. Do things like csc and csi really belong there instead of under drivers/media? The current philosophy of the ipu-v3 driver seems to be that it is a library of IPU register-level primitives, so ipu-csi and ipu-ic follow that model. There will be nothing v4l2-specific in ipu-csi and ipu-ic, although the v4l2 subdev's will be the only clients of ipu-csi and ipu-ic. Let me know if this was just preliminary code, or if this was intended to be the final code. I suspect the former. This is all been reworked so go ahead and cancel it. Thanks, Steve On 06/26/2014 03:05 AM, Steve Longerbeam wrote: Hi Philip, Sascha, Here is a rebased set of IPU patches that prepares for video capture support. Video capture is not included in this set. I've addressed all your IPU-specific concerns from the previous patch set, the major ones being: - the IOMUXC control for CSI input selection has been removed. This should be part of a future CSI media entity driver. - the ipu-irt unit has been removed. Enabling the IRT module is folded into ipu-ic unit. The ipu-ic unit is also cleaned up a bit. - the ipu-csi APIs are consolidated/simplified. - added CSI and IC base offsets for i.MX51/i.MX53. Steve Longerbeam (28): ARM: dts: imx6qdl: Add ipu aliases gpu: ipu-v3: Add ipu_get_num() gpu: ipu-v3: Add functions to set CSI/IC source muxes gpu: ipu-v3: Rename and add IDMAC channels gpu: ipu-v3: Add units required for video capture gpu: ipu-v3: smfc: Move enable/disable to ipu-smfc.c gpu: ipu-v3: smfc: Convert to per-channel gpu: ipu-v3: smfc: Add ipu_smfc_set_watermark() gpu: ipu-v3: Add ipu_mbus_code_to_colorspace() gpu: ipu-v3: Add rotation mode conversion utilities gpu: ipu-v3: Add helper function checking if pixfmt is planar gpu: ipu-v3: Move IDMAC channel names to imx-ipu-v3.h gpu: ipu-v3: Add ipu_idmac_buffer_is_ready() gpu: ipu-v3: Add ipu_idmac_clear_buffer() gpu: ipu-v3: Add __ipu_idmac_reset_current_buffer() gpu: ipu-v3: Add ipu_stride_to_bytes() gpu: ipu-v3: Add ipu_idmac_enable_watermark() gpu: ipu-v3: Add ipu_idmac_lock_enable() gpu: ipu-v3: Add idmac channel linking support gpu: ipu-v3: Add ipu-cpmem unit staging: imx-drm: Convert to new ipu_cpmem API gpu: ipu-cpmem: Add ipu_cpmem_set_block_mode() gpu: ipu-cpmem: Add ipu_cpmem_set_axi_id() gpu: ipu-cpmem: Add ipu_cpmem_set_rotation() gpu: ipu-cpmem: Add second buffer support to ipu_cpmem_set_image() gpu: ipu-v3: Add more planar formats support gpu: ipu-cpmem: Add ipu_cpmem_dump() gpu: ipu-v3: Add ipu_dump() arch/arm/boot/dts/imx6q.dtsi |1 + arch/arm/boot/dts/imx6qdl.dtsi|1 + drivers/gpu/ipu-v3/Makefile |3 +- drivers/gpu/ipu-v3/ipu-common.c | 1077 +++-- drivers/gpu/ipu-v3/ipu-cpmem.c| 817 + drivers/gpu/ipu-v3/ipu-csi.c | 701 + drivers/gpu/ipu-v3/ipu-ic.c | 812 + drivers/gpu/ipu-v3/ipu-prv.h | 103 +++- drivers/gpu/ipu-v3/ipu-smfc.c | 156 - drivers/staging/imx-drm/ipuv3-plane.c | 16 +- include/video/imx-ipu-v3.h| 371 +++- 11 files changed, 3389 insertions(+), 669 deletions(-) create mode 100644 drivers/gpu/ipu-v3/ipu-cpmem.c create mode 100644 drivers/gpu/ipu-v3/ipu-csi.c create mode 100644 drivers/gpu/ipu-v3/ipu-ic.c -- Steve Longerbeam | Senior Embedded Engineer, ESD Services Mentor Embedded(tm) | 46871 Bayside Parkway, Fremont, CA 94538 P 510.354.5838 | M 408.410.2735 Nucleus(r) | Linux(r) | Android(tm) | Services | UI | Multi-OS -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of
[PATCH 1/1] si2168: Remove testing for demod presence on probe. If the demod is in sleep mode it will fail.
Signed-off-by: Luis Alves lja...@gmail.com --- drivers/media/dvb-frontends/si2168.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 3fed522..7e45eeab 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -595,7 +595,6 @@ static int si2168_probe(struct i2c_client *client, struct si2168_config *config = client-dev.platform_data; struct si2168 *s; int ret; - struct si2168_cmd cmd; dev_dbg(client-dev, %s:\n, __func__); @@ -609,13 +608,6 @@ static int si2168_probe(struct i2c_client *client, s-client = client; mutex_init(s-i2c_mutex); - /* check if the demod is there */ - cmd.wlen = 0; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, cmd); - if (ret) - goto err; - /* create mux i2c adapter for tuner */ s-adapter = i2c_add_mux_adapter(client-adapter, client-dev, s, 0, 0, 0, si2168_select, si2168_deselect); -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 03/23] v4l: Support extending the v4l2_pix_format structure
Hi Laurent, Something that just caught my eye: On 06/24/2014 01:54 AM, Laurent Pinchart wrote: The v4l2_pix_format structure has no reserved field. It is embedded in the v4l2_framebuffer structure which has no reserved fields either, and in the v4l2_format structure which has reserved fields that were not previously required to be zeroed out by applications. To allow extending v4l2_pix_format, inline it in the v4l2_framebuffer structure, and use the priv field as a magic value to indicate that the application has set all v4l2_pix_format extended fields and zeroed all reserved fields following the v4l2_pix_format field in the v4l2_format structure. The availability of this API extension is reported to userspace through the new V4L2_CAP_EXT_PIX_FORMAT capability flag. Just checking that the priv field is still set to the magic value at [GS]_FMT return wouldn't be enough, as older kernels don't zero the priv field on return. To simplify the internal API towards drivers zero the extended fields and set the priv field to the magic value for applications not aware of the extensions. Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com --- diff --git a/Documentation/DocBook/media/v4l/pixfmt.xml b/Documentation/DocBook/media/v4l/pixfmt.xml index 91dcbc8..8c56cacd 100644 --- a/Documentation/DocBook/media/v4l/pixfmt.xml +++ b/Documentation/DocBook/media/v4l/pixfmt.xml @@ -112,9 +112,28 @@ see xref linkend=colorspaces /./entry row entry__u32/entry entrystructfieldpriv/structfield/entry - entryReserved for custom (driver defined) additional -information about formats. When not used drivers and applications must -set this field to zero./entry + entryparaThis field indicates whether the remaining fields of the +structnamev4l2_pix_format/structname structure, also called the extended +fields, are valid. When set to constantV4L2_PIX_FMT_PRIV_MAGIC/constant, it +indicates that the extended fields have been correctly initialized. When set to +any other value it indicates that the extended fields contain undefined values. +/para +paraApplications that wish to use the pixel format extended fields must first +ensure that the feature is supported by querying the device for the +link linkend=querycapconstantV4L2_CAP_EXT_PIX_FORMAT/constant/link +capability. If the capability isn't set the pixel format extended fields are not +supported and using the extended fields will lead to undefined results./para +paraTo use the extended fields, applications must set the +structfieldpriv/structfield field to +constantV4L2_PIX_FMT_PRIV_MAGIC/constant, initialize all the extended fields +and zero the unused bytes of the structnamev4l2_format/structname +structfieldraw_data/structfield field./para Easy to write, much harder to implement. You would end up with something like: memset(fmt.fmt.pix.flags + sizeof(fmt.fmt.pix.flags), 0, sizeof(fmt.fmt.raw_data) - sizeof(fmt.fmt.pix)); Not user-friendly and error-prone. I would suggest adding a reserved array to pix_format instead, of at least size (10 + 2 * 7) / 4 = 6 __u32. So: __u32 reserved[6]. Better would be to go with 10 + 17 = 27 elements (same as the number of reserved elements in v4l2_pix_format_mplane and one struct v4l2_plane_pix_format). That will allow you to just say that the app should zero the reserved array. +paraWhen the structfieldpriv/structfield field isn't set to +constantV4L2_PIX_FMT_PRIV_MAGIC/constant drivers must act as if all the +extended fields were set to zero. On return drivers must set the +structfieldpriv/structfield field to +constantV4L2_PIX_FMT_PRIV_MAGIC/constant and all the extended field to +applicable values./para/entry /row /tbody /tgroup Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 03/23] v4l: Support extending the v4l2_pix_format structure
And another thing that I found while implementing this in v4l2-ctl: On 06/24/2014 01:54 AM, Laurent Pinchart wrote: The v4l2_pix_format structure has no reserved field. It is embedded in the v4l2_framebuffer structure which has no reserved fields either, and in the v4l2_format structure which has reserved fields that were not previously required to be zeroed out by applications. To allow extending v4l2_pix_format, inline it in the v4l2_framebuffer structure, and use the priv field as a magic value to indicate that the application has set all v4l2_pix_format extended fields and zeroed all reserved fields following the v4l2_pix_format field in the v4l2_format structure. The availability of this API extension is reported to userspace through the new V4L2_CAP_EXT_PIX_FORMAT capability flag. Just checking that the priv field is still set to the magic value at [GS]_FMT return wouldn't be enough, as older kernels don't zero the priv field on return. To simplify the internal API towards drivers zero the extended fields and set the priv field to the magic value for applications not aware of the extensions. Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 16bffd8..01b4588 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -959,13 +959,48 @@ static int check_fmt(struct file *file, enum v4l2_buf_type type) return -EINVAL; } +static void v4l_sanitize_format(struct v4l2_format *fmt) +{ + unsigned int offset; + + /* + * The v4l2_pix_format structure has been extended with fields that were + * not previously required to be set to zero by applications. The priv + * field, when set to a magic value, indicates the the extended fields + * are valid. Otherwise they will contain undefined values. To simplify + * the API towards drivers zero the extended fields and set the priv + * field to the magic value when the extended pixel format structure + * isn't used by applications. + */ + + if (fmt-type != V4L2_BUF_TYPE_VIDEO_CAPTURE + fmt-type != V4L2_BUF_TYPE_VIDEO_OUTPUT) + return; + + if (fmt-fmt.pix.priv == V4L2_PIX_FMT_PRIV_MAGIC) + return; + + fmt-fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC; + + offset = offsetof(struct v4l2_pix_format, priv) ++ sizeof(fmt-fmt.pix.priv); + memset(((void *)fmt-fmt.pix) + offset, 0, +sizeof(fmt-fmt.pix) - offset); +} + static int v4l_querycap(const struct v4l2_ioctl_ops *ops, struct file *file, void *fh, void *arg) { struct v4l2_capability *cap = (struct v4l2_capability *)arg; + int ret; cap-version = LINUX_VERSION_CODE; - return ops-vidioc_querycap(file, fh, cap); + + ret = ops-vidioc_querycap(file, fh, cap); + + cap-capabilities |= V4L2_CAP_EXT_PIX_FORMAT; It should be ORed to cap-device_caps as well. + + return ret; Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] si2168: Set symbol_rate in set_frontend for DVB-C delivery system.
Looks sane, I will apply that. regards Antti On 07/17/2014 08:31 PM, Luis Alves wrote: This patch adds symbol rate setting to the driver. Signed-off-by: Luis Alves lja...@gmail.com --- drivers/media/dvb-frontends/si2168.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 0422925..7980741 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -278,6 +278,18 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; + /* set DVB-C symbol rate */ + if (c-delivery_system == SYS_DVBC_ANNEX_A) { + memcpy(cmd.args, \x14\x00\x02\x11, 4); + cmd.args[4] = (c-symbol_rate / 1000) 0xff; + cmd.args[5] = ((c-symbol_rate / 1000) 8) 0xff; + cmd.wlen = 6; + cmd.rlen = 4; + ret = si2168_cmd_execute(s, cmd); + if (ret) + goto err; + } + memcpy(cmd.args, \x14\x00\x0f\x10\x10\x00, 6); cmd.wlen = 6; cmd.rlen = 4; -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] si2168: Fix i2c_add_mux_adapter return value in probe function. In case it failed the return value was always 0.
Gah, there was a bug. Will apply that. Have to check if there is same mistake on other drivers I have used I2C mux. regards Antti On 07/17/2014 10:38 PM, Luis Alves wrote: Signed-off-by: Luis Alves lja...@gmail.com --- drivers/media/dvb-frontends/si2168.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 7980741..3fed522 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -619,8 +619,10 @@ static int si2168_probe(struct i2c_client *client, /* create mux i2c adapter for tuner */ s-adapter = i2c_add_mux_adapter(client-adapter, client-dev, s, 0, 0, 0, si2168_select, si2168_deselect); - if (s-adapter == NULL) + if (s-adapter == NULL) { + ret = -ENODEV; goto err; + } /* create dvb_frontend */ memcpy(s-fe.ops, si2168_ops, sizeof(struct dvb_frontend_ops)); -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1] si2168: Remove testing for demod presence on probe. If the demod is in sleep mode it will fail.
Looks good! I did some measurements against power meter and chip seems to be low power state by default. After firmware is downloaded and chip is put to sleep, it does not answer that fw status check, until it is woken up. There should not be ~any I/O during I2C probe(), so removing that quite useless check is OK. regards Antti On 07/17/2014 11:56 PM, Luis Alves wrote: Signed-off-by: Luis Alves lja...@gmail.com --- drivers/media/dvb-frontends/si2168.c | 8 1 file changed, 8 deletions(-) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 3fed522..7e45eeab 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -595,7 +595,6 @@ static int si2168_probe(struct i2c_client *client, struct si2168_config *config = client-dev.platform_data; struct si2168 *s; int ret; - struct si2168_cmd cmd; dev_dbg(client-dev, %s:\n, __func__); @@ -609,13 +608,6 @@ static int si2168_probe(struct i2c_client *client, s-client = client; mutex_init(s-i2c_mutex); - /* check if the demod is there */ - cmd.wlen = 0; - cmd.rlen = 1; - ret = si2168_cmd_execute(s, cmd); - if (ret) - goto err; - /* create mux i2c adapter for tuner */ s-adapter = i2c_add_mux_adapter(client-adapter, client-dev, s, 0, 0, 0, si2168_select, si2168_deselect); -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL FOR v3.17] A bunch of
Em Thu, 17 Jul 2014 10:09:40 +0200 Hans Verkuil hverk...@xs4all.nl escreveu: These are all little fixes for issues I found while working on the vivi replacement + some docbook fixes. Usually all for fairly obscure corner cases, but that's what you write a test driver for, after all. Regards, Hans The following changes since commit 3c0d394ea7022bb9666d9df97a5776c4bcc3045c: [media] dib8000: improve the message that reports per-layer locks (2014-07-07 09:59:01 -0300) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git core-fixes for you to fetch changes up to 2eb86fa0840ac281cc5ca0a63f1339fa00245c7d: v4l2-ioctl.c: check vfl_type in ENUM_FMT. (2014-07-14 14:55:47 +0200) Hans Verkuil (12): DocBook media: fix wrong spacing DocBook media: add missing dqevent src_change field. DocBook media: fix incorrect header reference v4l2-ioctl: call g_selection before calling cropcap v4l2-ioctl: clips, clipcount and bitmap should not be zeroed. This one causes compilation breakages: drivers/media/v4l2-core/v4l2-ioctl.c: In function 'v4l_enum_fmt': drivers/media/v4l2-core/v4l2-ioctl.c:1115:30: error: 'struct v4l2_fmtdesc' has no member named 'fmt' struct v4l2_clip *clips = p-fmt.win.clips; ^ drivers/media/v4l2-core/v4l2-ioctl.c:1116:20: error: 'struct v4l2_fmtdesc' has no member named 'fmt' u32 clipcount = p-fmt.win.clipcount; ^ drivers/media/v4l2-core/v4l2-ioctl.c:1117:19: error: 'struct v4l2_fmtdesc' has no member named 'fmt' void *bitmap = p-fmt.win.bitmap; ^ In file included from ./arch/x86/include/asm/string.h:2:0, from include/linux/string.h:17, from ./arch/x86/include/asm/page_32.h:34, from ./arch/x86/include/asm/page.h:13, from ./arch/x86/include/asm/thread_info.h:11, from include/linux/thread_info.h:54, from ./arch/x86/include/asm/preempt.h:6, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/media/v4l2-core/v4l2-ioctl.c:15: drivers/media/v4l2-core/v4l2-ioctl.c:1119:12: error: 'struct v4l2_fmtdesc' has no member named 'fmt' memset(p-fmt, 0, sizeof(p-fmt)); ^ ./arch/x86/include/asm/string_32.h:325:46: note: in definition of macro 'memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^ drivers/media/v4l2-core/v4l2-ioctl.c:1119:30: error: 'struct v4l2_fmtdesc' has no member named 'fmt' memset(p-fmt, 0, sizeof(p-fmt)); ^ ./arch/x86/include/asm/string_32.h:325:52: note: in definition of macro 'memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^ drivers/media/v4l2-core/v4l2-ioctl.c:1120:4: error: 'struct v4l2_fmtdesc' has no member named 'fmt' p-fmt.win.clips = clips; ^ drivers/media/v4l2-core/v4l2-ioctl.c:1121:4: error: 'struct v4l2_fmtdesc' has no member named 'fmt' p-fmt.win.clipcount = clipcount; ^ drivers/media/v4l2-core/v4l2-ioctl.c:1122:4: error: 'struct v4l2_fmtdesc' has no member named 'fmt' p-fmt.win.bitmap = bitmap; ^ In file included from ./arch/x86/include/asm/string.h:2:0, from include/linux/string.h:17, from ./arch/x86/include/asm/page_32.h:34, from ./arch/x86/include/asm/page.h:13, from ./arch/x86/include/asm/thread_info.h:11, from include/linux/thread_info.h:54, from ./arch/x86/include/asm/preempt.h:6, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/media/v4l2-core/v4l2-ioctl.c:15: drivers/media/v4l2-core/v4l2-ioctl.c:1126:12: error: 'struct v4l2_fmtdesc' has no member named 'fmt' memset(p-fmt, 0, sizeof(p-fmt)); ^ ./arch/x86/include/asm/string_32.h:325:46: note: in definition of macro 'memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^ drivers/media/v4l2-core/v4l2-ioctl.c:1126:30: error: 'struct v4l2_fmtdesc' has no member named 'fmt' memset(p-fmt, 0, sizeof(p-fmt)); ^ ./arch/x86/include/asm/string_32.h:325:52: note: in definition of macro 'memset' #define memset(s, c, count) __builtin_memset(s,
[PATCH REBASED] v4l2-ioctl: clips, clipcount and bitmap should not be zeroed.
Otherwise you cannot get the current clip and bitmap information from an overlay. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/v4l2-core/v4l2-ioctl.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 46f45f0..e620387 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1145,6 +1145,30 @@ static int v4l_g_fmt(const struct v4l2_ioctl_ops *ops, p-fmt.pix.priv = V4L2_PIX_FMT_PRIV_MAGIC; + /* +* fmt can't be cleared for these overlay types due to the 'clips' +* 'clipcount' and 'bitmap' pointers in struct v4l2_window. +* Those are provided by the user. So handle these two overlay types +* first, and then just do a simple memset for the other types. +*/ + switch (p-type) { + case V4L2_BUF_TYPE_VIDEO_OVERLAY: + case V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY: { + struct v4l2_clip *clips = p-fmt.win.clips; + u32 clipcount = p-fmt.win.clipcount; + void *bitmap = p-fmt.win.bitmap; + + memset(p-fmt, 0, sizeof(p-fmt)); + p-fmt.win.clips = clips; + p-fmt.win.clipcount = clipcount; + p-fmt.win.bitmap = bitmap; + break; + } + default: + memset(p-fmt, 0, sizeof(p-fmt)); + break; + } + switch (p-type) { case V4L2_BUF_TYPE_VIDEO_CAPTURE: if (unlikely(!is_rx || !is_vid || !ops-vidioc_g_fmt_vid_cap)) @@ -2140,7 +2164,7 @@ struct v4l2_ioctl_info { static struct v4l2_ioctl_info v4l2_ioctls[] = { IOCTL_INFO_FNC(VIDIOC_QUERYCAP, v4l_querycap, v4l_print_querycap, 0), IOCTL_INFO_FNC(VIDIOC_ENUM_FMT, v4l_enum_fmt, v4l_print_fmtdesc, INFO_FL_CLEAR(v4l2_fmtdesc, type)), - IOCTL_INFO_FNC(VIDIOC_G_FMT, v4l_g_fmt, v4l_print_format, INFO_FL_CLEAR(v4l2_format, type)), + IOCTL_INFO_FNC(VIDIOC_G_FMT, v4l_g_fmt, v4l_print_format, 0), IOCTL_INFO_FNC(VIDIOC_S_FMT, v4l_s_fmt, v4l_print_format, INFO_FL_PRIO), IOCTL_INFO_FNC(VIDIOC_REQBUFS, v4l_reqbufs, v4l_print_requestbuffers, INFO_FL_PRIO | INFO_FL_QUEUE), IOCTL_INFO_FNC(VIDIOC_QUERYBUF, v4l_querybuf, v4l_print_buffer, INFO_FL_QUEUE | INFO_FL_CLEAR(v4l2_buffer, length)), -- 2.0.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] si2168: improve scanning performance by setting property 0301 with a value from Windows driver.
On 07/17/2014 10:09 PM, Luis Alves wrote: This would be best done during init and not every time on set_frontend. I am perfectly fine it is done during set_frontend(), even it is static value. There were earlier tons of these 0x14 commands, including that one. I removed all that were same as default (command reports back existing value when new is set). It happens that Olli's Si2168-A30 chip has different default value than Si2168-B40 I have. init() is perfect place for enabling chip, power-up blocks, start clocks, downloading firmware and loading inittab. That command seems to belong tuning process itself. I will apply that. regards Antti Regards, Luis On Thu, Jul 17, 2014 at 7:43 PM, Olli Salonen olli.salo...@iki.fi wrote: Signed-off-by: Olli Salonen olli.salo...@iki.fi --- drivers/media/dvb-frontends/si2168.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 0422925..56811e1 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -313,6 +313,13 @@ static int si2168_set_frontend(struct dvb_frontend *fe) if (ret) goto err; + memcpy(cmd.args, \x14\x00\x01\x03\x0c\x00, 6); + cmd.wlen = 6; + cmd.rlen = 4; + ret = si2168_cmd_execute(s, cmd); + if (ret) + goto err; + memcpy(cmd.args, \x85, 1); cmd.wlen = 1; cmd.rlen = 1; -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@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 majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [GIT PULL FOR v3.17] A bunch of
On 07/17/2014 11:43 PM, Mauro Carvalho Chehab wrote: Em Thu, 17 Jul 2014 10:09:40 +0200 Hans Verkuil hverk...@xs4all.nl escreveu: These are all little fixes for issues I found while working on the vivi replacement + some docbook fixes. Usually all for fairly obscure corner cases, but that's what you write a test driver for, after all. Regards, Hans The following changes since commit 3c0d394ea7022bb9666d9df97a5776c4bcc3045c: [media] dib8000: improve the message that reports per-layer locks (2014-07-07 09:59:01 -0300) are available in the git repository at: git://linuxtv.org/hverkuil/media_tree.git core-fixes for you to fetch changes up to 2eb86fa0840ac281cc5ca0a63f1339fa00245c7d: v4l2-ioctl.c: check vfl_type in ENUM_FMT. (2014-07-14 14:55:47 +0200) Hans Verkuil (12): DocBook media: fix wrong spacing DocBook media: add missing dqevent src_change field. DocBook media: fix incorrect header reference v4l2-ioctl: call g_selection before calling cropcap v4l2-ioctl: clips, clipcount and bitmap should not be zeroed. This one causes compilation breakages: It clearly got misapplied. I've posted the rebased patch to the mailinglist. Regards, Hans drivers/media/v4l2-core/v4l2-ioctl.c: In function 'v4l_enum_fmt': drivers/media/v4l2-core/v4l2-ioctl.c:1115:30: error: 'struct v4l2_fmtdesc' has no member named 'fmt' struct v4l2_clip *clips = p-fmt.win.clips; ^ drivers/media/v4l2-core/v4l2-ioctl.c:1116:20: error: 'struct v4l2_fmtdesc' has no member named 'fmt' u32 clipcount = p-fmt.win.clipcount; ^ drivers/media/v4l2-core/v4l2-ioctl.c:1117:19: error: 'struct v4l2_fmtdesc' has no member named 'fmt' void *bitmap = p-fmt.win.bitmap; ^ In file included from ./arch/x86/include/asm/string.h:2:0, from include/linux/string.h:17, from ./arch/x86/include/asm/page_32.h:34, from ./arch/x86/include/asm/page.h:13, from ./arch/x86/include/asm/thread_info.h:11, from include/linux/thread_info.h:54, from ./arch/x86/include/asm/preempt.h:6, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/media/v4l2-core/v4l2-ioctl.c:15: drivers/media/v4l2-core/v4l2-ioctl.c:1119:12: error: 'struct v4l2_fmtdesc' has no member named 'fmt' memset(p-fmt, 0, sizeof(p-fmt)); ^ ./arch/x86/include/asm/string_32.h:325:46: note: in definition of macro 'memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^ drivers/media/v4l2-core/v4l2-ioctl.c:1119:30: error: 'struct v4l2_fmtdesc' has no member named 'fmt' memset(p-fmt, 0, sizeof(p-fmt)); ^ ./arch/x86/include/asm/string_32.h:325:52: note: in definition of macro 'memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^ drivers/media/v4l2-core/v4l2-ioctl.c:1120:4: error: 'struct v4l2_fmtdesc' has no member named 'fmt' p-fmt.win.clips = clips; ^ drivers/media/v4l2-core/v4l2-ioctl.c:1121:4: error: 'struct v4l2_fmtdesc' has no member named 'fmt' p-fmt.win.clipcount = clipcount; ^ drivers/media/v4l2-core/v4l2-ioctl.c:1122:4: error: 'struct v4l2_fmtdesc' has no member named 'fmt' p-fmt.win.bitmap = bitmap; ^ In file included from ./arch/x86/include/asm/string.h:2:0, from include/linux/string.h:17, from ./arch/x86/include/asm/page_32.h:34, from ./arch/x86/include/asm/page.h:13, from ./arch/x86/include/asm/thread_info.h:11, from include/linux/thread_info.h:54, from ./arch/x86/include/asm/preempt.h:6, from include/linux/preempt.h:18, from include/linux/spinlock.h:50, from include/linux/seqlock.h:35, from include/linux/time.h:5, from include/linux/stat.h:18, from include/linux/module.h:10, from drivers/media/v4l2-core/v4l2-ioctl.c:15: drivers/media/v4l2-core/v4l2-ioctl.c:1126:12: error: 'struct v4l2_fmtdesc' has no member named 'fmt' memset(p-fmt, 0, sizeof(p-fmt)); ^ ./arch/x86/include/asm/string_32.h:325:46: note: in definition of macro 'memset' #define memset(s, c, count) __builtin_memset(s, c, count) ^ drivers/media/v4l2-core/v4l2-ioctl.c:1126:30: error: 'struct
Re: [PATCH v2 01/23] v4l: Add ARGB and XRGB pixel formats
Hi Laurent, While implementing support for this in v4l-utils I discovered you missed one: On 06/24/2014 01:54 AM, Laurent Pinchart wrote: From: Laurent Pinchart laurent.pinch...@ideasonboard.com The existing RGB pixel formats are ill-defined in respect to their alpha bits and their meaning is driver dependent. Create new standard ARGB and XRGB variants with clearly defined meanings and make the existing variants deprecated. The new pixel formats 4CC values have been selected to match the DRM 4CCs for the same in-memory formats. Signed-off-by: Laurent Pinchart laurent.pinchart+rene...@ideasonboard.com --- .../DocBook/media/v4l/pixfmt-packed-rgb.xml| 415 - include/uapi/linux/videodev2.h | 8 + 2 files changed, 403 insertions(+), 20 deletions(-) diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h index 168ff50..0125f4d 100644 --- a/include/uapi/linux/videodev2.h +++ b/include/uapi/linux/videodev2.h @@ -294,7 +294,11 @@ struct v4l2_pix_format { /* RGB formats */ #define V4L2_PIX_FMT_RGB332 v4l2_fourcc('R', 'G', 'B', '1') /* 8 RGB-3-3-2 */ #define V4L2_PIX_FMT_RGB444 v4l2_fourcc('R', '4', '4', '4') /* 16 */ +#define V4L2_PIX_FMT_ARGB444 v4l2_fourcc('A', 'R', '1', '2') /* 16 */ +#define V4L2_PIX_FMT_XRGB444 v4l2_fourcc('X', 'R', '1', '2') /* 16 */ #define V4L2_PIX_FMT_RGB555 v4l2_fourcc('R', 'G', 'B', 'O') /* 16 RGB-5-5-5 */ +#define V4L2_PIX_FMT_ARGB555 v4l2_fourcc('A', 'R', '1', '5') /* 16 ARGB-1-5-5-5 */ +#define V4L2_PIX_FMT_XRGB555 v4l2_fourcc('X', 'R', '1', '5') /* 16 XRGB-1-5-5-5 */ #define V4L2_PIX_FMT_RGB565 v4l2_fourcc('R', 'G', 'B', 'P') /* 16 RGB-5-6-5 */ #define V4L2_PIX_FMT_RGB555X v4l2_fourcc('R', 'G', 'B', 'Q') /* 16 RGB-5-5-5 BE */ A+X variants should also be added for this RGB555X pix format. Regards, Hans #define V4L2_PIX_FMT_RGB565X v4l2_fourcc('R', 'G', 'B', 'R') /* 16 RGB-5-6-5 BE */ @@ -302,7 +306,11 @@ struct v4l2_pix_format { #define V4L2_PIX_FMT_BGR24 v4l2_fourcc('B', 'G', 'R', '3') /* 24 BGR-8-8-8 */ #define V4L2_PIX_FMT_RGB24 v4l2_fourcc('R', 'G', 'B', '3') /* 24 RGB-8-8-8 */ #define V4L2_PIX_FMT_BGR32 v4l2_fourcc('B', 'G', 'R', '4') /* 32 BGR-8-8-8-8 */ +#define V4L2_PIX_FMT_ABGR32 v4l2_fourcc('A', 'R', '2', '4') /* 32 BGRA-8-8-8-8 */ +#define V4L2_PIX_FMT_XBGR32 v4l2_fourcc('X', 'R', '2', '4') /* 32 BGRX-8-8-8-8 */ #define V4L2_PIX_FMT_RGB32 v4l2_fourcc('R', 'G', 'B', '4') /* 32 RGB-8-8-8-8 */ +#define V4L2_PIX_FMT_ARGB32 v4l2_fourcc('B', 'A', '2', '4') /* 32 ARGB-8-8-8-8 */ +#define V4L2_PIX_FMT_XRGB32 v4l2_fourcc('B', 'X', '2', '4') /* 32 XRGB-8-8-8-8 */ /* Grey formats */ #define V4L2_PIX_FMT_GREYv4l2_fourcc('G', 'R', 'E', 'Y') /* 8 Greyscale */ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH for v3.17] DocBook media: fix incorrect note about packed RGB and colorspace
The fact that the pixelformat is using a packed RGB format has nothing to do with the colorspace that is being used. Those are very different things. The colorspace decides what color a triplet of RGB numbers actually map to. E.g. a red color with values (255, 0, 0) is a different type of red depending on the colorspace. If the original pixelformat was e.g. YUV in colorspace REC709, then after the conversion to RGB the colorspace is still REC709. Unless the hardware actually converted the colorspace as well from REC709 to sRGB, but that rarely if ever happens. Remove this incorrect comment. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml | 3 --- 1 file changed, 3 deletions(-) diff --git a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml index 5f1602f..2aae8e9 100644 --- a/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml +++ b/Documentation/DocBook/media/v4l/pixfmt-packed-rgb.xml @@ -15,9 +15,6 @@ typical PC graphics frame buffers. They occupy 8, 16, 24 or 32 bits per pixel. These are all packed-pixel formats, meaning all the data for a pixel lie next to each other in memory./para -paraWhen one of these formats is used, drivers shall report the -colorspace constantV4L2_COLORSPACE_SRGB/constant./para - table pgwide=1 frame=none id=rgb-formats titlePacked RGB Image Formats/title tgroup cols=37 align=center -- 2.0.0 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1] si2168: Support Si2168-A20 firmware downloading.
This adds support for the Si2168-A20 firmware download. Extracting the firmware: wget http://www.tbsdtv.com/download/document/tbs6281/tbs6281-t2-t-driver_v1.0.0.6.zip unzip tbs6281-t2-t-driver_v1.0.0.6.zip dd if=tbs-6281_x64/tbs6281_64.sys of=dvb-demod-si2168-a20-01.fw count=28656 bs=1 skip=1625088 md5sum: 32e06713b33915f674bfb2c209beaea5 /lib/firmware/dvb-demod-si2168-a20-01.fw Regards, Luis Signed-off-by: Luis Alves lja...@gmail.com --- drivers/media/dvb-frontends/si2168.c | 4 drivers/media/dvb-frontends/si2168_priv.h | 1 + 2 files changed, 5 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 7e45eeab..ad38c17 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -377,10 +377,14 @@ static int si2168_init(struct dvb_frontend *fe) chip_id = cmd.args[1] 24 | cmd.args[2] 16 | cmd.args[3] 8 | cmd.args[4] 0; + #define SI2168_A20 ('A' 24 | 68 16 | '2' 8 | '0' 0) #define SI2168_A30 ('A' 24 | 68 16 | '3' 8 | '0' 0) #define SI2168_B40 ('B' 24 | 68 16 | '4' 8 | '0' 0) switch (chip_id) { + case SI2168_A20: + fw_file = SI2168_A20_FIRMWARE; + break; case SI2168_A30: fw_file = SI2168_A30_FIRMWARE; break; diff --git a/drivers/media/dvb-frontends/si2168_priv.h b/drivers/media/dvb-frontends/si2168_priv.h index bebb68a..ebbf502 100644 --- a/drivers/media/dvb-frontends/si2168_priv.h +++ b/drivers/media/dvb-frontends/si2168_priv.h @@ -22,6 +22,7 @@ #include linux/firmware.h #include linux/i2c-mux.h +#define SI2168_A20_FIRMWARE dvb-demod-si2168-a20-01.fw #define SI2168_A30_FIRMWARE dvb-demod-si2168-a30-01.fw #define SI2168_B40_FIRMWARE dvb-demod-si2168-b40-01.fw #define SI2168_B40_FIRMWARE_FALLBACK dvb-demod-si2168-02.fw -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] libv4lconvert: add support for new pixelformats
Support for alpha-channel aware pixelformats was added. Recognize those formats in libv4lconvert. Signed-off-by: Hans Verkuil hans.verk...@cisco.com diff --git a/lib/libv4lconvert/libv4lconvert.c b/lib/libv4lconvert/libv4lconvert.c index 7ee7c19..cea65aa 100644 --- a/lib/libv4lconvert/libv4lconvert.c +++ b/lib/libv4lconvert/libv4lconvert.c @@ -86,6 +86,10 @@ static const struct v4lconvert_pixfmt supported_src_pixfmts[] = { { V4L2_PIX_FMT_RGB565, 16, 4, 6, 0 }, { V4L2_PIX_FMT_BGR32, 32, 4, 6, 0 }, { V4L2_PIX_FMT_RGB32, 32, 4, 6, 0 }, + { V4L2_PIX_FMT_XBGR32, 32, 4, 6, 0 }, + { V4L2_PIX_FMT_XRGB32, 32, 4, 6, 0 }, + { V4L2_PIX_FMT_ABGR32, 32, 4, 6, 0 }, + { V4L2_PIX_FMT_ARGB32, 32, 4, 6, 0 }, /* yuv 4:2:2 formats */ { V4L2_PIX_FMT_YUYV,16, 5, 4, 0 }, { V4L2_PIX_FMT_YVYU,16, 5, 4, 0 }, @@ -1121,6 +1125,8 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data, break; case V4L2_PIX_FMT_RGB32: + case V4L2_PIX_FMT_XRGB32: + case V4L2_PIX_FMT_ARGB32: if (src_size (width * height * 4)) { V4LCONVERT_ERR(short rgb32 data frame\n); errno = EPIPE; @@ -1143,6 +1149,8 @@ static int v4lconvert_convert_pixfmt(struct v4lconvert_data *data, break; case V4L2_PIX_FMT_BGR32: + case V4L2_PIX_FMT_XBGR32: + case V4L2_PIX_FMT_ABGR32: if (src_size (width * height * 4)) { V4LCONVERT_ERR(short bgr32 data frame\n); errno = EPIPE; -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[linuxtv-media:master 452/499] drivers/staging/media/solo6x10/solo6x10-disp.c:225 solo_set_motion_block() error: potential null dereference 'buf'. (kzalloc returns null)
tree: git://linuxtv.org/media_tree.git master head: 9409945c7ff7ba39727df8ede2551bd22e76b58b commit: 761f9aa23f2ac187aa1bed58215f09f3c8456295 [452/499] [media] solo6x10: fix 'dma from stack' warning drivers/staging/media/solo6x10/solo6x10-disp.c:225 solo_set_motion_block() error: potential null dereference 'buf'. (kzalloc returns null) vim +/buf +225 drivers/staging/media/solo6x10/solo6x10-disp.c dcae5dacb drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-25 209 (ch * SOLO_MOT_THRESH_SIZE * 2), dcae5dacb drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-25 210 val, SOLO_MOT_THRESH_SIZE); dcae5dacb drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-25 211 } dcae5dacb drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-25 212 f5df0b7ff drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-18 213 int solo_set_motion_block(struct solo_dev *solo_dev, u8 ch, 4063a3c78 drivers/staging/media/solo6x10/solo6x10-disp.c Hans Verkuil 2014-06-10 214 const u16 *thresholds) dcae5dacb drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-25 215 { 761f9aa23 drivers/staging/media/solo6x10/solo6x10-disp.c Hans Verkuil 2014-02-07 216 const unsigned size = sizeof(u16) * 64; f5df0b7ff drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-18 217 u32 off = SOLO_MOT_FLAG_AREA + ch * SOLO_MOT_THRESH_SIZE * 2; 761f9aa23 drivers/staging/media/solo6x10/solo6x10-disp.c Hans Verkuil 2014-02-07 218 u16 *buf; f5df0b7ff drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-18 219 int x, y; f5df0b7ff drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-18 220 int ret = 0; dcae5dacb drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-25 221 761f9aa23 drivers/staging/media/solo6x10/solo6x10-disp.c Hans Verkuil 2014-02-07 222 buf = kzalloc(size, GFP_KERNEL); f5df0b7ff drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-18 223 for (y = 0; y SOLO_MOTION_SZ; y++) { f5df0b7ff drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-18 224 for (x = 0; x SOLO_MOTION_SZ; x++) 4063a3c78 drivers/staging/media/solo6x10/solo6x10-disp.c Hans Verkuil 2014-06-10 @225 buf[x] = cpu_to_le16(thresholds[y * SOLO_MOTION_SZ + x]); f5df0b7ff drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-18 226 ret |= solo_p2m_dma(solo_dev, 1, buf, 761f9aa23 drivers/staging/media/solo6x10/solo6x10-disp.c Hans Verkuil 2014-02-07 227 SOLO_MOTION_EXT_ADDR(solo_dev) + off + y * size, 761f9aa23 drivers/staging/media/solo6x10/solo6x10-disp.c Hans Verkuil 2014-02-07 228 size, 0, 0); f5df0b7ff drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-18 229 } 761f9aa23 drivers/staging/media/solo6x10/solo6x10-disp.c Hans Verkuil 2014-02-07 230 kfree(buf); f5df0b7ff drivers/staging/media/solo6x10/disp.c Hans Verkuil 2013-03-18 231 return ret; faa4fd2a0 drivers/staging/solo6x10/solo6010-disp.c Ben Collins 2010-06-17 232 } faa4fd2a0 drivers/staging/solo6x10/solo6010-disp.c Ben Collins 2010-06-17 233 :: The code at line 225 was first introduced by commit :: 4063a3c781071e46aaf08e79c99ea822cbc0f089 [media] solo6x10: implement the new motion detection controls :: TO: Hans Verkuil hans.verk...@cisco.com :: CC: Mauro Carvalho Chehab m.che...@samsung.com --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/1 v2] si2168: Support Si2168-A20 firmware downloading.
(ignore the previous one, it was incomplete) This adds support for the Si2168-A20 firmware download. Extracting the firmware: wget http://www.tbsdtv.com/download/document/tbs6281/tbs6281-t2-t-driver_v1.0.0.6.zip unzip tbs6281-t2-t-driver_v1.0.0.6.zip dd if=tbs-6281_x64/tbs6281_64.sys of=dvb-demod-si2168-a20-01.fw count=28656 bs=1 skip=1625088 md5sum: 32e06713b33915f674bfb2c209beaea5 /lib/firmware/dvb-demod-si2168-a20-01.fw Regards, Luis Signed-off-by: Luis Alves lja...@gmail.com --- drivers/media/dvb-frontends/si2168.c | 5 + drivers/media/dvb-frontends/si2168_priv.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 7e45eeab..50c4a91 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -377,10 +377,14 @@ static int si2168_init(struct dvb_frontend *fe) chip_id = cmd.args[1] 24 | cmd.args[2] 16 | cmd.args[3] 8 | cmd.args[4] 0; + #define SI2168_A20 ('A' 24 | 68 16 | '2' 8 | '0' 0) #define SI2168_A30 ('A' 24 | 68 16 | '3' 8 | '0' 0) #define SI2168_B40 ('B' 24 | 68 16 | '4' 8 | '0' 0) switch (chip_id) { + case SI2168_A20: + fw_file = SI2168_A20_FIRMWARE; + break; case SI2168_A30: fw_file = SI2168_A30_FIRMWARE; break; @@ -672,5 +676,6 @@ module_i2c_driver(si2168_driver); MODULE_AUTHOR(Antti Palosaari cr...@iki.fi); MODULE_DESCRIPTION(Silicon Labs Si2168 DVB-T/T2/C demodulator driver); MODULE_LICENSE(GPL); +MODULE_FIRMWARE(SI2168_A20_FIRMWARE); MODULE_FIRMWARE(SI2168_A30_FIRMWARE); MODULE_FIRMWARE(SI2168_B40_FIRMWARE); diff --git a/drivers/media/dvb-frontends/si2168_priv.h b/drivers/media/dvb-frontends/si2168_priv.h index bebb68a..ebbf502 100644 --- a/drivers/media/dvb-frontends/si2168_priv.h +++ b/drivers/media/dvb-frontends/si2168_priv.h @@ -22,6 +22,7 @@ #include linux/firmware.h #include linux/i2c-mux.h +#define SI2168_A20_FIRMWARE dvb-demod-si2168-a20-01.fw #define SI2168_A30_FIRMWARE dvb-demod-si2168-a30-01.fw #define SI2168_B40_FIRMWARE dvb-demod-si2168-b40-01.fw #define SI2168_B40_FIRMWARE_FALLBACK dvb-demod-si2168-02.fw -- 1.9.1 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] cx23885: fix UNSET/TUNER_ABSENT confusion.
Em Fri, 27 Jun 2014 16:15:41 +0200 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Sometimes dev-tuner_type is compared to UNSET, sometimes to TUNER_ABSENT, but these defines have different values. Standardize to TUNER_ABSENT. That patch looks wrong. UNSET has value -1, while TUNER_ABSENT has value 4. The only way that this patch won't be causing regressions is if none was used, with is not the case, IMHO. A patch removing either one would be a way more complex, and should likely touch on other cx23885 files: $ git grep -e UNSET --or -e TUNER_ABSENT -l drivers/media/pci/cx23885/ drivers/media/pci/cx23885/cx23885-417.c drivers/media/pci/cx23885/cx23885-cards.c drivers/media/pci/cx23885/cx23885-core.c drivers/media/pci/cx23885/cx23885-video.c drivers/media/pci/cx23885/cx23885.h and also on tveeprom. However, touching at tveeprom would require touching also on all other drivers that support Hauppauge devices. Regards, Mauro Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/pci/cx23885/cx23885-417.c | 8 drivers/media/pci/cx23885/cx23885-video.c | 10 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c index 95666ee..bf89fc8 100644 --- a/drivers/media/pci/cx23885/cx23885-417.c +++ b/drivers/media/pci/cx23885/cx23885-417.c @@ -1266,7 +1266,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, struct cx23885_fh *fh = file-private_data; struct cx23885_dev *dev = fh-dev; - if (UNSET == dev-tuner_type) + if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; if (0 != t-index) return -EINVAL; @@ -1284,7 +1284,7 @@ static int vidioc_s_tuner(struct file *file, void *priv, struct cx23885_fh *fh = file-private_data; struct cx23885_dev *dev = fh-dev; - if (UNSET == dev-tuner_type) + if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; /* Update the A/V core */ @@ -1299,7 +1299,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, struct cx23885_fh *fh = file-private_data; struct cx23885_dev *dev = fh-dev; - if (UNSET == dev-tuner_type) + if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; f-type = V4L2_TUNER_ANALOG_TV; f-frequency = dev-freq; @@ -1347,7 +1347,7 @@ static int vidioc_querycap(struct file *file, void *priv, V4L2_CAP_READWRITE | V4L2_CAP_STREAMING | 0; - if (UNSET != dev-tuner_type) + if (dev-tuner_type != TUNER_ABSENT) cap-capabilities |= V4L2_CAP_TUNER; return 0; diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index e0a5952..2a890e9 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c @@ -1156,7 +1156,7 @@ static int vidioc_querycap(struct file *file, void *priv, V4L2_CAP_READWRITE | V4L2_CAP_STREAMING | V4L2_CAP_VBI_CAPTURE; - if (UNSET != dev-tuner_type) + if (dev-tuner_type != TUNER_ABSENT) cap-capabilities |= V4L2_CAP_TUNER; return 0; } @@ -1474,7 +1474,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, { struct cx23885_dev *dev = ((struct cx23885_fh *)priv)-dev; - if (unlikely(UNSET == dev-tuner_type)) + if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; if (0 != t-index) return -EINVAL; @@ -1490,7 +1490,7 @@ static int vidioc_s_tuner(struct file *file, void *priv, { struct cx23885_dev *dev = ((struct cx23885_fh *)priv)-dev; - if (UNSET == dev-tuner_type) + if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; if (0 != t-index) return -EINVAL; @@ -1506,7 +1506,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, struct cx23885_fh *fh = priv; struct cx23885_dev *dev = fh-dev; - if (unlikely(UNSET == dev-tuner_type)) + if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; /* f-type = fh-radio ? V4L2_TUNER_RADIO : V4L2_TUNER_ANALOG_TV; */ @@ -1522,7 +1522,7 @@ static int cx23885_set_freq(struct cx23885_dev *dev, const struct v4l2_frequency { struct v4l2_control ctrl; - if (unlikely(UNSET == dev-tuner_type)) + if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; if (unlikely(f-tuner != 0)) return -EINVAL; -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/2] cx23885: fix UNSET/TUNER_ABSENT confusion.
On 07/18/2014 12:45 AM, Mauro Carvalho Chehab wrote: Em Fri, 27 Jun 2014 16:15:41 +0200 Hans Verkuil hverk...@xs4all.nl escreveu: From: Hans Verkuil hans.verk...@cisco.com Sometimes dev-tuner_type is compared to UNSET, sometimes to TUNER_ABSENT, but these defines have different values. Standardize to TUNER_ABSENT. That patch looks wrong. UNSET has value -1, while TUNER_ABSENT has value 4. Well, yes. That's the whole problem. Both values were used to indicate an absent tuner, and the 'if's to test whether a tuner was there also checked against different values. I standardized here to TUNER_ABSENT, which is what tveeprom uses as well (not that this driver looks uses that information from tveeprom). Without this change you cannot correctly model a board without a tuner like the one that I'm adding since the logic is all over the place in this driver. tuner_type should either be a proper tuner or TUNER_ABSENT, but never UNSET. That's what this patch changes. Regards, Hans The only way that this patch won't be causing regressions is if none was used, with is not the case, IMHO. A patch removing either one would be a way more complex, and should likely touch on other cx23885 files: $ git grep -e UNSET --or -e TUNER_ABSENT -l drivers/media/pci/cx23885/ drivers/media/pci/cx23885/cx23885-417.c drivers/media/pci/cx23885/cx23885-cards.c drivers/media/pci/cx23885/cx23885-core.c drivers/media/pci/cx23885/cx23885-video.c drivers/media/pci/cx23885/cx23885.h and also on tveeprom. However, touching at tveeprom would require touching also on all other drivers that support Hauppauge devices. Regards, Mauro Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/pci/cx23885/cx23885-417.c | 8 drivers/media/pci/cx23885/cx23885-video.c | 10 +- 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/drivers/media/pci/cx23885/cx23885-417.c b/drivers/media/pci/cx23885/cx23885-417.c index 95666ee..bf89fc8 100644 --- a/drivers/media/pci/cx23885/cx23885-417.c +++ b/drivers/media/pci/cx23885/cx23885-417.c @@ -1266,7 +1266,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, struct cx23885_fh *fh = file-private_data; struct cx23885_dev *dev = fh-dev; -if (UNSET == dev-tuner_type) +if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; if (0 != t-index) return -EINVAL; @@ -1284,7 +1284,7 @@ static int vidioc_s_tuner(struct file *file, void *priv, struct cx23885_fh *fh = file-private_data; struct cx23885_dev *dev = fh-dev; -if (UNSET == dev-tuner_type) +if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; /* Update the A/V core */ @@ -1299,7 +1299,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, struct cx23885_fh *fh = file-private_data; struct cx23885_dev *dev = fh-dev; -if (UNSET == dev-tuner_type) +if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; f-type = V4L2_TUNER_ANALOG_TV; f-frequency = dev-freq; @@ -1347,7 +1347,7 @@ static int vidioc_querycap(struct file *file, void *priv, V4L2_CAP_READWRITE | V4L2_CAP_STREAMING | 0; -if (UNSET != dev-tuner_type) +if (dev-tuner_type != TUNER_ABSENT) cap-capabilities |= V4L2_CAP_TUNER; return 0; diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index e0a5952..2a890e9 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c @@ -1156,7 +1156,7 @@ static int vidioc_querycap(struct file *file, void *priv, V4L2_CAP_READWRITE | V4L2_CAP_STREAMING | V4L2_CAP_VBI_CAPTURE; -if (UNSET != dev-tuner_type) +if (dev-tuner_type != TUNER_ABSENT) cap-capabilities |= V4L2_CAP_TUNER; return 0; } @@ -1474,7 +1474,7 @@ static int vidioc_g_tuner(struct file *file, void *priv, { struct cx23885_dev *dev = ((struct cx23885_fh *)priv)-dev; -if (unlikely(UNSET == dev-tuner_type)) +if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; if (0 != t-index) return -EINVAL; @@ -1490,7 +1490,7 @@ static int vidioc_s_tuner(struct file *file, void *priv, { struct cx23885_dev *dev = ((struct cx23885_fh *)priv)-dev; -if (UNSET == dev-tuner_type) +if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; if (0 != t-index) return -EINVAL; @@ -1506,7 +1506,7 @@ static int vidioc_g_frequency(struct file *file, void *priv, struct cx23885_fh *fh = priv; struct cx23885_dev *dev = fh-dev; -if (unlikely(UNSET == dev-tuner_type)) +if (dev-tuner_type == TUNER_ABSENT) return -EINVAL; /* f-type = fh-radio ?
Re: [PATCH 1/1 v2] si2168: Support Si2168-A20 firmware downloading.
Thank for the patch! I will apply that sure too. Driver supports now all Si2168 versions? regards Antti On 07/18/2014 01:43 AM, Luis Alves wrote: (ignore the previous one, it was incomplete) This adds support for the Si2168-A20 firmware download. Extracting the firmware: wget http://www.tbsdtv.com/download/document/tbs6281/tbs6281-t2-t-driver_v1.0.0.6.zip unzip tbs6281-t2-t-driver_v1.0.0.6.zip dd if=tbs-6281_x64/tbs6281_64.sys of=dvb-demod-si2168-a20-01.fw count=28656 bs=1 skip=1625088 md5sum: 32e06713b33915f674bfb2c209beaea5 /lib/firmware/dvb-demod-si2168-a20-01.fw Regards, Luis Signed-off-by: Luis Alves lja...@gmail.com --- drivers/media/dvb-frontends/si2168.c | 5 + drivers/media/dvb-frontends/si2168_priv.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 7e45eeab..50c4a91 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -377,10 +377,14 @@ static int si2168_init(struct dvb_frontend *fe) chip_id = cmd.args[1] 24 | cmd.args[2] 16 | cmd.args[3] 8 | cmd.args[4] 0; + #define SI2168_A20 ('A' 24 | 68 16 | '2' 8 | '0' 0) #define SI2168_A30 ('A' 24 | 68 16 | '3' 8 | '0' 0) #define SI2168_B40 ('B' 24 | 68 16 | '4' 8 | '0' 0) switch (chip_id) { + case SI2168_A20: + fw_file = SI2168_A20_FIRMWARE; + break; case SI2168_A30: fw_file = SI2168_A30_FIRMWARE; break; @@ -672,5 +676,6 @@ module_i2c_driver(si2168_driver); MODULE_AUTHOR(Antti Palosaari cr...@iki.fi); MODULE_DESCRIPTION(Silicon Labs Si2168 DVB-T/T2/C demodulator driver); MODULE_LICENSE(GPL); +MODULE_FIRMWARE(SI2168_A20_FIRMWARE); MODULE_FIRMWARE(SI2168_A30_FIRMWARE); MODULE_FIRMWARE(SI2168_B40_FIRMWARE); diff --git a/drivers/media/dvb-frontends/si2168_priv.h b/drivers/media/dvb-frontends/si2168_priv.h index bebb68a..ebbf502 100644 --- a/drivers/media/dvb-frontends/si2168_priv.h +++ b/drivers/media/dvb-frontends/si2168_priv.h @@ -22,6 +22,7 @@ #include linux/firmware.h #include linux/i2c-mux.h +#define SI2168_A20_FIRMWARE dvb-demod-si2168-a20-01.fw #define SI2168_A30_FIRMWARE dvb-demod-si2168-a30-01.fw #define SI2168_B40_FIRMWARE dvb-demod-si2168-b40-01.fw #define SI2168_B40_FIRMWARE_FALLBACK dvb-demod-si2168-02.fw -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH 1/1 v2] si2168: Support Si2168-A20 firmware downloading.
I think so... at least the known ones. On Thu, Jul 17, 2014 at 11:56 PM, Antti Palosaari cr...@iki.fi wrote: Thank for the patch! I will apply that sure too. Driver supports now all Si2168 versions? regards Antti On 07/18/2014 01:43 AM, Luis Alves wrote: (ignore the previous one, it was incomplete) This adds support for the Si2168-A20 firmware download. Extracting the firmware: wget http://www.tbsdtv.com/download/document/tbs6281/tbs6281-t2-t-driver_v1.0.0.6.zip unzip tbs6281-t2-t-driver_v1.0.0.6.zip dd if=tbs-6281_x64/tbs6281_64.sys of=dvb-demod-si2168-a20-01.fw count=28656 bs=1 skip=1625088 md5sum: 32e06713b33915f674bfb2c209beaea5 /lib/firmware/dvb-demod-si2168-a20-01.fw Regards, Luis Signed-off-by: Luis Alves lja...@gmail.com --- drivers/media/dvb-frontends/si2168.c | 5 + drivers/media/dvb-frontends/si2168_priv.h | 1 + 2 files changed, 6 insertions(+) diff --git a/drivers/media/dvb-frontends/si2168.c b/drivers/media/dvb-frontends/si2168.c index 7e45eeab..50c4a91 100644 --- a/drivers/media/dvb-frontends/si2168.c +++ b/drivers/media/dvb-frontends/si2168.c @@ -377,10 +377,14 @@ static int si2168_init(struct dvb_frontend *fe) chip_id = cmd.args[1] 24 | cmd.args[2] 16 | cmd.args[3] 8 | cmd.args[4] 0; + #define SI2168_A20 ('A' 24 | 68 16 | '2' 8 | '0' 0) #define SI2168_A30 ('A' 24 | 68 16 | '3' 8 | '0' 0) #define SI2168_B40 ('B' 24 | 68 16 | '4' 8 | '0' 0) switch (chip_id) { + case SI2168_A20: + fw_file = SI2168_A20_FIRMWARE; + break; case SI2168_A30: fw_file = SI2168_A30_FIRMWARE; break; @@ -672,5 +676,6 @@ module_i2c_driver(si2168_driver); MODULE_AUTHOR(Antti Palosaari cr...@iki.fi); MODULE_DESCRIPTION(Silicon Labs Si2168 DVB-T/T2/C demodulator driver); MODULE_LICENSE(GPL); +MODULE_FIRMWARE(SI2168_A20_FIRMWARE); MODULE_FIRMWARE(SI2168_A30_FIRMWARE); MODULE_FIRMWARE(SI2168_B40_FIRMWARE); diff --git a/drivers/media/dvb-frontends/si2168_priv.h b/drivers/media/dvb-frontends/si2168_priv.h index bebb68a..ebbf502 100644 --- a/drivers/media/dvb-frontends/si2168_priv.h +++ b/drivers/media/dvb-frontends/si2168_priv.h @@ -22,6 +22,7 @@ #include linux/firmware.h #include linux/i2c-mux.h +#define SI2168_A20_FIRMWARE dvb-demod-si2168-a20-01.fw #define SI2168_A30_FIRMWARE dvb-demod-si2168-a30-01.fw #define SI2168_B40_FIRMWARE dvb-demod-si2168-b40-01.fw #define SI2168_B40_FIRMWARE_FALLBACK dvb-demod-si2168-02.fw -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [git:media_tree/master] [media] cx23885: add support for Hauppauge ImpactVCB-e
Please revert, without the preceding patch (cx23885: fix UNSET/TUNER_ABSENT confusion.) this board won't work. Or merge that patch as well, that's fine too... Regards, Hans On 07/18/2014 12:57 AM, Mauro Carvalho Chehab wrote: This is an automatic generated email to let you know that the following patch were queued at the http://git.linuxtv.org/media_tree.git tree: Subject: [media] cx23885: add support for Hauppauge ImpactVCB-e Author: Hans Verkuil hans.verk...@cisco.com Date:Fri Jun 27 11:15:42 2014 -0300 Add support for Hauppauge model 71100: WinTV-ImpactVCB-e (PCIe, Retail, half height) Signed-off-by: Hans Verkuil hans.verk...@cisco.com Signed-off-by: Mauro Carvalho Chehab m.che...@samsung.com drivers/media/pci/cx23885/cx23885-cards.c | 31 - drivers/media/pci/cx23885/cx23885-video.c |1 + drivers/media/pci/cx23885/cx23885.h |1 + 3 files changed, 32 insertions(+), 1 deletions(-) --- http://git.linuxtv.org/media_tree.git?a=commitdiff;h=cce11b093f8a7f5e689f250d5b219f69a45e5db3 diff --git a/drivers/media/pci/cx23885/cx23885-cards.c b/drivers/media/pci/cx23885/cx23885-cards.c index 79f20c8..9723067 100644 --- a/drivers/media/pci/cx23885/cx23885-cards.c +++ b/drivers/media/pci/cx23885/cx23885-cards.c @@ -649,7 +649,26 @@ struct cx23885_board cx23885_boards[] = { CX25840_NONE1_CH3, .amux = CX25840_AUDIO6, } }, - } + }, + [CX23885_BOARD_HAUPPAUGE_IMPACTVCBE] = { + .name = Hauppauge ImpactVCB-e, + .tuner_type = TUNER_ABSENT, + .porta = CX23885_ANALOG_VIDEO, + .input = {{ + .type = CX23885_VMUX_COMPOSITE1, + .vmux = CX25840_VIN7_CH3 | + CX25840_VIN4_CH2 | + CX25840_VIN6_CH1, + .amux = CX25840_AUDIO7, + }, { + .type = CX23885_VMUX_SVIDEO, + .vmux = CX25840_VIN7_CH3 | + CX25840_VIN4_CH2 | + CX25840_VIN8_CH1 | + CX25840_SVIDEO_ON, + .amux = CX25840_AUDIO7, + } }, + }, }; const unsigned int cx23885_bcount = ARRAY_SIZE(cx23885_boards); @@ -897,6 +916,10 @@ struct cx23885_subid cx23885_subids[] = { .subvendor = 0x1461, .subdevice = 0xd939, .card = CX23885_BOARD_AVERMEDIA_HC81R, + }, { + .subvendor = 0x0070, + .subdevice = 0x7133, + .card = CX23885_BOARD_HAUPPAUGE_IMPACTVCBE, }, }; const unsigned int cx23885_idcount = ARRAY_SIZE(cx23885_subids); @@ -977,6 +1000,9 @@ static void hauppauge_eeprom(struct cx23885_dev *dev, u8 *eeprom_data) case 71009: /* WinTV-HVR1200 (PCIe, Retail, full height) * DVB-T and basic analog */ + case 71100: + /* WinTV-ImpactVCB-e (PCIe, Retail, half height) + * Basic analog */ case 71359: /* WinTV-HVR1200 (PCIe, OEM, half height) * DVB-T and basic analog */ @@ -1701,6 +1727,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) case CX23885_BOARD_HAUPPAUGE_HVR1850: case CX23885_BOARD_HAUPPAUGE_HVR1290: case CX23885_BOARD_HAUPPAUGE_HVR4400: + case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE: if (dev-i2c_bus[0].i2c_rc == 0) hauppauge_eeprom(dev, eeprom+0xc0); break; @@ -1807,6 +1834,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) case CX23885_BOARD_HAUPPAUGE_HVR1200: case CX23885_BOARD_HAUPPAUGE_HVR1700: case CX23885_BOARD_HAUPPAUGE_HVR1400: + case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE: case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: case CX23885_BOARD_LEADTEK_WINFAST_PXPVR2200: case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H_XC4000: @@ -1835,6 +1863,7 @@ void cx23885_card_setup(struct cx23885_dev *dev) break; case CX23885_BOARD_HAUPPAUGE_HVR1250: case CX23885_BOARD_HAUPPAUGE_HVR1800: + case CX23885_BOARD_HAUPPAUGE_IMPACTVCBE: case CX23885_BOARD_HAUPPAUGE_HVR1800lp: case CX23885_BOARD_HAUPPAUGE_HVR1700: case CX23885_BOARD_LEADTEK_WINFAST_PXDVR3200_H: diff --git a/drivers/media/pci/cx23885/cx23885-video.c b/drivers/media/pci/cx23885/cx23885-video.c index e0a5952..71e3ec3 100644 --- a/drivers/media/pci/cx23885/cx23885-video.c +++ b/drivers/media/pci/cx23885/cx23885-video.c @@ -507,6 +507,7 @@ static int cx23885_video_mux(struct cx23885_dev *dev, unsigned int input) if ((dev-board == CX23885_BOARD_HAUPPAUGE_HVR1800) || (dev-board == CX23885_BOARD_MPX885) ||
[PATCH for v3.17 0/4] Move go7007 and solo6x10 out of staging
The compound control support was merged and that allowed the motion detection support to be merged as well. So there is nothing keeping these two drivers in staging. This patch series moves them to drivers/media. One note: the go7007 supports an saa7134+go7007 based board as well and a patch for saa7134 was available in the README file. However, after the recent vb2 conversion of saa7134 that no longer applies (no surprise there). I plan on fixing that, but that's just a single board so that doesn't stand in the way of getting the driver out of staging. Regards, Hans -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH for v3.17 4/4] solo6x10: move out of staging into drivers/media/pci.
From: Hans Verkuil hans.verk...@cisco.com Now that the custom motion detection API has been replaced with a standard API there is no reason anymore to keep it in staging. So (finally!) move it to drivers/media/pci. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/pci/Kconfig | 1 + drivers/media/pci/Makefile| 1 + drivers/{staging/media = media/pci}/solo6x10/Kconfig | 2 +- drivers/{staging/media = media/pci}/solo6x10/Makefile| 2 +- drivers/{staging/media = media/pci}/solo6x10/TODO| 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-core.c | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-disp.c | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-eeprom.c | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-enc.c | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-g723.c | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-gpio.c | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-i2c.c | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-jpeg.h | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-offsets.h | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-p2m.c | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-regs.h | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-tw28.c | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-tw28.h | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-v4l2-enc.c | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10-v4l2.c | 0 drivers/{staging/media = media/pci}/solo6x10/solo6x10.h | 0 drivers/staging/media/Kconfig | 2 -- drivers/staging/media/Makefile| 1 - 23 files changed, 4 insertions(+), 5 deletions(-) rename drivers/{staging/media = media/pci}/solo6x10/Kconfig (96%) rename drivers/{staging/media = media/pci}/solo6x10/Makefile (82%) rename drivers/{staging/media = media/pci}/solo6x10/TODO (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-core.c (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-disp.c (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-eeprom.c (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-enc.c (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-g723.c (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-gpio.c (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-i2c.c (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-jpeg.h (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-offsets.h (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-p2m.c (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-regs.h (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-tw28.c (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-tw28.h (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-v4l2-enc.c (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10-v4l2.c (100%) rename drivers/{staging/media = media/pci}/solo6x10/solo6x10.h (100%) diff --git a/drivers/media/pci/Kconfig b/drivers/media/pci/Kconfig index 53196f1..5c16c9c 100644 --- a/drivers/media/pci/Kconfig +++ b/drivers/media/pci/Kconfig @@ -19,6 +19,7 @@ if MEDIA_ANALOG_TV_SUPPORT source drivers/media/pci/ivtv/Kconfig source drivers/media/pci/zoran/Kconfig source drivers/media/pci/saa7146/Kconfig +source drivers/media/pci/solo6x10/Kconfig endif if MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT diff --git a/drivers/media/pci/Makefile b/drivers/media/pci/Makefile index 35cc578..e5b53fb 100644 --- a/drivers/media/pci/Makefile +++ b/drivers/media/pci/Makefile @@ -24,3 +24,4 @@ obj-$(CONFIG_VIDEO_SAA7134) += saa7134/ obj-$(CONFIG_VIDEO_SAA7164) += saa7164/ obj-$(CONFIG_VIDEO_MEYE) += meye/ obj-$(CONFIG_STA2X11_VIP) += sta2x11/ +obj-$(CONFIG_VIDEO_SOLO6X10) += solo6x10/ diff --git a/drivers/staging/media/solo6x10/Kconfig b/drivers/media/pci/solo6x10/Kconfig similarity index 96% rename from drivers/staging/media/solo6x10/Kconfig rename to drivers/media/pci/solo6x10/Kconfig index 1ce2819..d9e06a6 100644 --- a/drivers/staging/media/solo6x10/Kconfig +++ b/drivers/media/pci/solo6x10/Kconfig @@ -1,4 +1,4 @@ -config SOLO6X10 +config VIDEO_SOLO6X10 tristate Bluecherry / Softlogic 6x10 capture cards (MPEG-4/H.264) depends on PCI VIDEO_DEV SND I2C select BITREVERSE diff --git a/drivers/staging/media/solo6x10/Makefile b/drivers/media/pci/solo6x10/Makefile similarity index 82% rename from drivers/staging/media/solo6x10/Makefile rename to drivers/media/pci/solo6x10/Makefile index 7aae118..f474226 100644 --- a/drivers/staging/media/solo6x10/Makefile
[PATCH for v3.17 1/4] go7007: update the README, fix checkpatch warnings
From: Hans Verkuil hans.verk...@cisco.com This prepares the driver for moving out of staging. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/staging/media/go7007/README | 1 - drivers/staging/media/go7007/go7007-driver.c | 6 + drivers/staging/media/go7007/go7007-fw.c | 4 drivers/staging/media/go7007/go7007-i2c.c | 4 drivers/staging/media/go7007/go7007-loader.c | 4 drivers/staging/media/go7007/go7007-priv.h| 4 drivers/staging/media/go7007/go7007-usb.c | 4 drivers/staging/media/go7007/go7007-v4l2.c| 4 drivers/staging/media/go7007/s2250-board.c| 9 +++ drivers/staging/media/go7007/saa7134-go7007.c | 34 +++ drivers/staging/media/go7007/snd-go7007.c | 4 11 files changed, 18 insertions(+), 60 deletions(-) diff --git a/drivers/staging/media/go7007/README b/drivers/staging/media/go7007/README index 3af0d90..34516ea 100644 --- a/drivers/staging/media/go7007/README +++ b/drivers/staging/media/go7007/README @@ -1,5 +1,4 @@ Todo: - - create an API for motion detection - let s2250-board use i2c subdevs as well instead of hardcoding support for the i2c devices. - when the driver is moved out of staging, support for saa7134-go7007 diff --git a/drivers/staging/media/go7007/go7007-driver.c b/drivers/staging/media/go7007/go7007-driver.c index c200601..95cffb7 100644 --- a/drivers/staging/media/go7007/go7007-driver.c +++ b/drivers/staging/media/go7007/go7007-driver.c @@ -9,10 +9,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ #include linux/module.h @@ -225,7 +221,7 @@ static int init_i2c_module(struct i2c_adapter *adapter, const struct go_i2c *con return 0; } - printk(KERN_INFO go7007: probing for module i2c:%s failed\n, i2c-type); + pr_info(go7007: probing for module i2c:%s failed\n, i2c-type); return -EINVAL; } diff --git a/drivers/staging/media/go7007/go7007-fw.c b/drivers/staging/media/go7007/go7007-fw.c index f60640b..5f4c9b9 100644 --- a/drivers/staging/media/go7007/go7007-fw.c +++ b/drivers/staging/media/go7007/go7007-fw.c @@ -9,10 +9,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* diff --git a/drivers/staging/media/go7007/go7007-i2c.c b/drivers/staging/media/go7007/go7007-i2c.c index 4cf4c0d..55addfa 100644 --- a/drivers/staging/media/go7007/go7007-i2c.c +++ b/drivers/staging/media/go7007/go7007-i2c.c @@ -9,10 +9,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ #include linux/module.h diff --git a/drivers/staging/media/go7007/go7007-loader.c b/drivers/staging/media/go7007/go7007-loader.c index 491d0e6..042f78a 100644 --- a/drivers/staging/media/go7007/go7007-loader.c +++ b/drivers/staging/media/go7007/go7007-loader.c @@ -9,10 +9,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ #include linux/module.h diff --git a/drivers/staging/media/go7007/go7007-priv.h b/drivers/staging/media/go7007/go7007-priv.h index a8aefed..2251c3f 100644 --- a/drivers/staging/media/go7007/go7007-priv.h +++ b/drivers/staging/media/go7007/go7007-priv.h @@ -9,10 +9,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software Foundation, - * Inc., 59 Temple Place - Suite 330, Boston MA 02111-1307, USA. */ /* diff --git
[PATCH for v3.17 2/4] go7007: move out of staging into drivers/media/usb.
From: Hans Verkuil hans.verk...@cisco.com Now that the custom motion detection API in this driver has been replaced with a standard API there is no reason anymore to keep it in staging. So (finally!) move it to drivers/media/usb. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/media/usb/Kconfig| 1 + drivers/media/usb/Makefile | 1 + drivers/{staging/media = media/usb}/go7007/Kconfig | 0 drivers/{staging/media = media/usb}/go7007/Makefile | 0 drivers/{staging/media = media/usb}/go7007/README | 0 drivers/{staging/media = media/usb}/go7007/go7007-driver.c | 0 drivers/{staging/media = media/usb}/go7007/go7007-fw.c | 0 drivers/{staging/media = media/usb}/go7007/go7007-i2c.c | 0 drivers/{staging/media = media/usb}/go7007/go7007-loader.c | 0 drivers/{staging/media = media/usb}/go7007/go7007-priv.h| 0 drivers/{staging/media = media/usb}/go7007/go7007-usb.c | 0 drivers/{staging/media = media/usb}/go7007/go7007-v4l2.c| 0 drivers/{staging/media = media/usb}/go7007/go7007.txt | 0 drivers/{staging/media = media/usb}/go7007/s2250-board.c| 0 drivers/{staging/media = media/usb}/go7007/saa7134-go7007.c | 0 drivers/{staging/media = media/usb}/go7007/snd-go7007.c | 0 drivers/staging/media/Kconfig| 2 -- drivers/staging/media/Makefile | 1 - 18 files changed, 2 insertions(+), 3 deletions(-) rename drivers/{staging/media = media/usb}/go7007/Kconfig (100%) rename drivers/{staging/media = media/usb}/go7007/Makefile (100%) rename drivers/{staging/media = media/usb}/go7007/README (100%) rename drivers/{staging/media = media/usb}/go7007/go7007-driver.c (100%) rename drivers/{staging/media = media/usb}/go7007/go7007-fw.c (100%) rename drivers/{staging/media = media/usb}/go7007/go7007-i2c.c (100%) rename drivers/{staging/media = media/usb}/go7007/go7007-loader.c (100%) rename drivers/{staging/media = media/usb}/go7007/go7007-priv.h (100%) rename drivers/{staging/media = media/usb}/go7007/go7007-usb.c (100%) rename drivers/{staging/media = media/usb}/go7007/go7007-v4l2.c (100%) rename drivers/{staging/media = media/usb}/go7007/go7007.txt (100%) rename drivers/{staging/media = media/usb}/go7007/s2250-board.c (100%) rename drivers/{staging/media = media/usb}/go7007/saa7134-go7007.c (100%) rename drivers/{staging/media = media/usb}/go7007/snd-go7007.c (100%) diff --git a/drivers/media/usb/Kconfig b/drivers/media/usb/Kconfig index 39d824e..52cbd90 100644 --- a/drivers/media/usb/Kconfig +++ b/drivers/media/usb/Kconfig @@ -27,6 +27,7 @@ source drivers/media/usb/hdpvr/Kconfig source drivers/media/usb/tlg2300/Kconfig source drivers/media/usb/usbvision/Kconfig source drivers/media/usb/stk1160/Kconfig +source drivers/media/usb/go7007/Kconfig endif if (MEDIA_ANALOG_TV_SUPPORT || MEDIA_DIGITAL_TV_SUPPORT) diff --git a/drivers/media/usb/Makefile b/drivers/media/usb/Makefile index 7ac4b14..4eef650 100644 --- a/drivers/media/usb/Makefile +++ b/drivers/media/usb/Makefile @@ -20,3 +20,4 @@ obj-$(CONFIG_VIDEO_CX231XX) += cx231xx/ obj-$(CONFIG_VIDEO_TM6000) += tm6000/ obj-$(CONFIG_VIDEO_EM28XX) += em28xx/ obj-$(CONFIG_VIDEO_USBTV) += usbtv/ +obj-$(CONFIG_VIDEO_GO7007) += go7007/ diff --git a/drivers/staging/media/go7007/Kconfig b/drivers/media/usb/go7007/Kconfig similarity index 100% rename from drivers/staging/media/go7007/Kconfig rename to drivers/media/usb/go7007/Kconfig diff --git a/drivers/staging/media/go7007/Makefile b/drivers/media/usb/go7007/Makefile similarity index 100% rename from drivers/staging/media/go7007/Makefile rename to drivers/media/usb/go7007/Makefile diff --git a/drivers/staging/media/go7007/README b/drivers/media/usb/go7007/README similarity index 100% rename from drivers/staging/media/go7007/README rename to drivers/media/usb/go7007/README diff --git a/drivers/staging/media/go7007/go7007-driver.c b/drivers/media/usb/go7007/go7007-driver.c similarity index 100% rename from drivers/staging/media/go7007/go7007-driver.c rename to drivers/media/usb/go7007/go7007-driver.c diff --git a/drivers/staging/media/go7007/go7007-fw.c b/drivers/media/usb/go7007/go7007-fw.c similarity index 100% rename from drivers/staging/media/go7007/go7007-fw.c rename to drivers/media/usb/go7007/go7007-fw.c diff --git a/drivers/staging/media/go7007/go7007-i2c.c b/drivers/media/usb/go7007/go7007-i2c.c similarity index 100% rename from drivers/staging/media/go7007/go7007-i2c.c rename to drivers/media/usb/go7007/go7007-i2c.c diff --git a/drivers/staging/media/go7007/go7007-loader.c b/drivers/media/usb/go7007/go7007-loader.c similarity index 100% rename from drivers/staging/media/go7007/go7007-loader.c rename to drivers/media/usb/go7007/go7007-loader.c diff --git a/drivers/staging/media/go7007/go7007-priv.h b/drivers/media/usb/go7007/go7007-priv.h similarity index 100% rename from
[PATCH for v3.17 3/4] solo6x10: a few checkpatch fixes
From: Hans Verkuil hans.verk...@cisco.com Added a blank line after variable declarations where checkpatch requested that, and removed the 'write to the FSF' paragraph, again as requested. This is in preparation of the move out of staging into drivers/media. Signed-off-by: Hans Verkuil hans.verk...@cisco.com --- drivers/staging/media/solo6x10/solo6x10-core.c | 6 +- drivers/staging/media/solo6x10/solo6x10-disp.c | 4 drivers/staging/media/solo6x10/solo6x10-eeprom.c | 4 drivers/staging/media/solo6x10/solo6x10-enc.c | 4 drivers/staging/media/solo6x10/solo6x10-g723.c | 4 drivers/staging/media/solo6x10/solo6x10-gpio.c | 4 drivers/staging/media/solo6x10/solo6x10-i2c.c | 4 drivers/staging/media/solo6x10/solo6x10-jpeg.h | 4 drivers/staging/media/solo6x10/solo6x10-offsets.h | 4 drivers/staging/media/solo6x10/solo6x10-p2m.c | 4 drivers/staging/media/solo6x10/solo6x10-regs.h | 4 drivers/staging/media/solo6x10/solo6x10-tw28.c | 5 + drivers/staging/media/solo6x10/solo6x10-tw28.h | 4 drivers/staging/media/solo6x10/solo6x10-v4l2-enc.c | 7 +++ drivers/staging/media/solo6x10/solo6x10-v4l2.c | 8 drivers/staging/media/solo6x10/solo6x10.h | 4 16 files changed, 9 insertions(+), 65 deletions(-) diff --git a/drivers/staging/media/solo6x10/solo6x10-core.c b/drivers/staging/media/solo6x10/solo6x10-core.c index f670469..172583d 100644 --- a/drivers/staging/media/solo6x10/solo6x10-core.c +++ b/drivers/staging/media/solo6x10/solo6x10-core.c @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include linux/kernel.h @@ -307,8 +303,8 @@ static ssize_t p2m_timeout_store(struct device *dev, struct solo_dev *solo_dev = container_of(dev, struct solo_dev, dev); unsigned long ms; - int ret = kstrtoul(buf, 10, ms); + if (ret 0 || ms 200) return -EINVAL; solo_dev-p2m_jiffies = msecs_to_jiffies(ms); diff --git a/drivers/staging/media/solo6x10/solo6x10-disp.c b/drivers/staging/media/solo6x10/solo6x10-disp.c index b529a96..ed88ab4 100644 --- a/drivers/staging/media/solo6x10/solo6x10-disp.c +++ b/drivers/staging/media/solo6x10/solo6x10-disp.c @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include linux/kernel.h diff --git a/drivers/staging/media/solo6x10/solo6x10-eeprom.c b/drivers/staging/media/solo6x10/solo6x10-eeprom.c index 9d1c9bb..af40b3a 100644 --- a/drivers/staging/media/solo6x10/solo6x10-eeprom.c +++ b/drivers/staging/media/solo6x10/solo6x10-eeprom.c @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include linux/kernel.h diff --git a/drivers/staging/media/solo6x10/solo6x10-enc.c b/drivers/staging/media/solo6x10/solo6x10-enc.c index 2db53b6..d19c0ae 100644 --- a/drivers/staging/media/solo6x10/solo6x10-enc.c +++ b/drivers/staging/media/solo6x10/solo6x10-enc.c @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU General Public License - * along with this program; if not, write to the Free Software - * Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA. */ #include linux/kernel.h diff --git a/drivers/staging/media/solo6x10/solo6x10-g723.c b/drivers/staging/media/solo6x10/solo6x10-g723.c index 74f037b..c7141f2 100644 --- a/drivers/staging/media/solo6x10/solo6x10-g723.c +++ b/drivers/staging/media/solo6x10/solo6x10-g723.c @@ -16,10 +16,6 @@ * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * - * You should have received a copy of the GNU
media_build wrong patch
Hi, I'd like to file a bug in the latest commit: b6f4c524e0fe8f2d50b0a2f849e022adef76c6cc The file backports/api_version.patch rejects to patch the linux/drivers/media/v4l2-core/v4l2-ioctl.c because of wrong line numbers and because the code doesn't match. This is your code: --- --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1009,7 +1009,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops, struct v4l2_capability *cap = (struct v4l2_capability *)arg; int ret; - cap-version = LINUX_VERSION_CODE; + cap-version = V4L2_VERSION; ret = ops-vidioc_querycap(file, fh, cap); --- This should be there: --- --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -964,7 +964,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops, { struct v4l2_capability *cap = (struct v4l2_capability *)arg; - cap-version = LINUX_VERSION_CODE; + cap-version = V4L2_VERSION; return ops-vidioc_querycap(file, fh, cap); } --- In the C file there's no ret variable and all the code is moved somewhere else, but it's not @@ line 1009. The diff file is attached. When I hacked the patch file, I built everything. Regards. Rafael van Horn --- Debian 7.6 gcc Version: 4:4.7.2-1 make Version: 3.81-8.2 perl Version: 5.14.2-21+deb7u1 linux-headers-amd64 Version: 3.2+46 patch Version: 2.6.1-3 --- MB/backports/api_version.patch 2014-07-18 00:48:54.773248546 +0200 +++ api_version.patch 2014-07-18 01:36:33.878313555 +0200 @@ -41,12 +41,12 @@ index e0bafda..6225391 100644 --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c -@@ -1009,7 +1009,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops, +@@ -964,7 +964,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops, + { struct v4l2_capability *cap = (struct v4l2_capability *)arg; - int ret; - cap-version = LINUX_VERSION_CODE; + cap-version = V4L2_VERSION; - - ret = ops-vidioc_querycap(file, fh, cap); + return ops-vidioc_querycap(file, fh, cap); + }
[linuxtv-media:master 447/499] drivers/media/common/saa7146/saa7146_fops.c:536:13: sparse: incorrect type in assignment (different base types)
tree: git://linuxtv.org/media_tree.git master head: 0ca1ba2aac5f6b26672099b13040c5b40db93486 commit: d52e23813672c3c72f92e7b39c7408d4b9a40a96 [447/499] [media] v4l: Support extending the v4l2_pix_format structure reproduce: make C=1 CF=-D__CHECK_ENDIAN__ sparse warnings: (new ones prefixed by ) drivers/media/common/saa7146/saa7146_fops.c:536:13: sparse: incorrect type in assignment (different base types) drivers/media/common/saa7146/saa7146_fops.c:536:13:expected struct v4l2_pix_format *fmt drivers/media/common/saa7146/saa7146_fops.c:536:13:got struct noident *noident drivers/media/common/saa7146/saa7146_fops.c: In function 'saa7146_vv_init': drivers/media/common/saa7146/saa7146_fops.c:536:6: warning: assignment from incompatible pointer type [enabled by default] fmt = vv-ov_fb.fmt; ^ vim +536 drivers/media/common/saa7146/saa7146_fops.c ^1da177e4 drivers/media/common/saa7146_fops.c Linus Torvalds2005-04-16 520configuration data) */ ^1da177e4 drivers/media/common/saa7146_fops.c Linus Torvalds2005-04-16 521 dev-ext_vv_data = ext_vv; afd1a0c9a drivers/media/common/saa7146_fops.c Mauro Carvalho Chehab 2005-12-12 522 afd1a0c9a drivers/media/common/saa7146_fops.c Mauro Carvalho Chehab 2005-12-12 523 vv-d_clipping.cpu_addr = pci_alloc_consistent(dev-pci, SAA7146_CLIPPING_MEM, vv-d_clipping.dma_handle); ^1da177e4 drivers/media/common/saa7146_fops.c Linus Torvalds2005-04-16 524 if( NULL == vv-d_clipping.cpu_addr ) { 44d0b80e5 drivers/media/common/saa7146_fops.c Joe Perches 2011-08-21 525 ERR(out of memory. aborting.\n); ^1da177e4 drivers/media/common/saa7146_fops.c Linus Torvalds2005-04-16 526 kfree(vv); 6e65ca942 drivers/media/common/saa7146_fops.c Hans Verkuil 2012-04-29 527 v4l2_ctrl_handler_free(hdl); ^1da177e4 drivers/media/common/saa7146_fops.c Linus Torvalds2005-04-16 528 return -1; ^1da177e4 drivers/media/common/saa7146_fops.c Linus Torvalds2005-04-16 529 } ^1da177e4 drivers/media/common/saa7146_fops.c Linus Torvalds2005-04-16 530 memset(vv-d_clipping.cpu_addr, 0x0, SAA7146_CLIPPING_MEM); ^1da177e4 drivers/media/common/saa7146_fops.c Linus Torvalds2005-04-16 531 ^1da177e4 drivers/media/common/saa7146_fops.c Linus Torvalds2005-04-16 532 saa7146_video_uops.init(dev,vv); 5b0fa4fff drivers/media/common/saa7146_fops.c Oliver Endriss2006-01-09 533 if (dev-ext_vv_data-capabilities V4L2_CAP_VBI_CAPTURE) 5b0fa4fff drivers/media/common/saa7146_fops.c Oliver Endriss2006-01-09 534 saa7146_vbi_uops.init(dev,vv); afd1a0c9a drivers/media/common/saa7146_fops.c Mauro Carvalho Chehab 2005-12-12 535 5da545ad0 drivers/media/common/saa7146_fops.c Hans Verkuil 2012-05-01 @536 fmt = vv-ov_fb.fmt; 5da545ad0 drivers/media/common/saa7146_fops.c Hans Verkuil 2012-05-01 537 fmt-width = vv-standard-h_max_out; 5da545ad0 drivers/media/common/saa7146_fops.c Hans Verkuil 2012-05-01 538 fmt-height = vv-standard-v_max_out; 5da545ad0 drivers/media/common/saa7146_fops.c Hans Verkuil 2012-05-01 539 fmt-pixelformat = V4L2_PIX_FMT_RGB565; 5da545ad0 drivers/media/common/saa7146_fops.c Hans Verkuil 2012-05-01 540 fmt-bytesperline = 2 * fmt-width; 5da545ad0 drivers/media/common/saa7146_fops.c Hans Verkuil 2012-05-01 541 fmt-sizeimage = fmt-bytesperline * fmt-height; 5da545ad0 drivers/media/common/saa7146_fops.c Hans Verkuil 2012-05-01 542 fmt-colorspace = V4L2_COLORSPACE_SRGB; fd74d6eb4 drivers/media/common/saa7146_fops.c Hans Verkuil 2012-05-01 543 fd74d6eb4 drivers/media/common/saa7146_fops.c Hans Verkuil 2012-05-01 544 fmt = vv-video_fmt; :: The code at line 536 was first introduced by commit :: 5da545ad08a3c6ea71d3ba074adc7582e7e9a024 [media] saa7146: move overlay information from saa7146_fh into saa7146_vv :: TO: Hans Verkuil hans.verk...@cisco.com :: CC: Mauro Carvalho Chehab mche...@redhat.com --- 0-DAY kernel build testing backend Open Source Technology Center http://lists.01.org/mailman/listinfo/kbuild Intel Corporation -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: media_build wrong patch
On 07/18/2014 01:46 AM, Rafael van Horn wrote: Hi, I'd like to file a bug in the latest commit: b6f4c524e0fe8f2d50b0a2f849e022adef76c6cc The file backports/api_version.patch rejects to patch the linux/drivers/media/v4l2-core/v4l2-ioctl.c because of wrong line numbers and because the code doesn't match. You are probably using the build script which downloads the code. That's build once a day and yours is old. Try again tomorrow, it should be fine again (or not, we're merging a lot of code, so breakages may happen for the next few days). Regards, Hans This is your code: --- --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -1009,7 +1009,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops, struct v4l2_capability *cap = (struct v4l2_capability *)arg; int ret; - cap-version = LINUX_VERSION_CODE; + cap-version = V4L2_VERSION; ret = ops-vidioc_querycap(file, fh, cap); --- This should be there: --- --- a/drivers/media/v4l2-core/v4l2-ioctl.c +++ b/drivers/media/v4l2-core/v4l2-ioctl.c @@ -964,7 +964,7 @@ static int v4l_querycap(const struct v4l2_ioctl_ops *ops, { struct v4l2_capability *cap = (struct v4l2_capability *)arg; - cap-version = LINUX_VERSION_CODE; + cap-version = V4L2_VERSION; return ops-vidioc_querycap(file, fh, cap); } --- In the C file there's no ret variable and all the code is moved somewhere else, but it's not @@ line 1009. The diff file is attached. When I hacked the patch file, I built everything. Regards. Rafael van Horn --- Debian 7.6 gcc Version: 4:4.7.2-1 make Version: 3.81-8.2 perl Version: 5.14.2-21+deb7u1 linux-headers-amd64 Version: 3.2+46 patch Version: 2.6.1-3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH] airspy: AirSpy SDR driver
On 07/15/2014 06:50 AM, Hans Verkuil wrote: On 07/15/2014 04:35 AM, Antti Palosaari wrote: On 07/14/2014 11:01 PM, Hans Verkuil wrote: On 07/14/2014 09:55 PM, Antti Palosaari wrote: I actually ran v4l2-compliance and there was problem with ADC band enumeration. v4l2-compliance didn't liked as ADC freq was just 20MHz, both upper and lower limit. Due to that I added even small hack to driver, + .rangelow = 2000, + .rangehigh = 2001, /* FIXME: make v4l2-compliance happy */ Hmm, does the latest v4l2-compliance (direct from the git repo) still fail on that? That shouldn't be a problem, and I don't see that here either if I try that myself. If it still fails, can you show me the error message? [crope@localhost gr-analog]$ ls -l /usr/local/bin/v4l2-compliance -rwxr-xr-x. 1 root root 1497964 Jul 14 22:50 /usr/local/bin/v4l2-compliance [crope@localhost gr-analog]$ /usr/local/bin/v4l2-compliance -S /dev/swradio0 -s Driver Info: Driver name : airspy Card type : AirSpy SDR Bus info : usb-:00:13.2-2 Driver version: 3.15.0 Capabilities : 0x8511 SDR Capture Tuner Read/Write Streaming Device Capabilities Device Caps : 0x0511 SDR Capture Tuner Read/Write Streaming Compliance test for device /dev/swradio0 (not using libv4l2): Required ioctls: test VIDIOC_QUERYCAP: OK Allow for multiple opens: test second sdr open: OK test VIDIOC_QUERYCAP: OK test VIDIOC_G/S_PRIORITY: OK Debug ioctls: test VIDIOC_DBG_G/S_REGISTER: OK test VIDIOC_LOG_STATUS: OK Input ioctls: fail: v4l2-test-input-output.cpp(107): rangelow = rangehigh fail: v4l2-test-input-output.cpp(190): invalid tuner 0 test VIDIOC_G/S_TUNER: FAIL fail: v4l2-test-input-output.cpp(290): could get frequency for invalid Try again, it should be fixed now. Old error has gone, but two new comes: Compliance test for device /dev/swradio0 (not using libv4l2): Required ioctls: fail: v4l2-compliance.cpp(354): !(caps V4L2_CAP_EXT_PIX_FORMAT) test VIDIOC_QUERYCAP: FAIL Allow for multiple opens: test second sdr open: OK fail: v4l2-compliance.cpp(354): !(caps V4L2_CAP_EXT_PIX_FORMAT) test VIDIOC_QUERYCAP: FAIL test VIDIOC_G/S_PRIORITY: OK regards Antti -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH] MAINTAINERS: update MSI3101 / MSI2500 driver location
MSi3101 driver is moved out of staging and renamed. Signed-off-by: Antti Palosaari cr...@iki.fi --- MAINTAINERS | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTAINERS b/MAINTAINERS index e0bd8b0..b2d6f2e 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5893,7 +5893,7 @@ T:git git://linuxtv.org/anttip/media_tree.git S: Maintained F: drivers/media/tuners/msi001* -MSI3101 MEDIA DRIVER +MSI2500 MEDIA DRIVER M: Antti Palosaari cr...@iki.fi L: linux-media@vger.kernel.org W: http://linuxtv.org/ @@ -5901,7 +5901,7 @@ W:http://palosaari.fi/linux/ Q: http://patchwork.linuxtv.org/project/linux-media/list/ T: git git://linuxtv.org/anttip/media_tree.git S: Maintained -F: drivers/staging/media/msi3101/sdr-msi3101* +F: drivers/media/usb/msi2500/ MT9M032 APTINA SENSOR DRIVER M: Laurent Pinchart laurent.pinch...@ideasonboard.com -- 1.9.3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 4/4] MAINTAINERS: add airspy driver
Video4Linux2 driver for AirSpy SDR device. Signed-off-by: Antti Palosaari cr...@iki.fi --- MAINTAINERS | 10 ++ 1 file changed, 10 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 943efe3..f8e2c7f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -508,6 +508,16 @@ S: Supported F: fs/aio.c F: include/linux/*aio*.h +AIRSPY MEDIA DRIVER +M: Antti Palosaari cr...@iki.fi +L: linux-media@vger.kernel.org +W: http://linuxtv.org/ +W: http://palosaari.fi/linux/ +Q: http://patchwork.linuxtv.org/project/linux-media/list/ +T: git git://linuxtv.org/anttip/media_tree.git +S: Maintained +F: drivers/media/usb/airspy/ + ALCATEL SPEEDTOUCH USB DRIVER M: Duncan Sands duncan.sa...@free.fr L: linux-...@vger.kernel.org -- 1.9.3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 1/4] airspy: remove v4l2-compliance workaround
v4l2-compliance is now happy with frequency ranges where both lower and upper limit is same. Cc: Hans Verkuil hverk...@xs4all.nl Signed-off-by: Antti Palosaari cr...@iki.fi --- drivers/staging/media/airspy/airspy.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/airspy/airspy.c b/drivers/staging/media/airspy/airspy.c index daecd91..5b3310f 100644 --- a/drivers/staging/media/airspy/airspy.c +++ b/drivers/staging/media/airspy/airspy.c @@ -62,7 +62,7 @@ static const struct v4l2_frequency_band bands[] = { .index = 0, .capability = V4L2_TUNER_CAP_1HZ | V4L2_TUNER_CAP_FREQ_BANDS, .rangelow = 2000, - .rangehigh = 2001, /* FIXME: make v4l2-compliance happy */ + .rangehigh = 2000, }, }; -- 1.9.3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[PATCH 3/4] airspy: print notice to point SDR API is not 100% stable yet
Print notice on driver load: SDR API is still slightly experimental and functionality changes may follow. It is just remind possible used SDR API is very new and surprises may occur. Signed-off-by: Antti Palosaari cr...@iki.fi --- drivers/media/usb/airspy/airspy.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/drivers/media/usb/airspy/airspy.c b/drivers/media/usb/airspy/airspy.c index 5b3310f..6cf09ef 100644 --- a/drivers/media/usb/airspy/airspy.c +++ b/drivers/media/usb/airspy/airspy.c @@ -1086,7 +1086,9 @@ static int airspy_probe(struct usb_interface *intf, } dev_info(s-udev-dev, Registered as %s\n, video_device_node_name(s-vdev)); - + dev_notice(s-udev-dev, + %s: SDR API is still slightly experimental and functionality changes may follow\n, + KBUILD_MODNAME); return 0; err_free_controls: -- 1.9.3 -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html
[GIT PULL] SDR stuff
* AirSpy SDR driver * all SDR drivers moved out of staging * few new SDR stream formats regards Antti The following changes since commit 3445857b22eafb70a6ac258979e955b116bfd2c6: [media] hdpvr: fix two audio bugs (2014-07-04 15:13:02 -0300) are available in the git repository at: git://linuxtv.org/anttip/media_tree.git sdr_pull for you to fetch changes up to 1c3378e1c17d6acd9b6d392ff75addad4c63cc6c: MAINTAINERS: add airspy driver (2014-07-18 04:12:27 +0300) Antti Palosaari (23): v4l: uapi: add SDR format RU12LE DocBook: V4L: add V4L2_SDR_FMT_RU12LE - 'RU12' airspy: AirSpy SDR driver v4l: uapi: add SDR format CS8 DocBook: V4L: add V4L2_SDR_FMT_CS8 - 'CS08' v4l: uapi: add SDR format CS14 DocBook: V4L: add V4L2_SDR_FMT_CS14LE - 'CS14' msi001: move out of staging MAINTAINERS: update MSI001 driver location Kconfig: add SDR support Kconfig: sub-driver auto-select SPI bus msi2500: move msi3101 out of staging and rename MAINTAINERS: update MSI3101 / MSI2500 driver location msi2500: change supported formats msi2500: print notice to point SDR API is not 100% stable yet rtl2832_sdr: move from staging to media rtl2832_sdr: put complex U16 format behind module parameter rtl2832_sdr: print notice to point SDR API is not 100% stable yet MAINTAINERS: update RTL2832_SDR location airspy: remove v4l2-compliance workaround airspy: move out of staging into drivers/media/usb airspy: print notice to point SDR API is not 100% stable yet MAINTAINERS: add airspy driver Documentation/DocBook/media/v4l/pixfmt-sdr-cs08.xml | 44 Documentation/DocBook/media/v4l/pixfmt-sdr-cs14le.xml | 47 + Documentation/DocBook/media/v4l/pixfmt-sdr-ru12le.xml | 40 Documentation/DocBook/media/v4l/pixfmt.xml |3 + MAINTAINERS | 18 +- drivers/media/Kconfig | 12 +- drivers/media/dvb-frontends/Kconfig |9 + drivers/media/dvb-frontends/Makefile |6 + drivers/{staging/media/rtl2832u_sdr = media/dvb-frontends}/rtl2832_sdr.c| 21 +- drivers/{staging/media/rtl2832u_sdr = media/dvb-frontends}/rtl2832_sdr.h|0 drivers/media/tuners/Kconfig |6 + drivers/media/tuners/Makefile |1 + drivers/{staging/media/msi3101 = media/tuners}/msi001.c |0 drivers/media/usb/Kconfig |6 + drivers/media/usb/Makefile |2 + drivers/media/usb/airspy/Kconfig | 10 + drivers/media/usb/airspy/Makefile |1 + drivers/media/usb/airspy/airspy.c | 1122 +++ drivers/media/usb/dvb-usb-v2/Kconfig |1 + drivers/media/usb/msi2500/Kconfig |5 + drivers/media/usb/msi2500/Makefile |1 + drivers/{staging/media/msi3101/sdr-msi3101.c = media/usb/msi2500/msi2500.c} | 47 +++-- drivers/staging/media/Kconfig |4 - drivers/staging/media/Makefile |2 - drivers/staging/media/msi3101/Kconfig | 10 - drivers/staging/media/msi3101/Makefile |2 - drivers/staging/media/rtl2832u_sdr/Kconfig |7 - drivers/staging/media/rtl2832u_sdr/Makefile |6 - include/uapi/linux/videodev2.h |3 + 29 files changed, 1375 insertions(+), 61 deletions(-) create mode 100644 Documentation/DocBook/media/v4l/pixfmt-sdr-cs08.xml create mode 100644 Documentation/DocBook/media/v4l/pixfmt-sdr-cs14le.xml create mode 100644 Documentation/DocBook/media/v4l/pixfmt-sdr-ru12le.xml rename drivers/{staging/media/rtl2832u_sdr = media/dvb-frontends}/rtl2832_sdr.c (98%) rename drivers/{staging/media/rtl2832u_sdr = media/dvb-frontends}/rtl2832_sdr.h (100%) rename drivers/{staging/media/msi3101 = media/tuners}/msi001.c (100%) create mode 100644 drivers/media/usb/airspy/Kconfig create mode 100644 drivers/media/usb/airspy/Makefile create mode 100644 drivers/media/usb/airspy/airspy.c create mode 100644 drivers/media/usb/msi2500/Kconfig create mode 100644 drivers/media/usb/msi2500/Makefile rename drivers/{staging/media/msi3101/sdr-msi3101.c = media/usb/msi2500/msi2500.c} (98%) delete mode 100644 drivers/staging/media/msi3101/Kconfig delete mode 100644 drivers/staging/media/msi3101/Makefile delete mode 100644 drivers/staging/media/rtl2832u_sdr/Kconfig delete mode 100644 drivers/staging/media/rtl2832u_sdr/Makefile -- http://palosaari.fi/ -- To unsubscribe from this list: send the line unsubscribe linux-media in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html