Re: [PATCH v2] omap3isp: Use monotonic timestamps for statistics buffers

2012-09-14 Thread Sakari Ailus
Thanks, Laurent! On Fri, Sep 14, 2012 at 11:57:48PM +0200, Laurent Pinchart wrote: > V4L2 buffers use the monotonic clock, while statistics buffers use wall > time. This makes it difficult to correlate video frames and statistics. > > Switch statistics buffers to the monotonic clock to fix this,

Re: [PATCHSET] kthread_worker: reimplement flush_kthread_work() to allow freeing during execution

2012-09-14 Thread Colin Cross
On Thu, Jul 19, 2012 at 2:15 PM, Tejun Heo wrote: > Hello, > > kthread_worker was introduced together with concurrency managed > workqueue to serve workqueue users which need a special dedicated > worker - e.g. RT scheduling. This is minimal queue / flush / flush > all iterface on top of kthread

Re: Improving ov7670 sensor driver.

2012-09-14 Thread Laurent Pinchart
Hi Javier, On Thursday 13 September 2012 11:48:17 javier Martin wrote: > Hi, > our new i.MX27 based platform (Visstrim-SM20) uses an ov7675 sensor > attached to the CSI interface. Apparently, this sensor is fully > compatible with the old ov7670. For this reason, it seems rather > sensible that th

[PATCH v2] omap3isp: Use monotonic timestamps for statistics buffers

2012-09-14 Thread Laurent Pinchart
V4L2 buffers use the monotonic clock, while statistics buffers use wall time. This makes it difficult to correlate video frames and statistics. Switch statistics buffers to the monotonic clock to fix this, and replace struct timeval with struct timespec. Reported-by: Antoine Reversat Signed-off-

Re: [PATCH] omap3isp: Use monotonic timestamps for statistics buffers

2012-09-14 Thread Laurent Pinchart
Hi Sakari, On Friday 14 September 2012 00:01:39 Sakari Ailus wrote: > On Thu, Sep 13, 2012 at 09:53:23PM +0200, Laurent Pinchart wrote: > > V4L2 buffers use the monotonic clock, while statistics buffers use wall > > time. This makes it difficult to correlate video frames and statistics. > > > > S

Re: [RFCv3 API PATCH 00/31] Full series of API fixes from the 2012 Media Workshop

2012-09-14 Thread Sakari Ailus
Hans Verkuil wrote: Hi all, This is the full patch series containing API fixes as discussed during the 2012 Media Workshop. Regarding the 'make ioctl const' patches: I've only done the easy ones in this patch series. The remaining write-only ioctls are used much more widely, so changing those w

Re: [RFCv3 API PATCH 15/31] v4l2-core: Add new V4L2_CAP_MONOTONIC_TS capability.

2012-09-14 Thread Sakari Ailus
Hi Rémi, Rémi Denis-Courmont wrote: Le vendredi 14 septembre 2012 23:25:01, Sakari Ailus a écrit : I had a quick discussion with Laurent, and what he suggested was to use the kernel version to figure out the type of the timestamp. The drivers that use the monotonic time right now wouldn't be af

Re: how to crop/scale in mono-subdev camera sensor driver?

2012-09-14 Thread Sylwester Nawrocki
Hi, On 09/14/2012 05:00 PM, Nicolas THERY wrote: > Hello, > > I'm studying how to support cropping and scaling (binning, skipping, digital > scaling if any) for different models for camera sensor drivers. There seems > to > be (at least) two kinds of sensor drivers: > > 1) The smiapp driver ha

Re: [RFCv3 API PATCH 15/31] v4l2-core: Add new V4L2_CAP_MONOTONIC_TS capability.

2012-09-14 Thread Rémi Denis-Courmont
Le vendredi 14 septembre 2012 23:25:01, Sakari Ailus a écrit : > I had a quick discussion with Laurent, and what he suggested was to use > the kernel version to figure out the type of the timestamp. The drivers > that use the monotonic time right now wouldn't be affected by the new > flag on older

Re: [RFCv3 API PATCH 15/31] v4l2-core: Add new V4L2_CAP_MONOTONIC_TS capability.

