[RFC v6,3/3] media: i2c: add new dual LED Flash driver, lm364

2014-02-25 Thread Daniel Jeong
This patch adds the driver for the LM3646, dual LED Flash driver. The LM3646 has two 1.5A sync. boost converter with dual white current source. It is controlled via an I2C compatible interface. Each flash brightness, torch brightness and enable/disable can be controlled. Under voltage, input volta

[RFC v6 1/3] v4l2-controls.h: add addtional Flash fault bits

2014-02-25 Thread Daniel Jeong
Three Flash fault are added. V4L2_FLASH_FAULT_UNDER_VOLTAGE for the case low voltage below the min. limit. V4L2_FLASH_FAULT_INPUT_VOLTAGE for the case falling input voltage and chip adjust flash current not occur under voltage event. V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE for the case the tem

[RFC v6,2/3] controls.xml : add addtional Flash fault bits

2014-02-25 Thread Daniel Jeong
Descriptions for flash faluts. V4L2_FLASH_FAULT_UNDER_VOLTAGE, V4L2_FLASH_FAULT_INPUT_VOLTAGE, and V4L2_FLASH_FAULT_LED_OVER_TEMPERATURE Signed-off-by: Daniel Jeong --- Documentation/DocBook/media/v4l/controls.xml | 18 ++ 1 file changed, 18 insertions(+) diff --git a/Docum

[RFC v6 0/3] add new Dual LED FLASH LM3646

2014-02-25 Thread Daniel Jeong
This patch is to add new dual led flash, lm3646. LM3646 is the product of ti and it has two 1.5A sync. boost converter with dual white current source. 2 files are created and 4 files are modified. And 3 patch files are created and sent. v6 - change log Changed description in DocBook. v

GOOD NEWS

2014-02-25 Thread Dave and Angela
You have been Nominated by i and my wife Angela for Donation.Contact us :dave_angela0...@yahoo.com -- 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

cron job: media_tree daily build: WARNINGS

2014-02-25 Thread Hans Verkuil
This message is generated daily by a cron job that builds media_tree for the kernels and architectures in the list below. Results of the daily build of media_tree: date: Wed Feb 26 04:02:10 CET 2014 git branch: test git hash: efab6b6a6ea9364ececb955f69a9d3ffc6b782a1 gcc versio

[GIT PULL] git://linuxtv.org/mkrufky/dvb dvb

2014-02-25 Thread Michael Krufky
The following changes since commit efab6b6a6ea9364ececb955f69a9d3ffc6b782a1: [media] vivi: queue_setup improvements (2014-02-24 10:59:15 -0300) are available in the git repository at: git://linuxtv.org/mkrufky/dvb dvb for you to fetch changes up to e9abfeefb9d35229669f4d899832070ee623058e:

[PATCH] [media] rtl28xxu: add USB ID for Genius TVGo DVB-T03

2014-02-25 Thread Jan Vcelak
0458:707f KYE Systems Corp. (Mouse Systems) TVGo DVB-T03 [RTL2832] The USB dongle uses RTL2832U demodulator and FC0012 tuner. Signed-off-by: Jan Vcelak --- The patch adds support for the Genius TVGo DVB-T03 USB dongle. drivers/media/usb/dvb-usb-v2/rtl28xxu.c | 2 ++ 1 file changed, 2 insertio

Re: [PATCH v5 3/7] v4l: Add timestamp source flags, mask and document them

2014-02-25 Thread 'Sakari Ailus'
On Tue, Feb 25, 2014 at 02:09:41PM +0100, Kamil Debski wrote: > Hi Sakari, > > > From: Sakari Ailus [mailto:sakari.ai...@iki.fi] > > Sent: Saturday, February 15, 2014 9:53 PM > > > > Some devices do not produce timestamps that correspond to the end of > > the frame. The user space should be infor

Re: [PATCH v5 7/7] v4l: Document timestamp buffer flag behaviour

2014-02-25 Thread Hans Verkuil
On 02/26/2014 01:04 AM, Sakari Ailus wrote: > Hi Hans, > > On Tue, Feb 25, 2014 at 06:28:06PM +0100, Hans Verkuil wrote: >> On 02/25/2014 06:08 PM, Sakari Ailus wrote: >>> Hi Hans, >>> >>> On Sun, Feb 23, 2014 at 12:45:28PM +0100, Hans Verkuil wrote: On 02/15/2014 09:53 PM, Sakari Ailus wrote

Re: [PATCH v5 7/7] v4l: Document timestamp buffer flag behaviour

