Re: [PATCH for v4.4 00/14] v4l2-compat-ioctl32.c: remove set_fs(KERNEL_DS)

2018-02-14 Thread Greg KH
On Wed, Feb 14, 2018 at 12:52:26PM +0100, Hans Verkuil wrote: > From: Hans Verkuil > > This patch series fixes a number of bugs and culminates in the removal > of the set_fs(KERNEL_DS) call in v4l2-compat-ioctl32.c. > > This was tested with a VM running 4.4, the vivid

Re: [PATCH for v4.9 00/13] v4l2-compat-ioctl32.c: remove set_fs(KERNEL_DS)

2018-02-14 Thread Greg KH
On Wed, Feb 14, 2018 at 12:48:17PM +0100, Hans Verkuil wrote: > From: Hans Verkuil > > This patch series fixes a number of bugs and culminates in the removal > of the set_fs(KERNEL_DS) call in v4l2-compat-ioctl32.c. > > This was tested with a VM running 4.9, the vivid

Re: [PATCH for v4.14 00/13] v4l2-compat-ioctl32.c: remove set_fs(KERNEL_DS)

2018-02-14 Thread Greg KH
On Wed, Feb 14, 2018 at 12:44:21PM +0100, Hans Verkuil wrote: > From: Hans Verkuil > > This patch series fixes a number of bugs and culminates in the removal > of the set_fs(KERNEL_DS) call in v4l2-compat-ioctl32.c. > > This was tested with a VM running 4.14, the vivid

[PATCH v3 9/9] v4l: xilinx: dma: Get scaling and padding factor to calculate DMA params

2018-02-14 Thread Satish Kumar Nagireddy
Get multiplying factor to calculate bpp especially in case of 10 bit formats. Get multiplying factor to calculate padding width Signed-off-by: Satish Kumar Nagireddy --- drivers/media/platform/xilinx/xilinx-dma.c | 29 ++--- 1 file changed, 26

[PATCH v3 4/9] media-bus: uapi: Add YCrCb 420 media bus format

2018-02-14 Thread Satish Kumar Nagireddy
From: Rohit Athavale This commit adds a YUV 420 media bus format. Currently, one doesn't exist. VYYUYY8_1X24 does not describe the way the pixels are sent over the bus, but is an approximation. Signed-off-by: Satish Kumar Nagireddy ---

[PATCH v3 6/9] v4l: xilinx: dma: Update video format descriptor

2018-02-14 Thread Satish Kumar Nagireddy
This patch updates video format descriptor to help information viz., number of planes per color format and chroma sub sampling factors. This commit adds the various 8-bit and 10-bit that are supported to the table queried by drivers. Signed-off-by: Satish Kumar Nagireddy

[PATCH v3 1/9] v4l: xilinx: dma: Remove colorspace check in xvip_dma_verify_format

2018-02-14 Thread Satish Kumar Nagireddy
From: Radhey Shyam Pandey In current implementation driver only checks the colorspace between the last subdev in the pipeline and the connected video node, the pipeline could be configured with wrong colorspace information until the very end. It thus makes little

[PATCH v3 3/9] uapi: media: New fourcc codes needed by Xilinx Video IP

2018-02-14 Thread Satish Kumar Nagireddy
From: Jeffrey Mouroux The Xilinx Video Framebuffer DMA IP supports video memory formats that are not represented in the current V4L2 fourcc library. This patch adds those missing fourcc codes. This includes both new 8-bit and 10-bit pixel formats. Signed-off-by: Satish

[PATCH v3 2/9] media: xilinx: vip: Add the pixel format for RGB24

2018-02-14 Thread Satish Kumar Nagireddy
From: Hyun Kwon The pixel format for RGB24 is missing, and the driver always falls back to YUYV as no format descriptor matches with RGB24 fourcc. The pixel format is added to RGB24 format descriptor so that user can use the format. Signed-off-by: Satish Kumar Nagireddy

[PATCH v3 8/9] v4l: xilinx: dma: Add scaling and padding factor functions

2018-02-14 Thread Satish Kumar Nagireddy
scaling_factor function returns multiplying factor to calculate bytes per component based on color format. For eg. scaling factor of YUV420 8 bit format is 1 so multiplying factor is 1 (8/8) scaling factor of YUV420 10 bit format is 1.25 (10/8) padding_factor function returns multiplying factor

[PATCH v3 7/9] v4l: xilinx: dma: Add multi-planar support

2018-02-14 Thread Satish Kumar Nagireddy
The current v4l driver supports single plane formats. This patch will add support to handle multi-planar formats. Updated driver capabilities to multi-planar, where it can handle both single and multi-planar formats Signed-off-by: Satish Kumar Nagireddy ---

[PATCH v3 5/9] [media] Add documentation for YUV420 bus format

2018-02-14 Thread Satish Kumar Nagireddy
The code is MEDIA_BUS_FMT_VYYUYY8_1X24 Signed-off-by: Satish Kumar Nagireddy --- Documentation/media/uapi/v4l/subdev-formats.rst | 34 + 1 file changed, 34 insertions(+) diff --git a/Documentation/media/uapi/v4l/subdev-formats.rst