2012-09-14 Thread Sakari Ailus
Hi Hans, Thanks for the patch. Hans Verkuil wrote: ... --- a/include/linux/videodev2.h +++ b/include/linux/videodev2.h @@ -290,6 +290,7 @@ struct v4l2_capability { #define V4L2_CAP_ASYNCIO0x0200 /* async I/O */ #define V4L2_CAP_STREAMING 0x0400 /* stre

[PATCH v2] davinci: vpif: capture/display: fix race condition

2012-09-14 Thread Prabhakar Lad
From: Lad, Prabhakar channel_first_int[][] variable is used as a flag for the ISR, This flag was being set after enabling the interrupts, There where situations when the isr occurred even before the flag was set due to which it was causing the application hang. This patch sets channel_first_int[]

Re: [PATCH 3/4] videobuf2-dma-streaming: new videobuf2 memory allocator

2012-09-14 Thread Ezequiel Garcia
Hi Jon, On Thu, Sep 13, 2012 at 2:54 PM, Jonathan Corbet wrote: > > Well, there is some documentation here: > > https://lwn.net/Articles/447435/ > I thank you for this. It really helped me getting started on videobuf2. > This reminds me that I've always meant to turn it into something

cron job: media_tree daily build: ERRORS

2012-09-14 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:Fri Sep 14 19:02:16 CEST 2012 git hash:780d61704cf62a51c06c0ca8210d0282591e00b2 gcc version: i686-linux-gcc (GC

Re: [RFCv3 API PATCH 31/31] Add vfl_dir field documentation.

2012-09-14 Thread Hans Verkuil
On Fri September 14 2012 19:34:56 Sylwester Nawrocki wrote: > On 09/14/2012 12:57 PM, Hans Verkuil wrote: > > Signed-off-by: Hans Verkuil > > --- > > Documentation/video4linux/v4l2-framework.txt |9 - > > 1 file changed, 8 insertions(+), 1 deletion(-) > > > > diff --git a/Documentati

Re: [RFCv3 API PATCH 28/31] Set vfl_dir for all display or m2m drivers.

2012-09-14 Thread Sylwester Nawrocki
On 09/14/2012 12:57 PM, Hans Verkuil wrote: Signed-off-by: Hans Verkuil --- drivers/media/pci/ivtv/ivtv-streams.c |3 +++ drivers/media/pci/zoran/zoran_card.c |4 drivers/media/platform/coda.c |1 + drivers/media/platform/davinci/vpbe_display

Re: [RFCv3 API PATCH 31/31] Add vfl_dir field documentation.

2012-09-14 Thread Sylwester Nawrocki
On 09/14/2012 12:57 PM, Hans Verkuil wrote: Signed-off-by: Hans Verkuil --- Documentation/video4linux/v4l2-framework.txt |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt i

Re: [RFCv3 API PATCH 06/31] vivi/mem2mem_testdev: update to latest bus_info specification.

2012-09-14 Thread Sylwester Nawrocki
On 09/14/2012 12:57 PM, Hans Verkuil wrote: Prefix bus_info with "platform:". Signed-off-by: Hans Verkuil Looks good to me, Acked-by: Sylwester Nawrocki --- drivers/media/platform/mem2mem_testdev.c |3 ++- drivers/media/platform/vivi.c|3 ++- 2 files changed, 4 inse

[PATCH] drivers/media/platform/davinci/vpbe.c: Remove unused label and rename remaining labels

2012-09-14 Thread Peter Senna Tschudin
From: Peter Senna Tschudin Remove unused label and rename remaining labels Signed-off-by: Peter Senna Tschudin --- Depends on patch [v2,7/8] drivers/media/platform/davinci/vpbe.c: Removes useless kfree() - http://patchwork.linuxtv.org/patch/14307/ drivers/media/platform/davinci/vpbe.c | 25

how to crop/scale in mono-subdev camera sensor driver?

2012-09-14 Thread Nicolas THERY
Hello, I'm studying how to support cropping and scaling (binning, skipping, digital scaling if any) for different models for camera sensor drivers. There seems to be (at least) two kinds of sensor drivers: 1) The smiapp driver has 2 or 3 subdevs: pixel array -> binning (-> scaling). It gives cli

Re: [PATCH 3/6] HID: picoLCD: Add support for CIR

2012-09-14 Thread Mauro Carvalho Chehab
Em 19-08-2012 14:32, Bruno Prémont escreveu: > Implement support for picoLCD's CIR header using RC_CORE for decoding > the IR event stream. > > Signed-off-by: Bruno Prémont Sorry for a late answer. I'm with a huge backlog due to KS/2012 workshop. Acked-by: Mauro Carvalho Chehab > --- > drive

[PATCH] davinci: vpif: remove unwanted header file inclusion

2012-09-14 Thread Prabhakar Lad
From: Hans Verkuil Remove old videobuf-core.h includes. Signed-off-by: Hans Verkuil Signed-off-by: Lad, Prabhakar --- drivers/media/platform/davinci/vpif_capture.h |1 - drivers/media/platform/davinci/vpif_display.h |1 - 2 files changed, 0 insertions(+), 2 deletions(-) diff --git a/

Re: [PATCH] davinci: vpif: capture/display: fix race condition

2012-09-14 Thread Sergei Shtylyov
Hello. On 09/14/2012 05:53 PM, Prabhakar Lad wrote: > From: Lad, Prabhakar > channel_first_int[][] variable is used as a flag for the ISR, > This flag was being set after enabling the interrupts, There > where suitaions when the isr ocuurend even before the flag was set s/suitaions/situatio

[PATCH] davinci: vpif: capture/display: fix race condition

2012-09-14 Thread Prabhakar Lad
From: Lad, Prabhakar channel_first_int[][] variable is used as a flag for the ISR, This flag was being set after enabling the interrupts, There where suitaions when the isr ocuurend even before the flag was set dues to which it was causing the applicaiotn hang. This patch sets channel_first_int[

[PATCH 14/14] [media] davinci: vpfe: Add documentation

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli Add documentation on the Davinci VPFE driver. Document the subdevs, and private IOTCLs the driver implements Signed-off-by: Manjunath Hadli Signed-off-by: Lad, Prabhakar Cc: Rob Landley Cc: --- Documentation/video4linux/davinci-vpfe-mc.txt | 95 ++

[PATCH 07/14] davinci: vpfe: v4l2 capture driver with media interface

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli Add the vpfe capture driver which implements media controller interface. The driver suports all the setup functionality for all all units nnamely- ccdc, previewer, resizer, h3a, aew. The driver supports both dm365 and Dm355. The driver does isr registration, v4l2 device regi

[PATCH 06/14] davinci: vpfe: add v4l2 video driver support

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli add a generic video driver functionality to be used by all the vpfe drivers for davinci SoCs. The functionality includes all the standard v4l2 interfaces including streaming. The video node interface can be used both as an input and output node for both continuous and single

[PATCH 05/14] davinci: vpfe: add ccdc driver with media controller interface

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli Add the CCDC driver for davinci Dm3XX SoCs. The driver supports CCDC as a media entity with 2 pads - 1 input and 1 output. The driver implements streaming support and subdev interface. The ccdc supports bayer and YUV formats. Signed-off-by: Manjunath Hadli Signed-off-by: L

[PATCH 09/14] davinci: vpfe: resizer driver based on media framework

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli Add the video resizer driver with the v4l2 media controller framework which takes care of resizing the video frames with both up-scaling downscaling facility. The formats that is supported is YUV422. The driver supports both continuous mode where it works in tandem with the

[PATCH 11/14] dm365: vpss: set vpss clk ctrl

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli request_mem_region for VPSS_CLK_CTRL register and ioremap. and enable clocks appropriately. Signed-off-by: Manjunath Hadli Signed-off-by: Lad, Prabhakar --- drivers/media/platform/davinci/vpss.c | 11 +++ 1 files changed, 11 insertions(+), 0 deletions(-) diff

[PATCH 13/14] davinci: vpfe: build infrastructure for dm365

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli add build infrastructure for dm365 specific modules such as IPIPE, AEW, AF. Signed-off-by: Manjunath Hadli Signed-off-by: Lad, Prabhakar --- drivers/media/platform/davinci/Kconfig | 40 +- drivers/media/platform/davinci/Makefile |9

[PATCH 12/14] dm365: vpss: add vpss helper functions to be used in the main driver for setting hardware parameters

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli add function to set sync polarity , interrupt completion and pageframe size in vpss to be used by the main driver. Signed-off-by: Manjunath Hadli Signed-off-by: Lad, Prabhakar --- drivers/media/platform/davinci/vpss.c | 32 include/medi

[PATCH 10/14] dm365: vpss: setup ISP registers

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli enable PPCR, enbale ISIF out on BCR and disable all events. Signed-off-by: Manjunath Hadli Signed-off-by: Lad, Prabhakar --- drivers/media/platform/davinci/vpss.c | 13 + 1 files changed, 13 insertions(+), 0 deletions(-) diff --git a/drivers/media/platform

[PATCH 08/14] davinci: vpfe: previewer driver based on v4l2 media controller framework

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli Add the video previewer driver with the v4l2 media controller framework which takes care of converting the video frames from bayer to YUV or RGB. The driver supports both continuous mode where it works in tandem with the CCDC and single shot mode where it can be used in isol

[PATCH 02/14] davinci: vpfe: add IPIPE hardware layer support

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli add dm365 IPIPE hardware support. IPIPE is the hardware IP which implements the functionality required for resizer, previewer and the associated feature support. This is built along with the vpfe driver, and implements hardware setup including coeffcient programming for vari

[PATCH 01/14] davinci: vpfe: add dm3xx IPIPEIF hardware support module

2012-09-14 Thread Prabhakar Lad
From: Manjunath Hadli add support for dm3xx IPIPEIF hardware setup. This is the lowest software layer for the dm3x vpfe driver which directly accesses hardware. Add support for features like default pixel correction, dark frame substraction and hardware setup. Signed-off-by: Manjunath Hadli Sig

[PATCH 00/14] Media Controller capture driver for DM365

2012-09-14 Thread Prabhakar Lad
From: Lad, Prabhakar This patch set adds media controller based capture driver for DM365. This driver bases its design on Laurent Pinchart's Media Controller Design whose patches for Media Controller and subdev enhancements form the base. The driver also takes copious elements taken from Laurent

[RFCv1 API PATCH 3/4] v4l2-ctrls: add a filter function to v4l2_ctrl_add_handler.

2012-09-14 Thread Hans Verkuil
With a filter function you can control more precisely which controls are added. This is useful in particular for radio device nodes for combined TV/Radio cards where you want to show just the radio-specific controls and not controls like brightness. Signed-off-by: Hans Verkuil --- Documentation/

[RFCv1 API PATCH 2/4] v4l2-ctrls: add a notify callback.

2012-09-14 Thread Hans Verkuil
Sometimes platform/bridge drivers need to be notified when a control from a subdevice changes value. In order to support this a notify callback was added. Signed-off-by: Hans Verkuil --- Documentation/video4linux/v4l2-controls.txt | 22 ++ drivers/media/v4l2-core/v4l2-ctrls

[RFCv1 API PATCH 1/4] Two fixes and two v4l2-ctrl enhancements

2012-09-14 Thread Hans Verkuil
Hi all, The first and last patches are bug fixes, and the second and third add two new features to the control framework: The first new feature adds a notifier to a control. When set the notifier will be called whenever the control changes value. This feature is needed to allow bridge drivers to

[RFCv1 API PATCH 1/4] vb2: fix wrong owner check

2012-09-14 Thread Hans Verkuil
Check against q->fileio to see if the queue owner should be set or not. The former check against the return value of read or write is wrong, since read/write can return an error, even if the queue is in streaming mode. For example, EAGAIN when in non-blocking mode. Signed-off-by: Hans Verkuil ---

[RFCv1 API PATCH 4/4] tuner-core: map audmode to STEREO for radio devices.

2012-09-14 Thread Hans Verkuil
Fixes a v4l2-compliance error: setting audmode to a value other than mono or stereo for a radio device should map to MODE_STEREO. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/tuner-core.c |5 - 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-cor

[RFCv3 API PATCH 18/31] DocBook: Mark CROPCAP as optional instead of as compulsory.

2012-09-14 Thread Hans Verkuil
While the documentation says that VIDIOC_CROPCAP is compulsory for all video capture and output devices, in practice VIDIOC_CROPCAP is only implemented for devices that can do cropping and/or scaling. Update the documentation to no longer require VIDIOC_CROPCAP if the driver does not support cropp

[RFCv3 API PATCH 14/31] DocBook: fix awkward language and fix the documented return value.

2012-09-14 Thread Hans Verkuil
The Video Standard section contains some awkward language. It also wasn't updated when the error code for unimplemented ioctls changed from EINVAL to ENOTTY. Signed-off-by: Hans Verkuil --- Documentation/DocBook/media/v4l/common.xml | 30 +--- 1 file changed, 14 inserti

[RFCv3 API PATCH 16/31] Add V4L2_CAP_MONOTONIC_TS where applicable.

2012-09-14 Thread Hans Verkuil
Add the new V4L2_CAP_MONOTONIC_TS capability to those drivers that use monotomic timestamps instead of the system time. Signed-off-by: Hans Verkuil Acked-by: Sylwester Nawrocki Acked-by: Laurent Pinchart --- drivers/media/pci/cx18/cx18-ioctl.c |2 +- drivers/media/platform/davinc

[RFCv3 API PATCH 12/31] Rename V4L2_(IN|OUT)_CAP_CUSTOM_TIMINGS.

2012-09-14 Thread Hans Verkuil
The 'custom' timings are no longer just for custom timings, but also for standard CEA/VESA timings. So rename to V4L2_IN/OUT_CAP_DV_TIMINGS. The old define is still kept for backwards compatibility. This decision was taken during the 2012 Media Workshop. Signed-off-by: Hans Verkuil --- Docume

[RFCv3 API PATCH 06/31] vivi/mem2mem_testdev: update to latest bus_info specification.

2012-09-14 Thread Hans Verkuil
Prefix bus_info with "platform:". Signed-off-by: Hans Verkuil --- drivers/media/platform/mem2mem_testdev.c |3 ++- drivers/media/platform/vivi.c|3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/drivers/media/platform/mem2mem_testdev.c b/drivers/media/pla

[RFCv3 API PATCH 20/31] v4l2: make vidioc_s_jpegcomp const.

2012-09-14 Thread Hans Verkuil
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_jpegcomp. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil --- drivers/media/pci/zoran/zoran_driver.c |4 ++-- drivers/media/usb/cpi

[RFCv3 API PATCH 17/31] DocBook: clarify that sequence is also set for output devices.

2012-09-14 Thread Hans Verkuil
It was not entirely obvious that the sequence count should also be set for output devices. Also made it more explicit that this sequence counter counts frames, not fields. Signed-off-by: Hans Verkuil Reviewed-by: Sylwester Nawrocki --- Documentation/DocBook/media/v4l/io.xml |4 ++-- 1 file

[RFCv3 API PATCH 22/31] v4l2: make vidioc_(un)subscribe_event const.

2012-09-14 Thread Hans Verkuil
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_(un)subscribe_event. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil --- drivers/media/pci/ivtv/ivtv-ioctl.c |2 +- drivers/media/p

[RFCv3 API PATCH 24/31] v4l2: make vidioc_s_audout const.

2012-09-14 Thread Hans Verkuil
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_audout. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil --- drivers/media/pci/ivtv/ivtv-ioctl.c |6 -- drivers/media/radio/radio-si

[RFCv3 API PATCH 27/31] v4l2-dev: add new VFL_DIR_ defines.

2012-09-14 Thread Hans Verkuil
These will be used by v4l2-dev.c to improve ioctl checking. I.e. ioctls for capture should return -ENOTTY when called for an output device. Signed-off-by: Hans Verkuil --- include/media/v4l2-dev.h |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/include/media/v4l2-d

[RFCv3 API PATCH 15/31] v4l2-core: Add new V4L2_CAP_MONOTONIC_TS capability.

2012-09-14 Thread Hans Verkuil
Add a new flag that tells userspace that the monotonic clock is used for timestamps and update the documentation accordingly. We decided on this new flag during the 2012 Media Workshop. Signed-off-by: Hans Verkuil Reviewed-by: Sylwester Nawrocki Acked-by: Laurent Pinchart --- Documentation/Do

[RFCv3 API PATCH 30/31] v4l2-dev: reorder checks into blocks of ioctls with similar properties.

2012-09-14 Thread Hans Verkuil
This makes it easier to read and also ties in more closely with the profile concept. Signed-off-by: Hans Verkuil --- drivers/media/v4l2-core/v4l2-dev.c | 156 +--- 1 file changed, 74 insertions(+), 82 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-dev.c

[RFCv3 API PATCH 25/31] v4l2: make vidioc_s_modulator const.

2012-09-14 Thread Hans Verkuil
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_modulator. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil --- drivers/media/radio/radio-keene.c |2 +- drivers/media/radio/radio

[RFCv3 API PATCH 31/31] Add vfl_dir field documentation.

2012-09-14 Thread Hans Verkuil
Signed-off-by: Hans Verkuil --- Documentation/video4linux/v4l2-framework.txt |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/Documentation/video4linux/v4l2-framework.txt b/Documentation/video4linux/v4l2-framework.txt index 89318be..20f1c05 100644 --- a/Documentatio

[RFCv3 API PATCH 29/31] v4l2-dev: improve ioctl validity checks.

2012-09-14 Thread Hans Verkuil
The ioctl validity checks have been improved and now take vfl_type and vfl_dir into account. During the 2012 Media Workshop it was decided that these improved v4l2 core checks should be added as they simplified drivers and made drivers behave consistently. Signed-off-by: Hans Verkuil --- driver

[RFCv3 API PATCH 26/31] v4l2: make vidioc_s_crop const.

2012-09-14 Thread Hans Verkuil
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_crop. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil --- drivers/media/i2c/soc_camera/mt9m001.c |2 +- drivers/media/i2c/s

[RFCv3 API PATCH 21/31] v4l2: make vidioc_s_freq_hw_seek const.

2012-09-14 Thread Hans Verkuil
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_freq_hw_seek. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil --- drivers/media/radio/radio-mr800.c|2 +- drivers/media

[RFCv3 API PATCH 23/31] v4l2: make vidioc_s_audio const.

2012-09-14 Thread Hans Verkuil
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_audio. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil --- drivers/media/pci/bt8xx/bttv-driver.c |4 ++-- drivers/media/pci/cx1

[RFCv3 API PATCH 28/31] Set vfl_dir for all display or m2m drivers.

2012-09-14 Thread Hans Verkuil
Signed-off-by: Hans Verkuil --- drivers/media/pci/ivtv/ivtv-streams.c |3 +++ drivers/media/pci/zoran/zoran_card.c |4 drivers/media/platform/coda.c |1 + drivers/media/platform/davinci/vpbe_display.c |1 + drivers/media/platform/davinci/vpif_

[RFCv3 API PATCH 08/31] DocBook: deprecate V4L2_BUF_TYPE_PRIVATE.

2012-09-14 Thread Hans Verkuil
As per decision taken during the 2012 Media Workshop. Signed-off-by: Hans Verkuil --- Documentation/DocBook/media/v4l/compat.xml |2 +- Documentation/DocBook/media/v4l/io.xml | 14 ++ Documentation/DocBook/media/v4l/vidioc-cropcap.xml |6 ++ Docum

[RFCv3 API PATCH 11/31] v4l2-core: tvnorms may be 0 for a given input, handle that case.

2012-09-14 Thread Hans Verkuil
Currently the core code looks at tvnorms to see whether ENUMSTD or G_PARM should be enabled. This is not a good check for drivers that support the STD API on one input and the DV Timings API on another. In that case tvnorms may be 0. Instead check whether s_std is present (for ENUMSTD) or whether

[RFCv3 API PATCH 19/31] v4l2: make vidioc_s_fbuf const.

2012-09-14 Thread Hans Verkuil
Write-only ioctls should have a const argument in the ioctl op. Do this conversion for vidioc_s_fbuf. Adding const for write-only ioctls was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil --- drivers/media/common/saa7146/saa7146_video.c |2 +- drivers/media/pci/bt8xx/b

[RFCv3 API PATCH 09/31] v4l2: remove experimental tag from a number of old drivers.

2012-09-14 Thread Hans Verkuil
A number of old drivers still had the experimental tag. Time to remove it. It concerns the following drivers: VIDEO_TLV320AIC23B USB_STKWEBCAM VIDEO_CX18 VIDEO_CX18_ALSA VIDEO_ZORAN_AVS6EYES DVB_USB_AF9005 MEDIA_TUNER_TEA5761 VIDEO_NOON010PC30 This decision was taken during the 2012 Media Worksh

[RFCv3 API PATCH 13/31] Feature removal: Remove CUSTOM_TIMINGS defines in 3.9.

2012-09-14 Thread Hans Verkuil
These have been replaced by new defines without the "CUSTOM_" part. Get rid of the old ones. Signed-off-by: Hans Verkuil --- Documentation/feature-removal-schedule.txt |9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/feature-removal-schedule.txt b/Documentation/feat

[RFCv3 API PATCH 10/31] DocBook: document when to return ENODATA.

2012-09-14 Thread Hans Verkuil
ENODATA should be returned if the API used for getting, changing, querying or enumerating the current video timings is not supported by the current input or output. This was decided during the 2012 Media Workshop. Signed-off-by: Hans Verkuil --- .../DocBook/media/v4l/vidioc-enum-dv-presets.xml

[RFCv3 API PATCH 01/31] v4l: Remove experimental tag from certain API elements

2012-09-14 Thread Hans Verkuil
From: Sakari Ailus Remove experimantal tag from the following API elements: V4L2_BUF_TYPE_VIDEO_OUTPUT_OVERLAY buffer type. V4L2_CAP_VIDEO_OUTPUT_OVERLAY capability flag. VIDIOC_ENUM_FRAMESIZES IOCTL. VIDIOC_ENUM_FRAMEINTERVALS IOCTL. VIDIOC_G_ENC_INDEX IOCTL. VIDIOC_ENCODER_CMD and VIDIOC_TRY_E

[RFCv3 API PATCH 04/31] DocBook: make the G/S/TRY_FMT specification more strict.

2012-09-14 Thread Hans Verkuil
- S/TRY_FMT should always succeed, unless an invalid type field is passed in. - TRY_FMT should give the same result as S_FMT, all other things being equal. - ENUMFMT may return different formats for different inputs or outputs. This was decided during the 2012 Media Workshop. Signed-off-by: Hans

[RFCv3 API PATCH 05/31] DocBook: bus_info can no longer be empty.

2012-09-14 Thread Hans Verkuil
During the 2012 Media Workshop it was decided that bus_info as returned by VIDIOC_QUERYCAP can no longer be empty. It should be a unique identifier, and empty strings are obviously not unique. Signed-off-by: Hans Verkuil Reviewed-by: Sylwester Nawrocki --- Documentation/DocBook/media/v4l/vidioc

[RFCv3 API PATCH 07/31] v4l2-core: deprecate V4L2_BUF_TYPE_PRIVATE

2012-09-14 Thread Hans Verkuil
This buffer type isn't used at all, and since it is effectively undefined what it should do it is deprecated. The define still exists, but any internal support for such buffers is removed. The decisions to deprecate this was taken during the 2012 Media Workshop. Signed-off-by: Hans Verkuil ---

[RFCv3 API PATCH 03/31] DocBook: improve STREAMON/OFF documentation.

2012-09-14 Thread Hans Verkuil
Specify that STREAMON/OFF should return 0 if the stream is already started/stopped. The spec never specified what the correct behavior is. This ambiguity was resolved during the 2012 Media Workshop. Signed-off-by: Hans Verkuil Reviewed-by: Sylwester Nawrocki Acked-by: Laurent Pinchart --- Doc

[RFCv3 API PATCH 00/31] Full series of API fixes from the 2012 Media Workshop

2012-09-14 Thread Hans Verkuil
Hi all, This is the full patch series containing API fixes as discussed during the 2012 Media Workshop. Regarding the 'make ioctl const' patches: I've only done the easy ones in this patch series. The remaining write-only ioctls are used much more widely, so changing those will happen later. The

RE: [PATCH] nommu: remap_pfn_range: fix addr parameter check

2012-09-14 Thread Bhupesh SHARMA
> -Original Message- > From: Bhupesh SHARMA > Sent: Friday, September 14, 2012 3:45 PM > To: 'Scott Jiang'; Andrew Morton > Cc: Bob Liu; linux...@kvack.org; laurent.pinch...@ideasonboard.com; > uclinux-dist-de...@blackfin.uclinux.org; linux-media@vger.kernel.org; > dhowe...@redhat.com; ge..

RE: [PATCH] nommu: remap_pfn_range: fix addr parameter check

2012-09-14 Thread Bhupesh SHARMA
> -Original Message- > From: Scott Jiang [mailto:scott.jiang.li...@gmail.com] > Sent: Friday, September 14, 2012 2:53 PM > To: Andrew Morton > Cc: Bob Liu; linux...@kvack.org; Bhupesh SHARMA; > laurent.pinch...@ideasonboard.com; uclinux-dist- > de...@blackfin.uclinux.org; linux-media@vger.k

[PATCH 3/6] [media] ds3000: properly report register read errors

2012-09-14 Thread Rémi Cardona
This brings both ds3000_readreg() and ds3000_tuner_readreg() in line with ds3000_writereg() and ds3000_tuner_writereg() respectively. Signed-off-by: Rémi Cardona --- drivers/media/dvb/frontends/ds3000.c | 11 +++ 1 file changed, 7 insertions(+), 4 deletions(-) diff --git a/drivers/med

[PATCH 5/6] [media] ds3000: properly report firmware probing issues

2012-09-14 Thread Rémi Cardona
ds3000_readreg() returns negative values in case of i2c failures. The old code would simply return 0 when failing to read the 0xb2 register, misleading ds3000_initfe() into believing that the firmware had been correctly loaded. Also print out a message if the chip says a firmware is already loaded

[PATCH 6/6] [media] ds3000: add module parameter to force firmware upload

2012-09-14 Thread Rémi Cardona
Signed-off-by: Rémi Cardona --- drivers/media/dvb/frontends/ds3000.c |9 - 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c index 970963c..3e0e9de 100644 --- a/drivers/media/dvb/frontends/ds3000.c

[PATCH 1/6] [media] ds3000: Declare MODULE_FIRMWARE usage

2012-09-14 Thread Rémi Cardona
Signed-off-by: Rémi Cardona --- drivers/media/dvb/frontends/ds3000.c |1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/dvb/frontends/ds3000.c b/drivers/media/dvb/frontends/ds3000.c index 4c8ac26..46874c7 100644 --- a/drivers/media/dvb/frontends/ds3000.c +++ b/drivers/media/dvb

[PATCH 4/6] [media] ds3000: bail out early on i2c failures during firmware load

2012-09-14 Thread Rémi Cardona
- if kmalloc() returns NULL, we can return immediately without trying to kfree() a NULL pointer. - if i2c_transfer() fails, error out immediately instead of trying to upload the remaining bytes of the firmware. - the error code is then properly propagated down to ds3000_initfe(). Signed-o

[PATCH 2/6] [media] ds3000: remove useless 'locking'

2012-09-14 Thread Rémi Cardona
Since b9bf2eafaad9c1ef02fb3db38c74568be601a43a, the function ds3000_firmware_ondemand() is called only once during init. This locking scheme may have been useful when the firmware was loaded at each tune. Furthermore, it looks like this 'lock' was put in to prevent concurrent access (and not recur

[PATCH v2 0/6] ds3000 improvements

2012-09-14 Thread Rémi Cardona
Hi all, Here is an updated and more complete patch series for ds3000. I've done my testing on top of kernel 3.5.2 and things look ok so far. Reviews and comments are again more than welcome. Cheers, Rémi Cardona -- SmartJog | T: +33 1 5868 6229 27 Blvd Hippolyte Marquès, 94200 Ivry-sur-Seine,

Re: Alignment problems: arm_memblock_steal() + dma_declare_coherent_memory()

2012-09-14 Thread Russell King - ARM Linux
On Fri, Sep 14, 2012 at 10:49:27AM +0200, javier Martin wrote: > Hello, > we use arm_memblock_steal() + dma_declare_coherent_memory() in order > to reserve son contiguous video memory in our platform: > http://git.linuxtv.org/media_tree.git/blob/refs/heads/staging/for_v3.7:/arch/arm/mach-imx/mach-i

[PATCH] [media] s5p-mfc: Remove unreachable code

2012-09-14 Thread Sachin Kamat
Code after return statement never gets executed. Hence can be deleted. Signed-off-by: Sachin Kamat --- drivers/media/platform/s5p-mfc/s5p_mfc.c | 21 + 1 files changed, 1 insertions(+), 20 deletions(-) diff --git a/drivers/media/platform/s5p-mfc/s5p_mfc.c b/drivers/media/

Re: [PATCH] nommu: remap_pfn_range: fix addr parameter check

2012-09-14 Thread Scott Jiang
> Yes, the MMU version of remap_pfn_range() does permit non-page-aligned > `addr' (at least, if the userspace maaping is a non-COW one). But I > suspect that was an implementation accident - it is a nonsensical thing > to do, isn't it? The MMU cannot map a bunch of kernel pages onto a > non-page-

Re: [RFCv2 API PATCH 12/28] v4l2-core: Add new V4L2_CAP_MONOTONIC_TS capability.

2012-09-14 Thread Hans Verkuil
On Fri 14 September 2012 11:02:22 Sakari Ailus wrote: > On Thu, Sep 13, 2012 at 10:56:41PM +0200, Hans Verkuil wrote: > > On Thu September 13 2012 22:50:32 Laurent Pinchart wrote: > > > Hi Sakari, > > > > > > On Thursday 13 September 2012 23:38:14 Sakari Ailus wrote: > > > > On Fri, Sep 07, 2012 a

[PATCH] v4l: change path of video drivers

2012-09-14 Thread Prabhakar Lad
From: Lad, Prabhakar due to structure change for video drivers, change the description with correct path. Signed-off-by: Lad, Prabhakar Signed-off-by: Manjunath Hadli Cc: Mauro Carvalho Chehab Cc: Hans Verkuil Cc: Laurent Pinchart Cc: Sakari Ailus Cc: Rob Landley --- Documentation/video4

Re: [RFCv2 API PATCH 12/28] v4l2-core: Add new V4L2_CAP_MONOTONIC_TS capability.

2012-09-14 Thread Sakari Ailus
On Thu, Sep 13, 2012 at 10:56:41PM +0200, Hans Verkuil wrote: > On Thu September 13 2012 22:50:32 Laurent Pinchart wrote: > > Hi Sakari, > > > > On Thursday 13 September 2012 23:38:14 Sakari Ailus wrote: > > > On Fri, Sep 07, 2012 at 03:29:12PM +0200, Hans Verkuil wrote: > > > > From: Hans Verkuil

Alignment problems: arm_memblock_steal() + dma_declare_coherent_memory()

2012-09-14 Thread javier Martin
Hello, we use arm_memblock_steal() + dma_declare_coherent_memory() in order to reserve son contiguous video memory in our platform: http://git.linuxtv.org/media_tree.git/blob/refs/heads/staging/for_v3.7:/arch/arm/mach-imx/mach-imx27_visstrim_m10.c We've noticed that some restrictive alignment cons

Re: [PATCHv3 2/9] ir-rx51: Handle signals properly

2012-09-14 Thread Timo Kokkonen
On 09/03/12 15:36, Sean Young wrote: > On Sun, Sep 02, 2012 at 11:08:20PM +0300, Timo Kokkonen wrote: >> On 09/02/12 22:41, Sakari Ailus wrote: >>> On Sun, Sep 02, 2012 at 06:20:27PM +0300, Timo Kokkonen wrote: On 09.02 2012 18:06:34, Sakari Ailus wrote: > Heippa, > > Timo Kokkonen

Re: [GIT PULL] ViewCast O820E capture support added

2012-09-14 Thread Hans Verkuil
On Fri September 14 2012 04:09:42 Mauro Carvalho Chehab wrote: > Em 13-09-2012 21:59, Mauro Carvalho Chehab escreveu: > > Em Thu, 13 Sep 2012 20:23:42 -0300 > > Mauro Carvalho Chehab escreveu: > > > >> Em 13-09-2012 20:19, Mauro Carvalho Chehab escreveu: > >>> Em Sat, 18 Aug 2012 11:48:52 -0400 >

Re: [PATCH 2/3] Add a V4L2 driver for SI476X MFD

2012-09-14 Thread Hans Verkuil
Hi Andrey! Some generic comments: sound/i2c/other/tea575x-tuner.c is a good example of how to make an AM/FM tuner driver. It's used by e.g. drivers/media/radio/radio-shark.c. This went in just yesterday, so you need to look at the latest staging/for_v3.7 branch of the media_tree.git repo. Some m