2014-02-25 Thread Sakari Ailus
Hi Hans, On Tue, Feb 25, 2014 at 06:28:06PM +0100, Hans Verkuil wrote: > On 02/25/2014 06:08 PM, Sakari Ailus wrote: > > Hi Hans, > > > > On Sun, Feb 23, 2014 at 12:45:28PM +0100, Hans Verkuil wrote: > >> On 02/15/2014 09:53 PM, Sakari Ailus wrote: > >>> Timestamp buffer flags are constant at the

Re: Upstreaming SAA716x driver to the media_tree

2014-02-25 Thread Luis Alves
Hi Manu, How's the progress going? Looking forward to finally see this driver in the tree :D Regards, Luis On Tue, Feb 11, 2014 at 7:47 PM, Manu Abraham wrote: > On Tue, Feb 11, 2014 at 7:14 PM, Luis Alves wrote: >> Hi, >> >> Any update on this? > > I need to address the issues Mauro pointed o

Re: [PATCH v5 7/7] v4l: Document timestamp buffer flag behaviour

2014-02-25 Thread Hans Verkuil
On 02/25/2014 06:08 PM, Sakari Ailus wrote: > Hi Hans, > > On Sun, Feb 23, 2014 at 12:45:28PM +0100, Hans Verkuil wrote: >> On 02/15/2014 09:53 PM, Sakari Ailus wrote: >>> Timestamp buffer flags are constant at the moment. Document them so that 1) >>> they're always valid and 2) not changed by the

Re: [PATCH v5 7/7] v4l: Document timestamp buffer flag behaviour

2014-02-25 Thread Sakari Ailus
Hi Hans, On Sun, Feb 23, 2014 at 12:45:28PM +0100, Hans Verkuil wrote: > On 02/15/2014 09:53 PM, Sakari Ailus wrote: > > Timestamp buffer flags are constant at the moment. Document them so that 1) > > they're always valid and 2) not changed by the drivers. This leaves room to > > extend the functi

Kedves e-mail felhasználók;

2014-02-25 Thread 臺科大光機電中心
Kedves e-mail felhasználók; Túllépte 23.432 doboz állította be Web Service / Admin, és akkor lesz probléma a küldő és fogadhat e-maileket, amíg meg újra ellenőrizni. Kérjük, frissítse kattintva linkre és töltse ki a részleteket, hogy ellenőrizze a számla Kérjük, kövesse az alábbi linket vagy máso

[PATCH v4 3/3] Documentation: of: Document graph bindings

2014-02-25 Thread Philipp Zabel
The device tree graph bindings as used by V4L2 and documented in Documentation/device-tree/bindings/media/video-interfaces.txt contain generic parts that are not media specific but could be useful for any subsystem with data flow between multiple devices. This document describe the generic bindings

[PATCH v4 0/3] Move device tree graph parsing helpers to drivers/of

2014-02-25 Thread Philipp Zabel
Hi, this version moves the graph helpers to drivers/of again instead of drivers/media. Since the location changed again, I have dropped the Acks. A second patch is added that splits out the common parts from v4l2_of_parse_endpoint into of_graph_parse_endpoint and I have added a binding description

[PATCH v4 2/3] [media] of: move common endpoint parsing to drivers/of

2014-02-25 Thread Philipp Zabel
This patch adds a new struct of_endpoint which is then embedded in struct v4l2_of_endpoint and contains the endpoint properties that are not V4L2 specific, or in fact not even media specific: port number, endpoint id, local device tree node and remote endpoint phandle. of_graph_parse_endpoint parse

[PATCH v4 1/3] [media] of: move graph helpers from drivers/media/v4l2-core to drivers/of

2014-02-25 Thread Philipp Zabel
From: Philipp Zabel This patch moves the parsing helpers used to parse connected graphs in the device tree, like the video interface bindings documented in Documentation/devicetree/bindings/media/video-interfaces.txt, from drivers/media/v4l2-core to drivers/of. This allows to reuse the same pars

Re: [PATCH v2] media: soc_camera: rcar_vin: Add support for 10-bit YUV cameras