[PATCH v3 0/9] Add support for multi-planar formats and 10 bit formats

2018-02-14 Thread Satish Kumar Nagireddy
The patches are for xilinx v4l. The patcheset enable support to handle multiplanar formats and 10 bit formats. The implemenation has handling of single plane formats too for backward compatibility of some existing applications. Some patches are included as dependencies and are intended to

cron job: media_tree daily build: ERRORS

2018-02-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: Thu Feb 15 05:00:11 CET 2018 media-tree git hash:29422737017b866d4a51014cc7522fa3a99e8852 media_build

[PATCH v11 1/8] v4l2-dv-timings: add v4l2_hdmi_colorimetry()

2018-02-14 Thread Tim Harvey
From: Hans Verkuil Add the v4l2_hdmi_colorimetry() function so we have a single function that determines the colorspace, YCbCr encoding, quantization range and transfer function from the InfoFrame data. Cc: Randy Dunlap Signed-off-by: Hans Verkuil

[PATCH v11 0/8] TDA1997x HDMI video reciver

2018-02-14 Thread Tim Harvey
This is a v4l2 subdev driver supporting the TDA1997x HDMI video receiver. I've tested this on a Gateworks GW54xx/GW551x with an IMX6Q/IMX6DL which uses the TDA19971 with 16bits connected to the IMX6 CSI and single-lane I2S audio providing 2-channel audio. For this configuration I've tested both

[PATCH v11 2/8] media: v4l-ioctl: fix clearing pad for VIDIOC_DV_TIMIGNS_CAP

2018-02-14 Thread Tim Harvey
Signed-off-by: Tim Harvey --- drivers/media/v4l2-core/v4l2-ioctl.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c b/drivers/media/v4l2-core/v4l2-ioctl.c index 7961499..5f3670d 100644 ---

[PATCH v11 3/8] media: add digital video decoder video interface entity functions

2018-02-14 Thread Tim Harvey
Add a new media entity function definition for digital TV decoders: MEDIA_ENT_F_DTV_DECODER Signed-off-by: Tim Harvey --- Documentation/media/uapi/mediactl/media-types.rst | 11 +++ include/uapi/linux/media.h| 5 + 2 files changed, 16

[PATCH v11 8/8] ARM: dts: imx: Add TDA19971 HDMI Receiver to GW551x

2018-02-14 Thread Tim Harvey
Signed-off-by: Tim Harvey --- v5: - add missing audmux config arch/arm/boot/dts/imx6qdl-gw551x.dtsi | 138 ++ 1 file changed, 138 insertions(+) diff --git a/arch/arm/boot/dts/imx6qdl-gw551x.dtsi b/arch/arm/boot/dts/imx6qdl-gw551x.dtsi

[PATCH v11 6/8] media: i2c: Add TDA1997x HDMI receiver driver

2018-02-14 Thread Tim Harvey
Add support for the TDA1997x HDMI receivers. Cc: Hans Verkuil Signed-off-by: Tim Harvey --- v11: - return -ERANGE from tda1997x_detect_std (Hans) - clean up tda1997x_g_input_status (Hans) - show detected timings on resolution change if debug enabled

[PATCH v11 7/8] ARM: dts: imx: Add TDA19971 HDMI Receiver to GW54xx

2018-02-14 Thread Tim Harvey
The GW54xx has a front-panel microHDMI connector routed to a TDA19971 which is connected the the IPU CSI when using IMX6Q. Signed-off-by: Tim Harvey --- v5: - remove leading 0 from unit address - add newline between property list and child node v4: no changes v3: no

[PATCH v11 5/8] media: dt-bindings: Add bindings for TDA1997X

2018-02-14 Thread Tim Harvey
Acked-by: Rob Herring Acked-by: Sakari Ailus Signed-off-by: Tim Harvey --- v6: - replace copyright with SPDX tag - added Rob's ack v5: - added Sakari's ack v4: - move include/dt-bindings/media/tda1997x.h to bindings patch -

[PATCH v11 4/8] MAINTAINERS: add entry for NXP TDA1997x driver

2018-02-14 Thread Tim Harvey
Signed-off-by: Tim Harvey --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 845fc25..439b500 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -13262,6 +13262,14 @@ T: git git://linuxtv.org/mkrufky/tuners.git S:

Re: [PATCH] staging: media: reformat line to 80 chars or less

2018-02-14 Thread Steve Longerbeam
Hi Parthiban, please rename the commit title to "media: imx: capture: reformat line to 80 chars or less" Otherwise it is fine with me. Steve On 02/12/2018 04:05 AM, Parthiban Nallathambi wrote: This is a cleanup patch to fix line length issue found by checkpatch.pl script. In this patch,

Re: [GIT PULL FOR v4.17] rc changes