2014-02-25 Thread Vladimir Barinov
On 02/25/2014 01:10 PM, Phil Edworthy wrote: Signed-off-by: Phil Edworthy Acked-by: Vladimir Barinov (Valentine can't do the review atm) --- v2: - Fix silly mistake with missing break. drivers/media/platform/soc_camera/rcar_vin.c |9 + 1 file changed, 9 insertions(+) diff

Re: [PATCH] media: soc_camera: rcar_vin: Add support for 10-bit YUV cameras

2014-02-25 Thread Valentine
On 02/24/2014 10:38 PM, Laurent Pinchart wrote: Hi Phil, Thank you for the patch. On Monday 24 February 2014 15:49:05 Phil Edworthy wrote: Signed-off-by: Phil Edworthy --- drivers/media/platform/soc_camera/rcar_vin.c |7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/med

Re: [PATCH v5 04/10] V4L: Add driver for s5k6a3 image sensor

2014-02-25 Thread Sylwester Nawrocki
On 25/02/14 10:55, Baruch Siach wrote: > Thanks for the explanation. However, I've found no reference to the > s5k6a3_sd_internal_ops struct in the driver code. There surly has to be at > least one reference for the upper layer to access these ops. There is indeed an assignment missing to sd->in

RE: [PATCH v5 3/7] v4l: Add timestamp source flags, mask and document them

2014-02-25 Thread Kamil Debski
Hi Sakari, > From: Sakari Ailus [mailto:sakari.ai...@iki.fi] > Sent: Saturday, February 15, 2014 9:53 PM > > Some devices do not produce timestamps that correspond to the end of > the frame. The user space should be informed on the matter. This patch > achieves that by adding buffer flags (and a

RE: [PATCH v5 6/7] v4l: Copy timestamp source flags to destination on m2m devices

2014-02-25 Thread Kamil Debski
Hi Sakari, > From: Sakari Ailus [mailto:sakari.ai...@iki.fi] > Sent: Saturday, February 15, 2014 9:53 PM > > Copy the flags containing the timestamp source from source buffer flags > to the destination buffer flags on memory-to-memory devices. This is > analogous to copying the timestamp field fr

RE: [PATCH v5 5/7] exynos-gsc, m2m-deinterlace, mx2_emmaprp: Copy v4l2_buffer data from src to dst

2014-02-25 Thread Kamil Debski
Hi Sakari, > From: Sakari Ailus [mailto:sakari.ai...@iki.fi] > Sent: Saturday, February 15, 2014 9:53 PM > > The timestamp and timecode fields were copied from destination to > source, not the other way around as they should. Fix it. > > Signed-off-by: Sakari Ailus Acked-by: Kamil Debski > -

[REVIEWv2 PATCH 07/15] vb2: call buf_finish from __dqbuf

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil This ensures that it is also called from queue_cancel, which also calls __dqbuf(). Without this change any time queue_cancel is called while streaming the buf_finish op will not be called and any driver cleanup will not happen. Signed-off-by: Hans Verkuil Acked-by: Pawel Osci

[REVIEWv2 PATCH 10/15] vb2: don't init the list if there are still buffers

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil __vb2_queue_free() would init the queued_list at all times, even if q->num_buffers > 0. This should only happen if num_buffers == 0. This situation can happen if a CREATE_BUFFERS call couldn't allocate enough buffers and had to free those it did manage to allocate before retur

[REVIEWv2 PATCH 11/15] vb2: only call start_streaming if sufficient buffers are queued

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil In commit 02f142ecd24aaf891324ffba8527284c1731b561 support was added to start_streaming to return -ENOBUFS if insufficient buffers were queued for the DMA engine to start. The vb2 core would attempt calling start_streaming again if another buffer would be queued up. Later anal

[REVIEWv2 PATCH 05/15] vb2: change result code of buf_finish to void

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil The buf_finish op should always work, so change the return type to void. Update the few drivers that use it. Note that buf_finish can be called both when the DMA is streaming and when it isn't (during queue_cancel). Update drivers to check that where appropriate. Signed-off-by

[REVIEWv2 PATCH 15/15] vivi: correctly cleanup after a start_streaming failure

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil If start_streaming fails then any queued buffers must be given back to the vb2 core. Signed-off-by: Hans Verkuil --- drivers/media/platform/vivi.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/vivi.c b/drivers/media/p

[REVIEWv2 PATCH 08/15] vb2: fix buf_init/buf_cleanup call sequences

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Ensure that these ops are properly balanced. There are two scenarios: 1) for MMAP buf_init is called when the buffers are created and buf_cleanup must be called when the queue is finally freed. This scenario was always working. 2) for USERPTR and DMABUF it is more comp

[REVIEWv2 PATCH 06/15] vb2: add note that buf_finish can be called with !vb2_is_streaming()

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Drivers need to be aware that buf_finish can be called when there is no streaming going on, so make a note of that. Also add a bunch of missing periods at the end of sentences. Signed-off-by: Hans Verkuil Acked-by: Pawel Osciak --- include/media/videobuf2-core.h | 44 +

[REVIEWv2 PATCH 02/15] vb2: fix read/write regression

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Commit 88e268702bfba78448abd20a31129458707383aa ("vb2: Improve file I/O emulation to handle buffers in any order") broke read/write support if the size of the buffer being read/written is less than the size of the image. When the commit was tested originally I used qv4l2, whic

[REVIEWv2 PATCH 09/15] vb2: rename queued_count to owned_by_drv_count

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil 'queued_count' is a bit vague since it is not clear to which queue it refers to: the vb2 internal list of buffers or the driver-owned list of buffers. Rename to make it explicit. Signed-off-by: Hans Verkuil Acked-by: Pawel Osciak --- drivers/media/v4l2-core/videobuf2-core.

[REVIEWv2 PATCH 03/15] vb2: fix PREPARE_BUF regression

2014-02-25 Thread Hans Verkuil
Fix an incorrect test in vb2_internal_qbuf() where only DEQUEUED buffers are allowed. But PREPARED buffers are also OK. Introduced by commit 4138111a27859dcc56a5592c804dd16bb12a23d1 ("vb2: simplify qbuf/prepare_buf by removing callback"). Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/

[REVIEWv2 PATCH 13/15] vb2: replace BUG by WARN_ON

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil No need to oops for this, WARN_ON is good enough. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-

[REVIEWv2 PATCH 12/15] vb2: properly clean up PREPARED and QUEUED buffers

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil In __vb2_dqbuf we need to call the finish memop for any pending buffers in the PREPARED or QUEUED state. This can happen if PREPARE_BUF or QBUF was called without ever calling STREAMON. In that case, when either REQBUFS(0) is called or the filehandle is closed __vb2_queue_canc

[REVIEWv2 PATCH 14/15] vb2: fix streamoff handling if streamon wasn't called.

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil If you request buffers, then queue buffers and then call STREAMOFF those buffers are not returned to their dequeued state because streamoff will just return if q->streaming was 0. This means that afterwards you can never QBUF that same buffer again unless you do STREAMON, REQB

[REVIEWv2 PATCH 01/15] vb2: Check if there are buffers before streamon

2014-02-25 Thread Hans Verkuil
From: Ricardo Ribalda Delgado This patch adds a test preventing streamon() if there is no buffer ready. Without this patch, a user could call streamon() before preparing any buffer. This leads to a situation where if he calls close() before calling streamoff() the device is kept streaming. Sign

[REVIEWv2 PATCH 04/15] vb2: add debugging code to check for unbalanced ops

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil When a vb2_queue is freed check if all the mem_ops and queue ops were balanced. So the number of calls to e.g. buf_finish has to match the number of calls to buf_prepare, etc. This code is only enabled if CONFIG_VIDEO_ADV_DEBUG is set. Signed-off-by: Hans Verkuil Acked-by: P

[REVIEWv2 PATCH 00/15] vb2: fixes, balancing callbacks (PART 1)

2014-02-25 Thread Hans Verkuil
My previous patch series had a bug in patch 12/14 and I found a new bug as well that had to be fixed. Changes since REVIEWv1: - patch 12/14 has been replaced with a new patch that really fixes the problem - a new patch 14 was added to fix a streamoff problem. This patch series is the second REVI

Re: Problem with PCTV Systems nanoStick T2 290e and frontends

2014-02-25 Thread Mauro Carvalho Chehab
Em Tue, 25 Feb 2014 09:22:28 +0100 (SNT) Peter Fassberg escreveu: > > Hi! > > I have an PCTV Systems nanoStick T2 290e. > > It shows up very differently with different kernels, and it seems to work > better (DVB-C support) in an OLDER kernel. > > Old kernel is using em28xx and showing two fr

Re: [PATCH v5 2/7] v4l: Use full 32 bits for buffer flags

2014-02-25 Thread Hans Verkuil
On 02/25/14 12:44, 'Sakari Ailus' wrote: > Hi Kamil and Hans, > > On Mon, Feb 24, 2014 at 05:13:49PM +0100, Kamil Debski wrote: >>> From: Sakari Ailus [mailto:sakari.ai...@iki.fi] >>> Sent: Monday, February 24, 2014 4:35 PM >>> >>> Hans Verkuil wrote: On 02/15/2014 09:53 PM, Sakari Ailus wrot

Re: [PATCH v5 2/7] v4l: Use full 32 bits for buffer flags

2014-02-25 Thread 'Sakari Ailus'
Hi Kamil and Hans, On Mon, Feb 24, 2014 at 05:13:49PM +0100, Kamil Debski wrote: > > From: Sakari Ailus [mailto:sakari.ai...@iki.fi] > > Sent: Monday, February 24, 2014 4:35 PM > > > > Hans Verkuil wrote: > > > On 02/15/2014 09:53 PM, Sakari Ailus wrote: > > >> The buffer flags field is 32 bits b

[RFCv1 PATCH 0/2] Add viloop and vioverlay drivers

2014-02-25 Thread Hans Verkuil
Hi all, I wanted to share these two drivers, even though they need more work, particular w.r.t. code quality. They assume that PART 1 and PART 2 of the vb2 patch series are applied. The viloop driver loops video from one device to another. It will create pairs of video devices, the first an outp