2018-02-14 Thread Sean Young
Hi Mauro, On Wed, Feb 14, 2018 at 04:44:48PM -0200, Mauro Carvalho Chehab wrote: > Hi Sean, > > Em Mon, 12 Feb 2018 20:03:18 + > Sean Young escreveu: > > > Hi Mauro, > > > > Just very minor changes this time (other stuff is not ready yet). I would > > really appreciate if

Re: [PATCH] staging: imx-media-vdic: fix inconsistent IS_ERR and PTR_ERR

2018-02-14 Thread Gustavo A. R. Silva
Hi all, I was just wondering about the status of this patch. Thanks -- Gustavo On 01/24/2018 06:14 PM, Steve Longerbeam wrote: Acked-by: Steve Longerbeam On 01/23/2018 04:43 PM, Gustavo A. R. Silva wrote: Fix inconsistent IS_ERR and PTR_ERR in

Re: [GIT PULL FOR v4.17] rc changes

2018-02-14 Thread Mauro Carvalho Chehab
Em Mon, 12 Feb 2018 20:03:18 + Sean Young escreveu: > media: rc: unnecessary use of do_div > > From c52920c524d96db55b9b82440504a7ec40df0b32 Mon Sep 17 00:00:00 2001 > From: Sean Young > Date: Sun, 11 Feb 2018 17:23:14 + > Subject: media: rc:

Re: [GIT PULL FOR v4.17] rc changes

2018-02-14 Thread Mauro Carvalho Chehab
Hi Sean, Em Mon, 12 Feb 2018 20:03:18 + Sean Young escreveu: > Hi Mauro, > > Just very minor changes this time (other stuff is not ready yet). I would > really appreciate if you could cast an extra critical eye on the commit > "no need to check for transitions", just to be

Assalamu`Alaikum.

2018-02-14 Thread Mohammad Ouattara
Dear Sir/Madam. Assalamu`Alaikum. I am Dr mohammad ouattara, I have ($14.6 Million us dollars) to transfer into your account, I will send you more details about this deal and the procedures to follow when I receive a positive response from you, Have a great day, Dr mohammad ouattara.

Re: [PATCH v4 16/18] scripts: kernel-doc: improve nested logic to handle multiple identifiers

2018-02-14 Thread Jani Nikula
On Wed, 14 Feb 2018, Mauro Carvalho Chehab wrote: > There is a simple fix, though. Make inline comments to accept a dot: > > diff --git a/scripts/kernel-doc b/scripts/kernel-doc > index fee8952037b1..06d7f3f2c094 100755 > --- a/scripts/kernel-doc > +++

Re: [PATCH 2/7] include/(uapi/)media: add SPDX license info

2018-02-14 Thread Hans Verkuil
On 14/02/18 19:12, Mauro Carvalho Chehab wrote: > Em Wed, 7 Feb 2018 15:39:34 +0100 > Hans Verkuil escreveu: > >> From: Hans Verkuil >> >> Replace the old license information with the corresponding SPDX >> license for those headers that I authored. >> >>

Re: [PATCH 2/7] include/(uapi/)media: add SPDX license info

2018-02-14 Thread Mauro Carvalho Chehab
Em Wed, 7 Feb 2018 15:39:34 +0100 Hans Verkuil escreveu: > From: Hans Verkuil > > Replace the old license information with the corresponding SPDX > license for those headers that I authored. > > Signed-off-by: Hans Verkuil ...

Re: [PATCH v4 16/18] scripts: kernel-doc: improve nested logic to handle multiple identifiers