[RFCv1 PATCH 2/2] vioverlay: add video overlay test driver

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil This driver creates a framebuffer, a video output device and a video capture device which shows the framebuffer blended with the contents of the output device. This can be combined with vivi to have both a capture overlay (vivi overlaying the video into the framebuffer) and an

[RFCv1 PATCH 1/2] viloop: add video loopback driver

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Create a virtual video loopback driver. It is by default singleplanar, but by loading it with multiplanar=1 it can be set to multiplanar mode. Signed-off-by: Hans Verkuil --- drivers/media/platform/Kconfig | 24 +- drivers/media/platform/Makefile |1 + drivers/media/p

[RFCv1 PATCH 13/13] mem2mem_testdev: improve field handling

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil try_fmt should just set field to NONE and not return an error if a different field was passed. buf_prepare should check if the field passed in from userspace has a supported field value. At the moment only NONE is supported and ANY is mapped to NONE. Signed-off-by: Hans Verku

[RFCv1 PATCH 06/13] vivi: add support for a video overlay

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Signed-off-by: Hans Verkuil --- drivers/media/platform/vivi.c | 330 +- 1 file changed, 328 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/vivi.c b/drivers/media/platform/vivi.c index 49a8f89..349d61f 100644 --- a/dr

[RFCv1 PATCH 08/13] mem2mem_testdev: pick default format with try_fmt.

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil This resolves an issue raised by v4l2-compliance. Signed-off-by: Hans Verkuil --- drivers/media/platform/mem2mem_testdev.c | 12 ++-- 1 file changed, 10 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/media/platform/mem

[RFCv1 PATCH 12/13] mem2mem_testdev: fix field, sequence and time copying

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil - Set the sequence counters correctly. - Copy timestamps, timecode, relevant buffer flags and field from the received buffer to the outgoing buffer. Signed-off-by: Hans Verkuil --- drivers/media/platform/mem2mem_testdev.c | 23 +++ 1 file changed, 23 in

[RFCv1 PATCH 07/13] mem2mem_testdev: use 40ms default transfer time.

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil The default of 1 second is a bit painful, switch to a 25 Hz framerate. Signed-off-by: Hans Verkuil --- drivers/media/platform/mem2mem_testdev.c | 8 +++- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/med

[RFCv1 PATCH 03/13] DocBook: fix incorrect code example

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil The code said for (i = 0; i > 30; ++i) instead of i < 30. Fix this and clean it up a bit at the same time. Signed-off-by: Hans Verkuil --- Documentation/DocBook/media/v4l/dev-osd.xml | 22 +++--- 1 file changed, 11 insertions(+), 11 deletions(-) diff --git

[RFCv1 PATCH 11/13] mem2mem_testdev: return pending buffers in stop_streaming()

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil To keep the list administration in balance stop_streaming() should return any pending buffers to the vb2 framework. Signed-off-by: Hans Verkuil --- drivers/media/platform/mem2mem_testdev.c | 20 1 file changed, 20 insertions(+) diff --git a/drivers/medi

[RFCv1 PATCH 09/13] mem2mem_testdev: set priv to 0

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil v4l2_compliance fix. Signed-off-by: Hans Verkuil --- drivers/media/platform/mem2mem_testdev.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/media/platform/mem2mem_testdev.c index 886d475..0745d1a 100644 --- a/drivers/

[RFCv1 PATCH 10/13] mem2mem_testdev: add USERPTR support.

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil There is no reason why we shouldn't enable this here. Signed-off-by: Hans Verkuil --- drivers/media/platform/mem2mem_testdev.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/media/platform/mem2mem_t

[RFCv1 PATCH 04/13] vivi: fix ENUM_FRAMEINTERVALS implementation

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil This function never checked if width and height are correct. Add such a check so the v4l2-compliance tool returns OK again for vivi. Signed-off-by: Hans Verkuil --- drivers/media/platform/vivi.c | 6 +- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers

[RFCv1 PATCH 01/13] v4l2-ioctl: add CREATE_BUFS sanity checks.

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Many drivers do not check anything. At least make sure that the various buffer size related fields are not obviously wrong. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/v4l2-ioctl.c | 52 ++-- 1 file changed, 50 insertions(+), 2 del

[RFCv1 PATCH 00/13] core, vivi and mem2mem_testdev fixes

2014-02-25 Thread Hans Verkuil
This patch series builds on the vb2 PART 2 patch series that was just posted. It's a bit of a mix: Patch 1 adds some core sanity checks for CREATE_BUFS. Patch 2 fixes a bug I found while testing overlay support, and in particular with the VIDIOC_G_FMT ioctl and struct v4l2_window. Too many field

[RFCv1 PATCH 05/13] vivi: add multiplanar support

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Add a new multiplanar module option. If set to 1, switch to the multiplanar BUF_TYPE. This makes it possible to test multiplanar formats in applications without requiring access to often hard-to-find hardware. Signed-off-by: Hans Verkuil --- drivers/media/platform/vivi.c |

[RFCv1 PATCH 02/13] v4l2-ioctl: clips, clipcount and bitmap should not be zeroed.

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Otherwise you cannot get the current clip and bitmap information from an overlay. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/v4l2-ioctl.c | 26 +- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-

[RFCv1 PATCH 18/20] vb2: reject output buffers with V4L2_FIELD_ALTERNATE

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil This is not allowed by the spec and does in fact not make any sense. Return -EINVAL if this is the case. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-core.c | 9 + 1 file changed, 9 insertions(+) diff --git a/drivers/media/v4l2-core/videobuf2-co

[RFCv1 PATCH 01/20] vb2: stop_streaming should return void

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil The vb2 core ignores any return code from the stop_streaming op. And there really isn't anything it can do anyway in case of an error. So change the return type to void and update any drivers that implement it. The int return gave drivers the idea that this operation could act

[RFCv1 PATCH 12/20] vb2: use correct prefix

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil The __qbuf_mmap/userptr/dmabuf all uses similar dprintk's, all using the same 'qbuf' prefix. Replace this by the actual function name so I can see which dprintk is actually executed. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-core.c | 48 ++

[RFCv1 PATCH 09/20] vb2-dma-sg: add get_dmabuf

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Add DMABUF export support to vb2-dma-sg. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-dma-sg.c | 170 + 1 file changed, 170 insertions(+) diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v4l2-core/vide

[RFCv1 PATCH 02/20] vb2: fix handling of data_offset and v4l2_plane.reserved[]

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil The videobuf2-core did not zero the reserved array of v4l2_plane as it should. More serious is the fact that data_offset was not handled correctly: - for capture devices it was never zeroed, which meant that it was uninitialized. Unless the driver sets it it was a completel

[RFCv1 PATCH 11/20] vb2: improve buf_prepare/finish comments

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Clarify in the buf_prepare/finish ops what the dma mapping status is of the provided buffer. Signed-off-by: Hans Verkuil --- include/media/videobuf2-core.h | 10 ++ 1 file changed, 6 insertions(+), 4 deletions(-) diff --git a/include/media/videobuf2-core.h b/include

[RFCv1 PATCH 06/20] vb2: memop prepare: return errors

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil For vb2-dma-sg the dma_map_sg function can return an error. This means that the prepare memop also needs to change so an error can be returned. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-dma-contig.c | 5 +++-- drivers/media/v4l2-core/videobuf2-dma-sg.

[RFCv1 PATCH 10/20] vb2-vmalloc: add get_dmabuf support

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Add support for DMABUF exporting to the vb2-vmalloc implementation. All memory models now have support for both importing and exporting of DMABUFs. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-vmalloc.c | 174 1 file changed

[RFCv1 PATCH 08/20] vb2-dma-sg: add dmabuf import support

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Add support for dmabuf to vb2-dma-sg. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-dma-sg.c | 125 +++-- 1 file changed, 118 insertions(+), 7 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-dma-sg.c b/drivers/media/v

[RFCv1 PATCH 16/20] vb2: fix timecode and flags handling for output buffers

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil When sending a buffer to a video output device some of the fields need to be copied so they arrive in the driver. These are the KEY/P/BFRAME flags and the TIMECODE flag, and, if that flag is set, the timecode field itself. There are a number of functions involved in this: the

[RFCv1 PATCH 05/20] vb2-dma-sg: add prepare/finish memops

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Now that vb2-dma-sg will sync the buffers for you in the prepare/finish memops we can drop that from the drivers that use dma-sg. For the solo6x10 driver that was a bit more involved because it needs to copy JPEG or MPEG headers to the buffer before returning it to userspace,

[RFCv1 PATCH 07/20] vb2: call memop prepare before the buf_prepare op is called

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil The prepare memop now returns an error, so we need to be able to handle that. In addition, prepare has to be called before buf_prepare since in the dma-sg case buf_prepare expects that the dma memory is mapped and it can use the sg_table. So call the prepare memop before calli

[RFCv1 PATCH 04/20] vb2-dma-sg: add allocation context to dma-sg

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Require that dma-sg also uses an allocation context. This is in preparation for adding prepare/finish memops to sync the memory between DMA and CPU. Signed-off-by: Hans Verkuil --- drivers/media/platform/marvell-ccic/mcam-core.c| 7 drivers/media/platform/marvell-c

[RFCv1 PATCH 20/20] vb2: simplify a confusing condition.

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil q->start_streaming_called is always true, so the WARN_ON check against it being false can be dropped. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-core.c | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/drivers/media/v4l2-core/vid