2018-02-14 Thread Mauro Carvalho Chehab
Em Wed, 14 Feb 2018 18:07:03 +0200 Jani Nikula escreveu: > On Mon, 18 Dec 2017, Mauro Carvalho Chehab wrote: > > It is possible to use nested structs like: > > > > struct { > > struct { > > void *arg1; > > } st1, st2,

Re: [PATCHv2 2/9] media: convert g/s_parm to g/s_frame_interval in subdevs

2018-02-14 Thread Mauro Carvalho Chehab
Em Wed, 14 Feb 2018 18:16:55 +0100 Hans Verkuil escreveu: > On 14/02/18 18:02, Mauro Carvalho Chehab wrote: > > Em Wed, 14 Feb 2018 17:34:17 +0100 > > Hans Verkuil escreveu: > > > >> On 14/02/18 17:03, Mauro Carvalho Chehab wrote: > >>> Em Mon, 22

Re: [PATCHv2 2/9] media: convert g/s_parm to g/s_frame_interval in subdevs

2018-02-14 Thread Hans Verkuil
On 14/02/18 18:02, Mauro Carvalho Chehab wrote: > Em Wed, 14 Feb 2018 17:34:17 +0100 > Hans Verkuil escreveu: > >> On 14/02/18 17:03, Mauro Carvalho Chehab wrote: >>> Em Mon, 22 Jan 2018 13:31:18 +0100 >>> Hans Verkuil escreveu: >>> From: Hans

Re: [PATCHv2 2/9] media: convert g/s_parm to g/s_frame_interval in subdevs

2018-02-14 Thread Mauro Carvalho Chehab
Em Wed, 14 Feb 2018 17:34:17 +0100 Hans Verkuil escreveu: > On 14/02/18 17:03, Mauro Carvalho Chehab wrote: > > Em Mon, 22 Jan 2018 13:31:18 +0100 > > Hans Verkuil escreveu: > > > >> From: Hans Verkuil > >> > >> Convert all

Re: [PATCHv2 1/9] v4l2-common: create v4l2_g/s_parm_cap helpers

2018-02-14 Thread Hans Verkuil
On 14/02/18 17:35, Mauro Carvalho Chehab wrote: > Em Wed, 14 Feb 2018 17:23:51 +0100 > Hans Verkuil escreveu: > >> On 14/02/18 16:50, Mauro Carvalho Chehab wrote: >>> Em Mon, 22 Jan 2018 13:31:17 +0100 >>> Hans Verkuil escreveu: >>> From: Hans

Re: [PATCHv2 1/9] v4l2-common: create v4l2_g/s_parm_cap helpers

2018-02-14 Thread Mauro Carvalho Chehab
Em Wed, 14 Feb 2018 17:23:51 +0100 Hans Verkuil escreveu: > On 14/02/18 16:50, Mauro Carvalho Chehab wrote: > > Em Mon, 22 Jan 2018 13:31:17 +0100 > > Hans Verkuil escreveu: > > > >> From: Hans Verkuil > >> > >> Create helpers

Re: [PATCHv2 2/9] media: convert g/s_parm to g/s_frame_interval in subdevs

2018-02-14 Thread Hans Verkuil
On 14/02/18 17:03, Mauro Carvalho Chehab wrote: > Em Mon, 22 Jan 2018 13:31:18 +0100 > Hans Verkuil escreveu: > >> From: Hans Verkuil >> >> Convert all g/s_parm calls to g/s_frame_interval. This allows us >> to remove the g/s_parm ops since those are

Re: [PATCHv2 1/9] v4l2-common: create v4l2_g/s_parm_cap helpers

2018-02-14 Thread Hans Verkuil
On 14/02/18 16:50, Mauro Carvalho Chehab wrote: > Em Mon, 22 Jan 2018 13:31:17 +0100 > Hans Verkuil escreveu: > >> From: Hans Verkuil >> >> Create helpers to handle VIDIOC_G/S_PARM by querying the >> g/s_frame_interval v4l2_subdev ops. >> >>

Re: [PATCHv2 4/9] staging: atomisp: i2c: Disable non-preview configurations

2018-02-14 Thread Mauro Carvalho Chehab
Em Mon, 22 Jan 2018 13:31:20 +0100 Hans Verkuil escreveu: > From: Sakari Ailus > > Disable configurations for non-preview modes until configuration selection > is improved. Again, a poor description. It just repeats the subject. A good

Re: [PATCH v10 6/8] media: i2c: Add TDA1997x HDMI receiver driver

2018-02-14 Thread Hans Verkuil
On 14/02/18 16:46, Tim Harvey wrote: > On Wed, Feb 14, 2018 at 6:08 AM, Hans Verkuil wrote: >> Hi Tim, >> >> On 12/02/18 23:27, Tim Harvey wrote: >>> On Fri, Feb 9, 2018 at 12:08 AM, Hans Verkuil wrote: Hi Tim, We're almost there. Two more

Re: [PATCHv2 3/9] staging: atomisp: Kill subdev s_parm abuse

2018-02-14 Thread Mauro Carvalho Chehab
Sakari, Em Mon, 22 Jan 2018 13:31:19 +0100 Hans Verkuil escreveu: > From: Sakari Ailus > > Remove sensor driver's interface that made use of use case specific > knowledge of platform capabilities. Could you better describe it? What s_param

Re: [PATCH v4 16/18] scripts: kernel-doc: improve nested logic to handle multiple identifiers

2018-02-14 Thread Jani Nikula
On Mon, 18 Dec 2017, Mauro Carvalho Chehab wrote: > It is possible to use nested structs like: > > struct { > struct { > void *arg1; > } st1, st2, *st3, st4; > }; > > Handling it requires to split each parameter. Change the logic > to allow such

Re: [PATCHv2 2/9] media: convert g/s_parm to g/s_frame_interval in subdevs

2018-02-14 Thread Mauro Carvalho Chehab
Em Mon, 22 Jan 2018 13:31:18 +0100 Hans Verkuil escreveu: > From: Hans Verkuil > > Convert all g/s_parm calls to g/s_frame_interval. This allows us > to remove the g/s_parm ops since those are a duplicate of > g/s_frame_interval. > > Signed-off-by:

Re: [PATCHv2 1/9] v4l2-common: create v4l2_g/s_parm_cap helpers

2018-02-14 Thread Mauro Carvalho Chehab
Em Mon, 22 Jan 2018 13:31:17 +0100 Hans Verkuil escreveu: > From: Hans Verkuil > > Create helpers to handle VIDIOC_G/S_PARM by querying the > g/s_frame_interval v4l2_subdev ops. > > Signed-off-by: Hans Verkuil > --- >

Re: [PATCH v10 6/8] media: i2c: Add TDA1997x HDMI receiver driver

2018-02-14 Thread Tim Harvey
On Wed, Feb 14, 2018 at 6:08 AM, Hans Verkuil wrote: > Hi Tim, > > On 12/02/18 23:27, Tim Harvey wrote: >> On Fri, Feb 9, 2018 at 12:08 AM, Hans Verkuil wrote: >>> Hi Tim, >>> >>> We're almost there. Two more comments: >>> >>> On 02/09/2018 07:32 AM, Tim

Re: i.MX53 using imx-media to capture analog video through ADV7180

2018-02-14 Thread Fabio Estevam
[Adding Steve and Philipp in case they could provide some suggestions] On Wed, Feb 14, 2018 at 1:21 PM, Matthew Starr wrote: > I have successfully modified device tree files in the mainline 4.15.1 kernel > to get a display product using the i.MX53 processor to initialize

i.MX53 using imx-media to capture analog video through ADV7180

2018-02-14 Thread Matthew Starr
I have successfully modified device tree files in the mainline 4.15.1 kernel to get a display product using the i.MX53 processor to initialize the imx-media drivers. I think up to this point they have only been tested on i.MX6 processors. I am using two ADV7180 analog capture chips, one per

Re: [PATCH v2] videodev2.h: add helper to validate colorspace

2018-02-14 Thread Laurent Pinchart
Hi Niklas, Thank you for the patch. On Wednesday, 14 February 2018 12:36:43 EET Niklas Söderlund wrote: > There is no way for drivers to validate a colorspace value, which could > be provided by user-space by VIDIOC_S_FMT for example. Add a helper to > validate that the colorspace value is part

Re: [PATCH v7 2/2] v4l: cadence: Add Cadence MIPI-CSI2 RX driver

2018-02-14 Thread Laurent Pinchart
Hi Maxime, On Wednesday, 14 February 2018 15:19:33 EET Maxime Ripard wrote: > On Thu, Feb 08, 2018 at 08:17:19PM +0200, Laurent Pinchart wrote: > >> + /* > >> + * Create a static mapping between the CSI virtual channels > >> + * and the output stream. > >> + * > >> + * This should be

Re: [PATCH v10 6/8] media: i2c: Add TDA1997x HDMI receiver driver

2018-02-14 Thread Hans Verkuil
Hi Tim, On 12/02/18 23:27, Tim Harvey wrote: > On Fri, Feb 9, 2018 at 12:08 AM, Hans Verkuil wrote: >> Hi Tim, >> >> We're almost there. Two more comments: >> >> On 02/09/2018 07:32 AM, Tim Harvey wrote: >>> +static int >>> +tda1997x_detect_std(struct tda1997x_state *state,

[PATCH 1/1] media: request: Add support for tagged request-based objects

2018-02-14 Thread Sakari Ailus
Allow binding objects to requests that can be later on fetched based on that tag. The intent is that the objects are bound at the time data is bound to a request and later retrieved for validation (and finally applied) when the request is queued. A tag can be any pointer, as long as it is unique

Re: [PATCH v7 2/2] v4l: cadence: Add Cadence MIPI-CSI2 RX driver

2018-02-14 Thread Maxime Ripard
Hi Laurent, On Thu, Feb 08, 2018 at 08:17:19PM +0200, Laurent Pinchart wrote: > > + /* > > +* Create a static mapping between the CSI virtual channels > > +* and the output stream. > > +* > > +* This should be enhanced, but v4l2 lacks the support for > > +* changing that

media: v4l: alsa: Associating V4L2 and ALSA devices coming from the same device (a webcam for example)

2018-02-14 Thread Carlos Rafael Giani
I have an application that allows for recording audio/video from input devices. I now want to add to it the ability to autodetect plugged-in USB webcams via udev. The problem is that audio and video are handled separately, by a video4linux and an ALSA device. The goal is to discover the ALSA

Re: exposing a large-ish calibration table through V4L2?

2018-02-14 Thread Hans Verkuil
On 14/02/18 13:27, Florian Echtler wrote: > Hello Hans, > > On 14.02.2018 13:13, Hans Verkuil wrote: >> >> On 14/02/18 13:09, Florian Echtler wrote: >>> >>> The internal device memory contains a table with two bytes for each sensor >>> pixel >>> (i.e. 960x540x2 = 1036800 bytes) that basically

[no subject]

2018-02-14 Thread Scott Tisdale
hi Linux https://goo.gl/jMp8sb Scott Tisdale

Re: exposing a large-ish calibration table through V4L2?

2018-02-14 Thread Florian Echtler
Hello Hans, On 14.02.2018 13:13, Hans Verkuil wrote: > > On 14/02/18 13:09, Florian Echtler wrote: >> >> The internal device memory contains a table with two bytes for each sensor >> pixel >> (i.e. 960x540x2 = 1036800 bytes) that basically provide individual black and >> white levels per-pixel

Re: exposing a large-ish calibration table through V4L2?

2018-02-14 Thread Hans Verkuil
Hi Florian, On 14/02/18 13:09, Florian Echtler wrote: > Hello Hans, > > I've picked up work on the sur40 driver again recently. There is one major > feature left that is currently unsupported by the Linux driver, which is the > hardware-based calibration. > > The internal device memory contains

exposing a large-ish calibration table through V4L2?

2018-02-14 Thread Florian Echtler
Hello Hans, I've picked up work on the sur40 driver again recently. There is one major feature left that is currently unsupported by the Linux driver, which is the hardware-based calibration. The internal device memory contains a table with two bytes for each sensor pixel (i.e. 960x540x2 =

[PATCH for v3.2 05/12] media: v4l2-compat-ioctl32.c: avoid sizeof(type)

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 333b1e9f96ce05f7498b581509bb30cde03018bf upstream. Instead of doing sizeof(struct foo) use sizeof(*up). There even were cases where 4 * sizeof(__u32) was used instead of sizeof(kp->reserved), which is very dangerous when the size of the reserved

[PATCH for v3.2 01/12] media: v4l2-ioctl.c: don't copy back the result for -ENOTTY

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 181a4a2d5a0a7b43cab08a70710d727e7764ccdd upstream. If the ioctl returned -ENOTTY, then don't bother copying back the result as there is no point. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.2 02/12] media: v4l2-compat-ioctl32.c: add missing VIDIOC_PREPARE_BUF

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 3ee6d040719ae09110e5cdf24d5386abe5d1b776 upstream. The result of the VIDIOC_PREPARE_BUF ioctl was never copied back to userspace since it was missing in the switch. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.2 06/12] media: v4l2-compat-ioctl32.c: copy m.userptr in put_v4l2_plane32

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 8ed5a59dcb47a6f76034ee760b36e089f3e82529 upstream. The struct v4l2_plane32 should set m.userptr as well. The same happens in v4l2_buffer32 and v4l2-compliance tests for this. Signed-off-by: Hans Verkuil Acked-by: Sakari

[PATCH for v3.2 03/12] media: v4l2-compat-ioctl32.c: fix the indentation

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit b7b957d429f601d6d1942122b339474f31191d75 upstream. The indentation of this source is all over the place. Fix this. This patch only changes whitespace. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.2 04/12] media: v4l2-compat-ioctl32.c: move 'helper' functions to __get/put_v4l2_format32

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 486c521510c44a04cd756a9267e7d1e271c8a4ba upstream. These helper functions do not really help. Move the code to the __get/put_v4l2_format32 functions. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.2 12/12] media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic

2018-02-14 Thread Hans Verkuil
From: Daniel Mentz commit a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a upstream. The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit

[PATCH for v3.2 08/12] media: v4l2-compat-ioctl32: Copy v4l2_window->global_alpha

2018-02-14 Thread Hans Verkuil
From: Daniel Mentz commit 025a26fa14f8fd55d50ab284a30c016a5be953d0 upstream. Commit b2787845fb91 ("V4L/DVB (5289): Add support for video output overlays.") added the field global_alpha to struct v4l2_window but did not update the compat layer accordingly. This change

[PATCH for v3.2 11/12] media: v4l2-compat-ioctl32.c: don't copy back the result for certain errors

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit d83a8243aaefe62ace433e4384a4f077bed86acb upstream. Some ioctls need to copy back the result even if the ioctl returned an error. However, don't do this for the error code -ENOTTY. It makes no sense in that cases. Signed-off-by: Hans Verkuil

[PATCH for v3.2 10/12] media: v4l2-compat-ioctl32.c: drop pr_info for unknown buffer type

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 169f24ca68bf0f247d111aef07af00dd3a02ae88 upstream. There is nothing wrong with using an unknown buffer type. So stop spamming the kernel log whenever this happens. The kernel will just return -EINVAL to signal this. Signed-off-by: Hans Verkuil

[PATCH for v3.2 07/12] media: v4l2-compat-ioctl32.c: fix ctrl_is_pointer

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit b8c601e8af2d08f733d74defa8465303391bb930 upstream. ctrl_is_pointer just hardcoded two known string controls, but that caused problems when using e.g. custom controls that use a pointer for the payload. Reimplement this function: it now finds

[PATCH for v3.2 09/12] media: v4l2-compat-ioctl32.c: copy clip list in put_v4l2_window32

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit a751be5b142ef6bcbbb96d9899516f4d9c8d0ef4 upstream. put_v4l2_window32() didn't copy back the clip list to userspace. Drivers can update the clip rectangles, so this should be done. Signed-off-by: Hans Verkuil Acked-by:

[PATCH for v3.2 00/12] v4l2-compat-ioctl32.c: remove set_fs(KERNEL_DS)

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil This patch series fixes a number of bugs and culminates in the removal of the set_fs(KERNEL_DS) call in v4l2-compat-ioctl32.c. This was tested with a VM running 3.2, the vivi driver (a poor substitute for the much improved vivid driver that's available

[PATCH for v3.16 02/14] media: v4l2-ioctl.c: don't copy back the result for -ENOTTY

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 181a4a2d5a0a7b43cab08a70710d727e7764ccdd upstream. If the ioctl returned -ENOTTY, then don't bother copying back the result as there is no point. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.16 04/14] media: v4l2-compat-ioctl32.c: add missing VIDIOC_PREPARE_BUF

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 3ee6d040719ae09110e5cdf24d5386abe5d1b776 upstream. The result of the VIDIOC_PREPARE_BUF ioctl was never copied back to userspace since it was missing in the switch. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.16 08/14] media: v4l2-compat-ioctl32.c: copy m.userptr in put_v4l2_plane32

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 8ed5a59dcb47a6f76034ee760b36e089f3e82529 upstream. The struct v4l2_plane32 should set m.userptr as well. The same happens in v4l2_buffer32 and v4l2-compliance tests for this. Signed-off-by: Hans Verkuil Acked-by: Sakari

[PATCH for v3.16 05/14] media: v4l2-compat-ioctl32.c: fix the indentation

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit b7b957d429f601d6d1942122b339474f31191d75 upstream. The indentation of this source is all over the place. Fix this. This patch only changes whitespace. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.16 00/14] v4l2-compat-ioctl32.c: remove set_fs(KERNEL_DS)

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil This patch series fixes a number of bugs and culminates in the removal of the set_fs(KERNEL_DS) call in v4l2-compat-ioctl32.c. This was tested with a VM running 3.16, the vivi driver (a poor substitute for the much improved vivid driver that's

[PATCH for v3.16 06/14] media: v4l2-compat-ioctl32.c: move 'helper' functions to __get/put_v4l2_format32

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 486c521510c44a04cd756a9267e7d1e271c8a4ba upstream. These helper functions do not really help. Move the code to the __get/put_v4l2_format32 functions. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v3.16 10/14] media: v4l2-compat-ioctl32: Copy v4l2_window->global_alpha

2018-02-14 Thread Hans Verkuil
From: Daniel Mentz commit 025a26fa14f8fd55d50ab284a30c016a5be953d0 upstream. Commit b2787845fb91 ("V4L/DVB (5289): Add support for video output overlays.") added the field global_alpha to struct v4l2_window but did not update the compat layer accordingly. This change

[PATCH for v3.16 07/14] media: v4l2-compat-ioctl32.c: avoid sizeof(type)

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 333b1e9f96ce05f7498b581509bb30cde03018bf upstream. Instead of doing sizeof(struct foo) use sizeof(*up). There even were cases where 4 * sizeof(__u32) was used instead of sizeof(kp->reserved), which is very dangerous when the size of the reserved

[PATCH for v3.16 03/14] vb2: V4L2_BUF_FLAG_DONE is set after DQBUF

2018-02-14 Thread Hans Verkuil
From: Ricardo Ribalda commit 3171cc2b4eb9831ab4df1d80d0410a945b8bc84e upstream. According to the doc, V4L2_BUF_FLAG_DONE is cleared after DQBUF: V4L2_BUF_FLAG_DONE 0x0004 ... After calling the VIDIOC_QBUF or VIDIOC_DQBUF it is always cleared ... Unfortunately,

[PATCH for v3.16 13/14] media: v4l2-compat-ioctl32.c: don't copy back the result for certain errors

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit d83a8243aaefe62ace433e4384a4f077bed86acb upstream. Some ioctls need to copy back the result even if the ioctl returned an error. However, don't do this for the error code -ENOTTY. It makes no sense in that cases. Signed-off-by: Hans Verkuil

[PATCH for v3.16 12/14] media: v4l2-compat-ioctl32.c: drop pr_info for unknown buffer type

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 169f24ca68bf0f247d111aef07af00dd3a02ae88 upstream. There is nothing wrong with using an unknown buffer type. So stop spamming the kernel log whenever this happens. The kernel will just return -EINVAL to signal this. Signed-off-by: Hans Verkuil

[PATCH for v3.16 11/14] media: v4l2-compat-ioctl32.c: copy clip list in put_v4l2_window32

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit a751be5b142ef6bcbbb96d9899516f4d9c8d0ef4 upstream. put_v4l2_window32() didn't copy back the clip list to userspace. Drivers can update the clip rectangles, so this should be done. Signed-off-by: Hans Verkuil Acked-by:

[PATCH for v3.16 14/14] media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic

2018-02-14 Thread Hans Verkuil
From: Daniel Mentz commit a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a upstream. The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit

[PATCH for v3.16 09/14] media: v4l2-compat-ioctl32.c: fix ctrl_is_pointer

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit b8c601e8af2d08f733d74defa8465303391bb930 upstream. ctrl_is_pointer just hardcoded two known string controls, but that caused problems when using e.g. custom controls that use a pointer for the payload. Reimplement this function: it now finds

[PATCH for v3.16 01/14] adv7604: use correct drive strength defines

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil The prefix is ADV7604_, not ADV76XX. Fixes: f31b62e14a ("adv7604: add hdmi driver strength adjustment") Signed-off-by: Hans Verkuil --- drivers/media/i2c/adv7604.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)

[PATCH for v4.1 02/14] vb2: V4L2_BUF_FLAG_DONE is set after DQBUF

2018-02-14 Thread Hans Verkuil
From: Ricardo Ribalda commit 3171cc2b4eb9831ab4df1d80d0410a945b8bc84e upstream. According to the doc, V4L2_BUF_FLAG_DONE is cleared after DQBUF: V4L2_BUF_FLAG_DONE 0x0004 ... After calling the VIDIOC_QBUF or VIDIOC_DQBUF it is always cleared ... Unfortunately,

[PATCH for v4.1 13/14] media: v4l2-compat-ioctl32.c: don't copy back the result for certain errors

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit d83a8243aaefe62ace433e4384a4f077bed86acb upstream. Some ioctls need to copy back the result even if the ioctl returned an error. However, don't do this for the error code -ENOTTY. It makes no sense in that cases. Signed-off-by: Hans Verkuil

[PATCH for v4.1 05/14] media: v4l2-compat-ioctl32.c: move 'helper' functions to __get/put_v4l2_format32

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 486c521510c44a04cd756a9267e7d1e271c8a4ba upstream. These helper functions do not really help. Move the code to the __get/put_v4l2_format32 functions. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v4.1 14/14] media: v4l2-compat-ioctl32.c: refactor compat ioctl32 logic

2018-02-14 Thread Hans Verkuil
From: Daniel Mentz commit a1dfb4c48cc1e64eeb7800a27c66a6f7e88d075a upstream. The 32-bit compat v4l2 ioctl handling is implemented based on its 64-bit equivalent. It converts 32-bit data structures into its 64-bit equivalents and needs to provide the data to the 64-bit

[PATCH for v4.1 03/14] media: v4l2-compat-ioctl32.c: add missing VIDIOC_PREPARE_BUF

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 3ee6d040719ae09110e5cdf24d5386abe5d1b776 upstream. The result of the VIDIOC_PREPARE_BUF ioctl was never copied back to userspace since it was missing in the switch. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v4.1 01/14] media: v4l2-ioctl.c: don't copy back the result for -ENOTTY

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 181a4a2d5a0a7b43cab08a70710d727e7764ccdd upstream. If the ioctl returned -ENOTTY, then don't bother copying back the result as there is no point. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v4.1 00/14] v4l2-compat-ioctl32.c: remove set_fs(KERNEL_DS)

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil This patch series fixes a number of bugs and culminates in the removal of the set_fs(KERNEL_DS) call in v4l2-compat-ioctl32.c. This was tested with a VM running 4.1, the vivid driver (since that emulates almost all V4L2 ioctls that need to pass through

[PATCH for v4.1 07/14] media: v4l2-compat-ioctl32.c: copy m.userptr in put_v4l2_plane32

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 8ed5a59dcb47a6f76034ee760b36e089f3e82529 upstream. The struct v4l2_plane32 should set m.userptr as well. The same happens in v4l2_buffer32 and v4l2-compliance tests for this. Signed-off-by: Hans Verkuil Acked-by: Sakari

[PATCH for v4.1 09/14] media: v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 273caa260035c03d89ad63d72d8cd3d9e5c5e3f1 upstream. If the device is of type VFL_TYPE_SUBDEV then vdev->ioctl_ops is NULL so the 'if (!ops->vidioc_query_ext_ctrl)' check would crash. Add a test for !ops to the condition. All sub-devices that have

[PATCH for v4.1 12/14] media: v4l2-compat-ioctl32.c: drop pr_info for unknown buffer type

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit 169f24ca68bf0f247d111aef07af00dd3a02ae88 upstream. There is nothing wrong with using an unknown buffer type. So stop spamming the kernel log whenever this happens. The kernel will just return -EINVAL to signal this. Signed-off-by: Hans Verkuil

[PATCH for v4.1 04/14] media: v4l2-compat-ioctl32.c: fix the indentation

2018-02-14 Thread Hans Verkuil
From: Hans Verkuil commit b7b957d429f601d6d1942122b339474f31191d75 upstream. The indentation of this source is all over the place. Fix this. This patch only changes whitespace. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

[PATCH for v4.1 10/14] media: v4l2-compat-ioctl32: Copy v4l2_window->global_alpha

2018-02-14 Thread Hans Verkuil
From: Daniel Mentz commit 025a26fa14f8fd55d50ab284a30c016a5be953d0 upstream. Commit b2787845fb91 ("V4L/DVB (5289): Add support for video output overlays.") added the field global_alpha to struct v4l2_window but did not update the compat layer accordingly. This change

  1   2   >