[RFCv1 PATCH 14/20] vb2: allow read/write as long as the format is single planar

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil It was impossible to read() or write() a frame if the queue type was multiplanar. Even if the current format is single planar. Change this to just check whether the number of planes is 1 or more. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-core.c | 21

[RFCv1 PATCH 17/20] vb2: set timestamp when using write()

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil When using write() to write data to an output video node the vb2 core should set timestamps if V4L2_BUF_FLAG_TIMESTAMP_COPY is set. Nobody else is able to provide this information with the write() operation. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-c

[RFCv1 PATCH 19/20] vb2: add vb2_fileio_is_active and check it more often

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Added a vb2_fileio_is_active inline function that returns true if fileio is in progress. Use it in the source. Check for this too in mmap() (you don't want apps mmap()ing buffers used by fileio) and expbuf() (same reason). In addition drivers should be able to check for this i

[RFCv1 PATCH 03/20] vb2: if bytesused is 0, then fill with output buffer length

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil The application should really always fill in bytesused for output buffers, unfortunately the vb2 framework never checked for that. So for single planar formats replace a bytesused of 0 by the length of the buffer, and for multiplanar format do the same if bytesused is 0 for AL

[RFCv1 PATCH 13/20] vb2: move __qbuf_mmap before __qbuf_userptr

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil __qbuf_mmap was sort of hidden in between the much larger __qbuf_userptr and __qbuf_dmabuf functions. Move it before __qbuf_userptr which is also conform the usual order these memory models are implemented: first mmap, then userptr, then dmabuf. Signed-off-by: Hans Verkuil --

[RFCv1 PATCH 15/20] vb2: replace 'write' by 'dma_dir'

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil The 'write' argument is very ambiguous. I first assumed that if it is 1, then we're doing video output but instead it meant the reverse. Since it is used to setup the dma_dir value anyway it is now replaced by the correct dma_dir value which is unambiguous. Signed-off-by: Han

[RFCv1 PATCH 00/20] vb2: more fixes, add dmabuf/expbuf (PART 2)

2014-02-25 Thread Hans Verkuil
Hi all, This patch series follows on from PART 1: the REVIEWv1 vb2 patch series just posted. Patches 1-3 and 11-20 are various code improvements and fixes based on extensive testing with v4l2-compliance and several test drivers (vivi and viloop, to be posted later). Patches 4-10 add support for

Re: [PATCH v5 04/10] V4L: Add driver for s5k6a3 image sensor

2014-02-25 Thread Baruch Siach
Hi Sylwester, On Tue, Feb 25, 2014 at 10:46:58AM +0100, Sylwester Nawrocki wrote: > On 24/02/14 20:38, Baruch Siach wrote: > > On Mon, Feb 24, 2014 at 06:35:16PM +0100, Sylwester Nawrocki wrote: > >> > This patch adds subdev driver for Samsung S5K6A3 raw image sensor. > >> > As it is intended at t

[REVIEWv1 PATCH 12/14] vb2: properly clean up PREPARED and QUEUED buffers

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil In queue_cancel we need to call the finish memop for any pending buffers in the PREPARED or QUEUED state. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-core.c | 20 +--- 1 file changed, 17 insertions(+), 3 deletions(-) diff --git a/driver

[REVIEWv1 PATCH 11/14] vb2: only call start_streaming if sufficient buffers are queued

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil In commit 02f142ecd24aaf891324ffba8527284c1731b561 support was added to start_streaming to return -ENOBUFS if insufficient buffers were queued for the DMA engine to start. The vb2 core would attempt calling start_streaming again if another buffer would be queued up. Later anal

[REVIEWv1 PATCH 02/14] vb2: fix read/write regression

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Commit 88e268702bfba78448abd20a31129458707383aa ("vb2: Improve file I/O emulation to handle buffers in any order") broke read/write support if the size of the buffer being read/written is less than the size of the image. When the commit was tested originally I used qv4l2, whic

[REVIEWv1 PATCH 05/14] vb2: change result code of buf_finish to void

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil The buf_finish op should always work, so change the return type to void. Update the few drivers that use it. Note that buf_finish can be called both when the DMA is streaming and when it isn't (during queue_cancel). Update drivers to check that where appropriate. Signed-off-by

[REVIEWv1 PATCH 03/14] vb2: fix PREPARE_BUF regression

2014-02-25 Thread Hans Verkuil
Fix an incorrect test in vb2_internal_qbuf() where only DEQUEUED buffers are allowed. But PREPARED buffers are also OK. Introduced by commit 4138111a27859dcc56a5592c804dd16bb12a23d1 ("vb2: simplify qbuf/prepare_buf by removing callback"). Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/

[REVIEWv1 PATCH 06/14] vb2: add note that buf_finish can be called with !vb2_is_streaming()

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Drivers need to be aware that buf_finish can be called when there is no streaming going on, so make a note of that. Also add a bunch of missing periods at the end of sentences. Signed-off-by: Hans Verkuil Acked-by: Pawel Osciak --- include/media/videobuf2-core.h | 44 +

[REVIEWv1 PATCH 09/14] vb2: rename queued_count to owned_by_drv_count

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil 'queued_count' is a bit vague since it is not clear to which queue it refers to: the vb2 internal list of buffers or the driver-owned list of buffers. Rename to make it explicit. Signed-off-by: Hans Verkuil Acked-by: Pawel Osciak --- drivers/media/v4l2-core/videobuf2-core.

[REVIEWv1 PATCH 14/14] vivi: correctly cleanup after a start_streaming failure

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil If start_streaming fails then any queued buffers must be given back to the vb2 core. Signed-off-by: Hans Verkuil --- drivers/media/platform/vivi.c | 12 +++- 1 file changed, 11 insertions(+), 1 deletion(-) diff --git a/drivers/media/platform/vivi.c b/drivers/media/p

[REVIEWv1 PATCH 10/14] vb2: don't init the list if there are still buffers

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil __vb2_queue_free() would init the queued_list at all times, even if q->num_buffers > 0. This should only happen if num_buffers == 0. This situation can happen if a CREATE_BUFFERS call couldn't allocate enough buffers and had to free those it did manage to allocate before retur

[REVIEWv1 PATCH 07/14] vb2: call buf_finish from __dqbuf

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil This ensures that it is also called from queue_cancel, which also calls __dqbuf(). Without this change any time queue_cancel is called while streaming the buf_finish op will not be called and any driver cleanup will not happen. Signed-off-by: Hans Verkuil Acked-by: Pawel Osci

[REVIEWv1 PATCH 13/14] vb2: replace BUG by WARN_ON

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil No need to oops for this, WARN_ON is good enough. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/videobuf2-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/v4l2-core/videobuf2-core.c b/drivers/media/v4l2-core/videobuf2-

[REVIEWv1 PATCH 01/14] vb2: Check if there are buffers before streamon

2014-02-25 Thread Hans Verkuil
From: Ricardo Ribalda Delgado This patch adds a test preventing streamon() if there is no buffer ready. Without this patch, a user could call streamon() before preparing any buffer. This leads to a situation where if he calls close() before calling streamoff() the device is kept streaming. Sign

[REVIEWv1 PATCH 04/14] vb2: add debugging code to check for unbalanced ops

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil When a vb2_queue is freed check if all the mem_ops and queue ops were balanced. So the number of calls to e.g. buf_finish has to match the number of calls to buf_prepare, etc. This code is only enabled if CONFIG_VIDEO_ADV_DEBUG is set. Signed-off-by: Hans Verkuil Acked-by: P

[REVIEWv1 PATCH 08/14] vb2: fix buf_init/buf_cleanup call sequences

2014-02-25 Thread Hans Verkuil
From: Hans Verkuil Ensure that these ops are properly balanced. There are two scenarios: 1) for MMAP buf_init is called when the buffers are created and buf_cleanup must be called when the queue is finally freed. This scenario was always working. 2) for USERPTR and DMABUF it is more comp

[REVIEWv1 PATCH 00/16] vb2: fixes, balancing callbacks (PART 1)

2014-02-25 Thread Hans Verkuil
This patch series is the first REVIEW series as opposed to RFC. It follows RFCv4: http://www.spinics.net/lists/linux-media/msg73039.html This is part 1 of vb2 changes. I will post a part 2 RFC series soon for more vb2 fixes and enhancements. Ignore patches 1-3: the first is already merged in 3.1

Re: [PATCH v5 04/10] V4L: Add driver for s5k6a3 image sensor

2014-02-25 Thread Sylwester Nawrocki
Hi Baruch, On 24/02/14 20:38, Baruch Siach wrote: > On Mon, Feb 24, 2014 at 06:35:16PM +0100, Sylwester Nawrocki wrote: >> > This patch adds subdev driver for Samsung S5K6A3 raw image sensor. >> > As it is intended at the moment to be used only with the Exynos >> > FIMC-IS (camera ISP) subsystem i

[PATCH v2] media: soc_camera: rcar_vin: Add support for 10-bit YUV cameras

2014-02-25 Thread Phil Edworthy
Signed-off-by: Phil Edworthy --- v2: - Fix silly mistake with missing break. drivers/media/platform/soc_camera/rcar_vin.c |9 + 1 file changed, 9 insertions(+) diff --git a/drivers/media/platform/soc_camera/rcar_vin.c b/drivers/media/platform/soc_camera/rcar_vin.c index 3b1c05a..

  1   2   >