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

2018-02-21 Thread Hans Verkuil
On 02/21/2018 09:16 PM, Laurent Pinchart wrote: > Hi Hans, > > On Tuesday, 20 February 2018 10:37:22 EET Hans Verkuil wrote: >> On 02/19/2018 11:28 PM, Niklas Söderlund wrote: >>> Hi Hans, >>> >>> Thanks for your feedback. >>> >>> [snip] >>> Can you then fix v4l2-compliance to stop testin

Re: [PATCHv2] media: add tuner standby op, use where needed

2018-02-21 Thread Hans Verkuil
On 02/21/2018 08:21 PM, Laurent Pinchart wrote: > Hi Hans, > > On Wednesday, 21 February 2018 15:11:36 EET Hans Verkuil wrote: >> On 02/21/18 13:37, Laurent Pinchart wrote: >>> On Wednesday, 21 February 2018 09:40:29 EET Hans Verkuil wrote: On 02/21/2018 01:02 AM, Laurent Pinchart wrote:

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

2018-02-21 Thread Shawn Guo
On Thu, Feb 15, 2018 at 01:19:17PM -0800, Tim Harvey wrote: > On Thu, Feb 15, 2018 at 10:36 AM, Hans Verkuil wrote: > > On 15/02/18 18:55, Tim Harvey wrote: > >> The GW54xx has a front-panel microHDMI connector routed to a TDA19971 > >> which is connected the the IPU CSI when using IMX6Q. > > > >

cron job: media_tree daily build: ABI WARNING

2018-02-21 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 22 05:00:16 CET 2018 media-tree git hash:29422737017b866d4a51014cc7522fa3a99e8852 media_build git

[PATCH 02/13] media: v4l2: async: Allow searching for asd of any type

2018-02-21 Thread Steve Longerbeam
Generalize v4l2_async_notifier_fwnode_has_async_subdev() to allow searching for any type of async subdev, not just fwnodes. Rename to v4l2_async_notifier_has_async_subdev() and pass it an asd pointer. TODO: support asd compare with CUSTOM match type in asd_equal(). Signed-off-by: Steve Longerbeam

[PATCH 01/13] media: v4l2-fwnode: Let parse_endpoint callback decide if no remote is error

2018-02-21 Thread Steve Longerbeam
For some subdevices, a fwnode endpoint that has no connection to a remote endpoint may not be an error. Let the parse_endpoint callback make that decision in v4l2_async_notifier_fwnode_parse_endpoint(). If the callback indicates that is not an error, skip adding the asd to the notifier and return 0

[PATCH 03/13] media: v4l2: async: Add v4l2_async_notifier_add_subdev

2018-02-21 Thread Steve Longerbeam
v4l2_async_notifier_add_subdev() adds an asd to the notifier. It checks that the asd's match_type is valid and that no other equivalent asd's have already been added to this notifier's asd list, or to other registered notifier's waiting or done lists, and increments num_subdevs. v4l2_async_notifie

[PATCH 00/13] media: imx: Switch to subdev notifiers

2018-02-21 Thread Steve Longerbeam
This patchset converts the imx-media driver and its dependent subdevs to use subdev notifiers. There are a couple shortcomings in v4l2-core that prevented subdev notifiers from working correctly in imx-media: 1. v4l2_async_notifier_fwnode_parse_endpoint() treats a fwnode endpoint that is not c

[PATCH 06/13] media: platform: video-mux: Register a subdev notifier

2018-02-21 Thread Steve Longerbeam
Parse neighbor remote devices on the video muxes input ports, add them to a subdev notifier, and register the subdev notifier for the video mux, by calling v4l2_async_register_fwnode_subdev(). Signed-off-by: Steve Longerbeam --- drivers/media/platform/video-mux.c | 35 +++

[PATCH 05/13] media: v4l2-fwnode: Add a convenience function for registering subdevs with notifiers

2018-02-21 Thread Steve Longerbeam
Adds v4l2_async_register_fwnode_subdev(), which is a convenience function for parsing a sub-device's fwnode port endpoints for connected remote sub-devices, registering a sub-device notifier, and then registering the sub-device itself. Signed-off-by: Steve Longerbeam --- drivers/media/v4l2-core/

[PATCH 11/13] media: staging/imx: Rename root notifier

2018-02-21 Thread Steve Longerbeam
Rename the imx-media root async notifier from "subdev_notifier" to simply "notifier", so as not to confuse it with true subdev notifiers. No functional changes. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-dev.c | 14 +++--- drivers/staging/media/imx/imx-media.

[PATCH 07/13] media: imx: csi: Register a subdev notifier

2018-02-21 Thread Steve Longerbeam
Parse neighbor remote devices on the CSI port, add them to a subdev notifier, and register the subdev notifier for the CSI, by calling v4l2_async_register_fwnode_subdev(). Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/imx-media-csi.c | 11 ++- 1 file changed, 10 insertion

[PATCH 09/13] media: staging/imx: of: Remove recursive graph walk

2018-02-21 Thread Steve Longerbeam
After moving to subdev notifiers, it's no longer necessary to recursively walk the OF graph, because the subdev notifiers will discover and add devices from the graph for us. So the recursive of_parse_subdev() function is gone, replaced with of_add_csi() which adds only the CSI port fwnodes to the

[PATCH 12/13] media: staging/imx: Switch to v4l2_async_notifier_add_subdev

2018-02-21 Thread Steve Longerbeam
Switch to v4l2_async_notifier_add_subdev() when adding async subdevs to the imx-media root notifier. This removes the need to check for an already added asd, since v4l2_async_notifier_add_subdev() does this check. Also no need to allocate a subdevs array when registering the root notifier, or keepi

[PATCH 13/13] media: staging/imx: TODO: Remove one assumption about OF graph parsing

2018-02-21 Thread Steve Longerbeam
The move to subdev notifiers fixes one assumption of OF graph parsing. If a subdevice has non-video related ports, the subdev driver knows not to follow those ports when adding remote devices to its subdev notifier. Signed-off-by: Steve Longerbeam --- drivers/staging/media/imx/TODO | 29 +++-

[PATCH 08/13] media: imx: mipi csi-2: Register a subdev notifier

2018-02-21 Thread Steve Longerbeam
Parse neighbor remote devices on the MIPI CSI-2 input port, add them to a subdev notifier, and register the subdev notifier for the MIPI CSI-2 receiver, by calling v4l2_async_register_fwnode_subdev(). csi2_parse_endpoints() is modified to be the parse_endpoint callback. Signed-off-by: Steve Longe

[PATCH 10/13] media: staging/imx: Loop through all registered subdevs for media links

2018-02-21 Thread Steve Longerbeam
The root imx-media notifier no longer sees all bound subdevices because some of them will be bound to subdev notifiers. So imx_media_create_links() now needs to loop through all subdevices registered with the v4l2-device, not just the ones in the root notifier's done list. This should be safe becau

[PATCH 04/13] media: v4l2-fwnode: Switch to v4l2_async_notifier_add_subdev

2018-02-21 Thread Steve Longerbeam
The fwnode endpoint and reference parsing functions in v4l2-fwnode.c are modified to make use of v4l2_async_notifier_add_subdev(). As a result the notifier->subdevs array is no longer allocated or re-allocated, and by extension the max_subdevs value is also no longer needed. Since the notifier->su

[PATCH 00/13] Remove metag architecture

2018-02-21 Thread James Hogan
These patches remove the metag architecture and tightly dependent drivers from the kernel. With the 4.16 kernel the ancient gcc 4.2.4 based metag toolchain we have been using is hitting compiler bugs, so now seems a good time to drop it altogether. Quoting from patch 1: The earliest Meta architec

[PATCH 12/13] media: img-ir: Drop METAG dependency

2018-02-21 Thread James Hogan
Now that arch/metag/ has been removed, remove the METAG dependency from the IMG IR device driver. The hardware is also present on MIPS SoCs so the driver still has value. Signed-off-by: James Hogan Cc: Mauro Carvalho Chehab Cc: Mauro Carvalho Chehab Cc: linux-media@vger.kernel.org Cc: linux-me.

[PATCH] i2c: adv748x: afe: fix sparse warning

2018-02-21 Thread Niklas Söderlund
This fixes the following sparse warning: drivers/media/i2c/adv748x/adv748x-afe.c:294:34:expected unsigned int [usertype] *signal drivers/media/i2c/adv748x/adv748x-afe.c:294:34:got int * drivers/media/i2c/adv748x/adv748x-afe.c:294:34: warning: incorrect type in argument 2 (different signe

[PATCH v3 1/2] media: imx-media-internal-sd: Use empty initializer

2018-02-21 Thread Fabio Estevam
From: Fabio Estevam {0} explicitly assigns 0 to the first member of the structure. The first element of the platform_device_info struct is a pointer and when writing 0 to a pointer the following sparse error is seen: drivers/staging/media/imx/imx-media-internal-sd.c:274:49: warning: Using plain

[PATCH v3 2/2] media: imx-ic-prpencvf: Use empty initializer

2018-02-21 Thread Fabio Estevam
From: Fabio Estevam {0} explicitly assigns 0 to the first member of the structure. Even though the first member of the v4l2_subdev_format structure is of _u32 type, make the initialization more robust by using the empty initializer. This way in case someday the struct is changed so that the fir

[PATCH v2 1/3] staging: xm2mvscale: Driver support for Xilinx M2M Video Scaler

2018-02-21 Thread Rohit Athavale
This commit adds driver support for the pre-release Xilinx M2M Video Scaler IP. There are three parts to this driver : - The Hardware/IP layer that reads and writes register of the IP contained in the scaler_hw_xm2m.c - The set of ioctls that applications would need to know contained in io

[PATCH v2 2/3] staging: xm2mvscale: Add TODO for the driver

2018-02-21 Thread Rohit Athavale
This commit highlights the key functionalities that will be improved upon in a future patch set. Signed-off-by: Rohit Athavale --- drivers/staging/xm2mvscale/TODO | 18 ++ 1 file changed, 18 insertions(+) create mode 100644 drivers/staging/xm2mvscale/TODO diff --git a/drivers/s

[PATCH v2 3/3] Documentation: devicetree: bindings: Add DT binding doc for xm2mvsc driver

2018-02-21 Thread Rohit Athavale
This commit adds the binding doc for the DT that the driver expects. Driver has been tested against Zynq US+ board. Signed-off-by: Rohit Athavale --- .../devicetree/bindings/xm2mvscaler.txt| 25 ++ 1 file changed, 25 insertions(+) create mode 100644 drivers/stag

[PATCH v2 0/3] Initial driver support for Xilinx M2M Video Scaler

2018-02-21 Thread Rohit Athavale
This patch series has three commits : - Driver support for the Xilinx M2M Video Scaler IP - TODO document - DT binding doc Changes in HW register map is expected as the IP undergoes changes. This is a first attempt at the driver as an early prototype. This is a M2M Video Scaler IP that uses po

Re: [PATCH] uvcvideo: add quirk to force Phytec CAM 004H to GBRG

2018-02-21 Thread Laurent Pinchart
Hi Christoph, (CC'ing Philipp Zabel) On Wednesday, 21 February 2018 22:42:45 EET Christoph Fritz wrote: > Hi Laurent > > > Could you please send me the output of 'lsusb -d 199e:8302 -v' (if > > possible running as root) ? > > please see bottom of this mail > > >> Signed-off-by: Christoph Fritz

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

2018-02-21 Thread Sakari Ailus
Hi Laurent and Hans, On Wed, Feb 21, 2018 at 10:16:25PM +0200, Laurent Pinchart wrote: > No, I'm sorry, for MC-based drivers this isn't correct. The media entity that > symbolizes the DMA engine indeed has a sink pad, but it's a video node, not a > subdev. It thus has no media bus format configu

Re: [PATCH] uvcvideo: add quirk to force Phytec CAM 004H to GBRG

2018-02-21 Thread Laurent Pinchart
Hi Christoph, Thank you for the patch. On Wednesday, 21 February 2018 13:26:29 EET Christoph Fritz wrote: > This patch adds a quirk to force Phytec CAM 004H to format GBRG because > it is announcing its format wrong. Could you please send me the output of 'lsusb -d 199e:8302 -v' (if possible ru

Re: [PATCH] uvcvideo: add quirk to force Phytec CAM 004H to GBRG

2018-02-21 Thread Christoph Fritz
Hi Laurent > Could you please send me the output of 'lsusb -d 199e:8302 -v' (if possible > running as root) ? please see bottom of this mail > > Signed-off-by: Christoph Fritz > > Tested-by: Norbert Wesp > > --- > > drivers/media/usb/uvc/uvc_driver.c | 16 > > drivers/media/

Re: [PATCH v9 11/11] media: i2c: ov7670: Fully set mbus frame fmt

2018-02-21 Thread Laurent Pinchart
Hi Jacopo, On Tuesday, 20 February 2018 10:58:57 EET jacopo mondi wrote: > On Mon, Feb 19, 2018 at 09:19:32PM +0200, Laurent Pinchart wrote: > > On Monday, 19 February 2018 18:59:44 EET Jacopo Mondi wrote: > >> The sensor driver sets mbus format colorspace information and sizes, > >> but not ycbcr

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

2018-02-21 Thread Laurent Pinchart
Hi Hans, On Tuesday, 20 February 2018 10:37:22 EET Hans Verkuil wrote: > On 02/19/2018 11:28 PM, Niklas Söderlund wrote: > > Hi Hans, > > > > Thanks for your feedback. > > > > [snip] > > > >> Can you then fix v4l2-compliance to stop testing colorspace > >> against 0xff > >> ? >

Re: [PATCHv2] media: add tuner standby op, use where needed

2018-02-21 Thread Laurent Pinchart
Hi Hans, On Wednesday, 21 February 2018 15:11:36 EET Hans Verkuil wrote: > On 02/21/18 13:37, Laurent Pinchart wrote: > > On Wednesday, 21 February 2018 09:40:29 EET Hans Verkuil wrote: > >> On 02/21/2018 01:02 AM, Laurent Pinchart wrote: > >>> On Tuesday, 20 February 2018 11:44:20 EET Hans Verkui

Re: [PATCH v10 04/10] ARM: dts: r7s72100: Add Capture Engine Unit (CEU)

2018-02-21 Thread Simon Horman
On Wed, Feb 21, 2018 at 06:47:58PM +0100, Jacopo Mondi wrote: > Add Capture Engine Unit (CEU) node to device tree. > > Signed-off-by: Jacopo Mondi > Reviewed-by: Geert Uytterhoeven > Reviewed-by: Laurent Pinchart > Acked-by: Hans Verkuil This patch depends on the binding for "renesas,r7s72100

[PATCH v1] media: ov13858: Update to SPDX identifier

2018-02-21 Thread Chiranjeevi Rapolu
Replace GPL v2 license notice with SPDX license identifier. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov13858.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c index bf7d06f..c7183a4 1006

[PATCH v1] media: ov5670: Update to SPDX identifier

2018-02-21 Thread Chiranjeevi Rapolu
Replace GPL v2 license notice with SPDX license identifier. Signed-off-by: Chiranjeevi Rapolu --- drivers/media/i2c/ov5670.c | 15 ++- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c index 9f91965..b1b0409 100644

[PATCH v10 00/10] Renesas Capture Engine Unit (CEU) V4L2 driver

2018-02-21 Thread Jacopo Mondi
Hello, 10th round, one step closer to finalize CEU inclusion (hopefully). I have dropped patch 11/11 of v9 as it is still a debated topic and I would like to have it clarified without blocking this series. In patch [3/10] Hans noticed that after changing input, format should be set on CEU agai

[PATCH v10 01/10] dt-bindings: media: Add Renesas CEU bindings

2018-02-21 Thread Jacopo Mondi
Add bindings documentation for Renesas Capture Engine Unit (CEU). Signed-off-by: Jacopo Mondi Reviewed-by: Rob Herring Reviewed-by: Laurent Pinchart Acked-by: Hans Verkuil --- .../devicetree/bindings/media/renesas,ceu.txt | 81 ++ 1 file changed, 81 insertions(+) cre

[PATCH v10 02/10] include: media: Add Renesas CEU driver interface

2018-02-21 Thread Jacopo Mondi
Add renesas-ceu header file. Do not remove the existing sh_mobile_ceu.h one as long as the original driver does not go away. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Acked-by: Hans Verkuil --- include/media/drv-intf/renesas-ceu.h | 26 ++ 1 file change

[PATCH v10 04/10] ARM: dts: r7s72100: Add Capture Engine Unit (CEU)

2018-02-21 Thread Jacopo Mondi
Add Capture Engine Unit (CEU) node to device tree. Signed-off-by: Jacopo Mondi Reviewed-by: Geert Uytterhoeven Reviewed-by: Laurent Pinchart Acked-by: Hans Verkuil --- arch/arm/boot/dts/r7s72100.dtsi | 15 --- 1 file changed, 12 insertions(+), 3 deletions(-) diff --git a/arch/arm

[PATCH v10 03/10] media: platform: Add Renesas CEU driver

2018-02-21 Thread Jacopo Mondi
Add driver for Renesas Capture Engine Unit (CEU). The CEU interface supports capturing 'data' (YUV422) and 'images' (NV[12|21|16|61]). This driver aims to replace the soc_camera-based sh_mobile_ceu one. Tested with ov7670 camera sensor, providing YUYV_2X8 data on Renesas RZ platform GR-Peach. T

[PATCH v10 06/10] media: i2c: ov772x: Remove soc_camera dependencies

2018-02-21 Thread Jacopo Mondi
Remove soc_camera framework dependencies from ov772x sensor driver. - Handle clock and gpios - Register async subdevice - Remove soc_camera specific g/s_mbus_config operations - Change image format colorspace from JPEG to SRGB as the two use the same colorspace information but JPEG makes assumpti

[PATCH v10 07/10] media: i2c: ov772x: Support frame interval handling

2018-02-21 Thread Jacopo Mondi
Add support to ov772x driver for frame intervals handling and enumeration. Tested with 10MHz and 24MHz input clock at VGA and QVGA resolutions for 10, 15 and 30 frame per second rates. Signed-off-by: Jacopo Mondi Reviewed-by: Laurent Pinchart Acked-by: Hans Verkuil --- drivers/media/i2c/ov772x

[PATCH v10 08/10] media: i2c: Copy tw9910 soc_camera sensor driver

2018-02-21 Thread Jacopo Mondi
Copy the soc_camera based driver in v4l2 sensor driver directory. This commit just copies the original file without modifying it. No modification to KConfig and Makefile as soc_camera framework dependencies need to be removed first in next commit. Signed-off-by: Jacopo Mondi Acked-by: Laurent Pin

[PATCH v10 09/10] media: i2c: tw9910: Remove soc_camera dependencies

2018-02-21 Thread Jacopo Mondi
Remove soc_camera framework dependencies from tw9910 sensor driver. - Handle clock and gpios - Register async subdevice - Remove soc_camera specific g/s_mbus_config operations - Add kernel doc to driver interface header file - Adjust build system This commit does not remove the original soc_camera

[PATCH v10 10/10] arch: sh: migor: Use new renesas-ceu camera driver

2018-02-21 Thread Jacopo Mondi
Migo-R platform uses sh_mobile_ceu camera driver, which is now being replaced by a proper V4L2 camera driver named 'renesas-ceu'. Move Migo-R platform to use the v4l2 renesas-ceu camera driver interface and get rid of soc_camera defined components used to register sensor drivers and of platform sp

[PATCH v10 05/10] media: i2c: Copy ov772x soc_camera sensor driver

2018-02-21 Thread Jacopo Mondi
Copy the soc_camera based driver in v4l2 sensor driver directory. This commit just copies the original file without modifying it. No modification to KConfig and Makefile as soc_camera framework dependencies need to be removed first in next commit. Signed-off-by: Jacopo Mondi Acked-by: Laurent Pin

Re: [PATCH v9 03/11] media: platform: Add Renesas CEU driver

2018-02-21 Thread jacopo mondi
Hi Laurent, Hans, On Wed, Feb 21, 2018 at 02:02:59PM +0100, Hans Verkuil wrote: > On 02/21/18 13:29, Laurent Pinchart wrote: > > Hi Hans, > > > > On Wednesday, 21 February 2018 14:03:24 EET Hans Verkuil wrote: > >> On 02/19/18 17:59, Jacopo Mondi wrote: > >>> Add driver for Renesas Capture Engine

Re: [PATCH v9 11/11] media: i2c: ov7670: Fully set mbus frame fmt

2018-02-21 Thread Hans Verkuil
On 02/21/2018 04:47 PM, jacopo mondi wrote: > Hello again, > > On Tue, Feb 20, 2018 at 09:58:57AM +0100, jacopo mondi wrote: >> Hi Laurent, >> >> On Mon, Feb 19, 2018 at 09:19:32PM +0200, Laurent Pinchart wrote: >>> Hi Jacopo, >>> >>> Thank you for the patch. >>> >>> On Monday, 19 February 2018 18

Re: [PATCH v9 11/11] media: i2c: ov7670: Fully set mbus frame fmt

2018-02-21 Thread jacopo mondi
Hello again, On Tue, Feb 20, 2018 at 09:58:57AM +0100, jacopo mondi wrote: > Hi Laurent, > > On Mon, Feb 19, 2018 at 09:19:32PM +0200, Laurent Pinchart wrote: > > Hi Jacopo, > > > > Thank you for the patch. > > > > On Monday, 19 February 2018 18:59:44 EET Jacopo Mondi wrote: > > > The sensor drive

[PATCHv4 05/15] v4l2-subdev: implement VIDIOC_DBG_G_CHIP_INFO ioctl

2018-02-21 Thread Hans Verkuil
The VIDIOC_DBG_G/S_REGISTER ioctls imply that VIDIOC_DBG_G_CHIP_INFO is also present, since without that you cannot use v4l2-dbg. Just like the implementation in v4l2-ioctl.c this can be implemented in the core and no drivers need to be modified. It also makes it possible for v4l2-compliance to p

[PATCHv4 02/15] vimc: use correct subdev functions

2018-02-21 Thread Hans Verkuil
Instead of calling everything a MEDIA_ENT_F_ATV_DECODER, pick the correct functions for these blocks. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- drivers/media/platform/vimc/vimc-debayer.c | 2 +- drivers/media/platform/vimc/vimc-scaler.c | 2 +- drivers/media/platform/vimc/vimc-sen

[PATCHv4 13/15] media: document the reservedX fields in media_v2_topology

2018-02-21 Thread Hans Verkuil
The MEDIA_IOC_G_TOPOLOGY documentation didn't document the reservedX fields. Related to that was that the documented type of the num_* fields was also wrong. Fix both. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- .../media/uapi/mediactl/media-ioc-g-topology.rst | 52 +++

[PATCHv4 14/15] media-ioc-enum-entities/links.rst: document reserved fields

2018-02-21 Thread Hans Verkuil
These structures have reserved fields that were never documented. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- .../media/uapi/mediactl/media-ioc-enum-entities.rst | 19 +++ .../media/uapi/mediactl/media-ioc-enum-links.rst | 18 ++ 2 files changed

[PATCHv4 06/15] subdev-formats.rst: fix incorrect types

2018-02-21 Thread Hans Verkuil
The ycbcr_enc, quantization and xfer_func fields are __u16 and not enums. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- Documentation/media/uapi/v4l/subdev-formats.rst | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Documentation/media/uapi/v4l/subdev-formats.

[PATCHv4 04/15] v4l2-subdev: clear reserved fields

2018-02-21 Thread Hans Verkuil
Clear the reserved fields for these ioctls according to the specification: VIDIOC_SUBDEV_ENUM_FRAME_INTERVAL VIDIOC_SUBDEV_ENUM_FRAME_SIZE VIDIOC_SUBDEV_ENUM_MBUS_CODE VIDIOC_SUBDEV_G_CROP, VIDIOC_SUBDEV_S_CROP VIDIOC_SUBDEV_G_FMT, VIDIOC_SUBDEV_S_FMT VIDIOC_SUBDEV_G_FRAME_INTERVAL, VIDIOC_SUBDEV_

[PATCHv4 07/15] media-ioc-g-topology.rst: fix interface-to-entity link description

2018-02-21 Thread Hans Verkuil
The source_id and sink_id descriptions were the same for interface-to-entity links. The source_id is the interface ID, not the entity ID. Fix this. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- Documentation/media/uapi/mediactl/media-ioc-g-topology.rst | 2 +- 1 file changed, 1 inserti

[PATCHv4 09/15] media: media-types.rst: fix typo

2018-02-21 Thread Hans Verkuil
From: Alexandre Courbot with -> which Signed-off-by: Alexandre Courbot Acked-by: Sakari Ailus --- Documentation/media/uapi/mediactl/media-types.rst | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Documentation/media/uapi/mediactl/media-types.rst b/Documentation/media/uapi

[PATCHv4 03/15] v4l2-subdev: without controls return -ENOTTY

2018-02-21 Thread Hans Verkuil
If the subdev did not define any controls, then return -ENOTTY if userspace attempts to call these ioctls. The control framework functions will return -EINVAL, not -ENOTTY if vfh->ctrl_handler is NULL. Several of these framework functions are also called directly from drivers, so I don't want to

[PATCHv4 10/15] media-device.c: zero reserved fields

2018-02-21 Thread Hans Verkuil
MEDIA_IOC_SETUP_LINK didn't zero the reserved field of the media_link_desc struct. Do so in media_device_setup_link(). MEDIA_IOC_ENUM_LINKS didn't zero the reserved field of the media_links_enum struct. Do so in media_device_enum_links(). Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus ---

[PATCHv4 12/15] media: zero reservedX fields in media_v2_topology

2018-02-21 Thread Hans Verkuil
The MEDIA_IOC_G_TOPOLOGY implementation did not zero the reservedX fields. Fix this. Found with v4l2-compliance. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- drivers/media/media-device.c | 4 1 file changed, 4 insertions(+) diff --git a/drivers/media/media-device.c b/drivers/me

[PATCHv4 08/15] media-types.rst: fix type, small improvements

2018-02-21 Thread Hans Verkuil
data conector -> connector ... -> etc. '...' looked odd when my browser put the ... by itself on the next line, 'etc.' is clearer IMHO. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- Documentation/media/uapi/mediactl/media-types.rst | 10 +- 1 file changed, 5 insertions(+), 5

[PATCHv4 00/15] Media Controller compliance fixes

2018-02-21 Thread Hans Verkuil
From: Hans Verkuil Hi all, Here is v4 of this patch series fixing various MC compliance and documentation issues. Changes since v3: - Added Acks from Sakari - Incorporated Sakari's comments for the final patch (media.h). Changes since v2: - I dropped "v4l2-ioctl.c: fix VIDIOC_DV_TIMINGS_CAP:

[PATCHv4 15/15] media.h: reorganize header to make it easier to understand

2018-02-21 Thread Hans Verkuil
The media.h public header is very messy. It mixes legacy and 'new' defines and it is not easy to figure out what should and what shouldn't be used. It also contains confusing comment that are either out of date or completely uninteresting for anyone that needs to use this header. The patch groups

[PATCHv4 11/15] media.h: fix confusing typo in comment

2018-02-21 Thread Hans Verkuil
Subdevs are initialized with MEDIA_ENT_F_V4L2_SUBDEV_UNKNOWN, not MEDIA_ENT_T_V4L2_SUBDEV_UNKNOWN. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- include/uapi/linux/media.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/media.h b/include/uapi/linu

[PATCHv4 01/15] vimc: fix control event handling

2018-02-21 Thread Hans Verkuil
The sensor subdev didn't handle control events. Add support for this. Found with v4l2-compliance. Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus --- drivers/media/platform/vimc/vimc-common.c | 4 +++- drivers/media/platform/vimc/vimc-sensor.c | 8 2 files changed, 11 insertions(+),

Re: [PATCH v9 07/11] media: i2c: ov772x: Support frame interval handling

2018-02-21 Thread Hans Verkuil
On 02/21/18 16:16, jacopo mondi wrote: >>> static const struct v4l2_subdev_pad_ops ov772x_subdev_pad_ops = { >>> - .enum_mbus_code = ov772x_enum_mbus_code, >>> - .get_selection = ov772x_get_selection, >>> - .get_fmt= ov772x_get_fmt, >>> - .set_fmt= ov772x_set_fmt, >>> +

Re: [PATCHv3 15/15] media.h: reorganize header to make it easier to understand

2018-02-21 Thread Hans Verkuil
On 02/21/18 16:14, Sakari Ailus wrote: > Hi Hans, > > On Wed, Feb 21, 2018 at 03:33:03PM +0100, Hans Verkuil wrote: >> On 02/21/18 15:15, Sakari Ailus wrote: >>> Hi Hans, >>> >>> On Mon, Feb 19, 2018 at 11:38:06AM +0100, Hans Verkuil wrote: The media.h public header is very messy. It mixes le

Re: [PATCH v9 07/11] media: i2c: ov772x: Support frame interval handling

2018-02-21 Thread jacopo mondi
Hi Hans, On Wed, Feb 21, 2018 at 01:12:14PM +0100, Hans Verkuil wrote: [snip] > > +static int ov772x_g_frame_interval(struct v4l2_subdev *sd, > > + struct v4l2_subdev_frame_interval *ival) > > +{ > > + struct ov772x_priv *priv = to_ov772x(sd); > > + struct v4l2_f

Re: [PATCHv3 15/15] media.h: reorganize header to make it easier to understand

2018-02-21 Thread Sakari Ailus
Hi Hans, On Wed, Feb 21, 2018 at 03:33:03PM +0100, Hans Verkuil wrote: > On 02/21/18 15:15, Sakari Ailus wrote: > > Hi Hans, > > > > On Mon, Feb 19, 2018 at 11:38:06AM +0100, Hans Verkuil wrote: > >> The media.h public header is very messy. It mixes legacy and 'new' defines > >> and it is not eas

Re: [PATCHv3 15/15] media.h: reorganize header to make it easier to understand

2018-02-21 Thread Hans Verkuil
On 02/21/18 15:15, Sakari Ailus wrote: > Hi Hans, > > On Mon, Feb 19, 2018 at 11:38:06AM +0100, Hans Verkuil wrote: >> The media.h public header is very messy. It mixes legacy and 'new' defines >> and it is not easy to figure out what should and what shouldn't be used. It >> also contains confusin

Re: [PATCHv3 10/15] media-device.c: zero reserved fields

2018-02-21 Thread Sakari Ailus
On Wed, Feb 21, 2018 at 02:17:37PM +0100, Hans Verkuil wrote: > On 02/21/18 13:49, Sakari Ailus wrote: > > On Mon, Feb 19, 2018 at 11:38:01AM +0100, Hans Verkuil wrote: > >> MEDIA_IOC_SETUP_LINK didn't zero the reserved field of the media_link_desc > >> struct. Do so in media_device_setup_link(). >

Re: [PATCHv3 15/15] media.h: reorganize header to make it easier to understand

2018-02-21 Thread Sakari Ailus
Hi Hans, On Mon, Feb 19, 2018 at 11:38:06AM +0100, Hans Verkuil wrote: > The media.h public header is very messy. It mixes legacy and 'new' defines > and it is not easy to figure out what should and what shouldn't be used. It > also contains confusing comment that are either out of date or complet

Re: [PATCH v9 03/11] media: platform: Add Renesas CEU driver

2018-02-21 Thread Hans Verkuil
On 02/21/18 13:29, Laurent Pinchart wrote: > Hi Hans, > > On Wednesday, 21 February 2018 14:03:24 EET Hans Verkuil wrote: >> On 02/19/18 17:59, Jacopo Mondi wrote: >>> Add driver for Renesas Capture Engine Unit (CEU). >>> >>> The CEU interface supports capturing 'data' (YUV422) and 'images' >>> (N

Re: [PATCHv2] media: add tuner standby op, use where needed

2018-02-21 Thread Hans Verkuil
On 02/21/18 13:37, Laurent Pinchart wrote: > Hi Hans, > > On Wednesday, 21 February 2018 09:40:29 EET Hans Verkuil wrote: >> On 02/21/2018 01:02 AM, Laurent Pinchart wrote: >>> On Tuesday, 20 February 2018 11:44:20 EET Hans Verkuil wrote: The v4l2_subdev core s_power op was used for two diffe

Re: [PATCHv3 10/15] media-device.c: zero reserved fields

2018-02-21 Thread Hans Verkuil
On 02/21/18 13:49, Sakari Ailus wrote: > On Mon, Feb 19, 2018 at 11:38:01AM +0100, Hans Verkuil wrote: >> MEDIA_IOC_SETUP_LINK didn't zero the reserved field of the media_link_desc >> struct. Do so in media_device_setup_link(). >> >> MEDIA_IOC_ENUM_LINKS didn't zero the reserved field of the media_

Re: [PATCHv3 05/15] v4l2-subdev: implement VIDIOC_DBG_G_CHIP_INFO ioctl

2018-02-21 Thread Sakari Ailus
On Mon, Feb 19, 2018 at 11:37:56AM +0100, Hans Verkuil wrote: > The VIDIOC_DBG_G/S_REGISTER ioctls imply that VIDIOC_DBG_G_CHIP_INFO is also > present, since without that you cannot use v4l2-dbg. > > Just like the implementation in v4l2-ioctl.c this can be implemented in the > core and no drivers

Re: [PATCHv3 14/15] media-ioc-enum-entities/links.rst: document reserved fields

2018-02-21 Thread Sakari Ailus
On Mon, Feb 19, 2018 at 11:38:05AM +0100, Hans Verkuil wrote: > These structures have reserved fields that were never documented. > > Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

Re: [PATCHv3 13/15] media: document the reservedX fields in media_v2_topology

2018-02-21 Thread Sakari Ailus
On Mon, Feb 19, 2018 at 11:38:04AM +0100, Hans Verkuil wrote: > The MEDIA_IOC_G_TOPOLOGY documentation didn't document the reservedX > fields. Related to that was that the documented type of the num_* fields > was also wrong. > > Fix both. > > Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus

Re: [PATCHv3 12/15] media: zero reservedX fields in media_v2_topology

2018-02-21 Thread Sakari Ailus
On Mon, Feb 19, 2018 at 11:38:03AM +0100, Hans Verkuil wrote: > The MEDIA_IOC_G_TOPOLOGY implementation did not zero the reservedX fields. > Fix this. > > Found with v4l2-compliance. > > Signed-off-by: Hans Verkuil Acked-by: Sakari Ailus -- Sakari Ailus e-mail: sakari.ai...@iki.fi

Re: [PATCHv3 10/15] media-device.c: zero reserved fields

2018-02-21 Thread Sakari Ailus
On Mon, Feb 19, 2018 at 11:38:01AM +0100, Hans Verkuil wrote: > MEDIA_IOC_SETUP_LINK didn't zero the reserved field of the media_link_desc > struct. Do so in media_device_setup_link(). > > MEDIA_IOC_ENUM_LINKS didn't zero the reserved field of the media_links_enum > struct. Do so in media_device_e

Re: [PATCHv2] media: add tuner standby op, use where needed

2018-02-21 Thread Laurent Pinchart
Hi Hans, On Wednesday, 21 February 2018 09:40:29 EET Hans Verkuil wrote: > On 02/21/2018 01:02 AM, Laurent Pinchart wrote: > > On Tuesday, 20 February 2018 11:44:20 EET Hans Verkuil wrote: > >> The v4l2_subdev core s_power op was used for two different things: power > >> on/off sensors or video de

Re: [PATCH v9 03/11] media: platform: Add Renesas CEU driver

2018-02-21 Thread Laurent Pinchart
Hi Hans, On Wednesday, 21 February 2018 14:03:24 EET Hans Verkuil wrote: > On 02/19/18 17:59, Jacopo Mondi wrote: > > Add driver for Renesas Capture Engine Unit (CEU). > > > > The CEU interface supports capturing 'data' (YUV422) and 'images' > > (NV[12|21|16|61]). > > > > This driver aims to rep

Re: [PATCH v9 07/11] media: i2c: ov772x: Support frame interval handling

2018-02-21 Thread Hans Verkuil
On 02/19/18 17:59, Jacopo Mondi wrote: > Add support to ov772x driver for frame intervals handling and enumeration. > Tested with 10MHz and 24MHz input clock at VGA and QVGA resolutions for > 10, 15 and 30 frame per second rates. > > Signed-off-by: Jacopo Mondi > Reviewed-by: Laurent Pinchart >

Re: [PATCH v9 06/11] media: i2c: ov772x: Remove soc_camera dependencies

2018-02-21 Thread Hans Verkuil
On 02/19/18 17:59, Jacopo Mondi wrote: > Remove soc_camera framework dependencies from ov772x sensor driver. > - Handle clock and gpios > - Register async subdevice > - Remove soc_camera specific g/s_mbus_config operations > - Change image format colorspace from JPEG to SRGB as the two use the >

Re: [PATCH v9 03/11] media: platform: Add Renesas CEU driver

2018-02-21 Thread Hans Verkuil
On 02/19/18 17:59, Jacopo Mondi wrote: > Add driver for Renesas Capture Engine Unit (CEU). > > The CEU interface supports capturing 'data' (YUV422) and 'images' > (NV[12|21|16|61]). > > This driver aims to replace the soc_camera-based sh_mobile_ceu one. > > Tested with ov7670 camera sensor, prov

Re: [PATCH] v4l2-compliance: Relax g/s_parm type check

2018-02-21 Thread Hans Verkuil
Hi Jacopo, I've made a different implementation which is simpler. It's just been committed. Thanks for the report and suggested patch though! Regards, Hans On 02/19/18 17:46, Jacopo Mondi wrote: > Since commit > > commit 2e564ee56978874ddd4a8d061d37be088f130fd9 > Author: Hans Verkuil

Re: stable-rc build: 3 warnings 0 failures (stable-rc/v4.14.20-119-g1b1ab1d)

2018-02-21 Thread gregkh
On Tue, Feb 20, 2018 at 04:22:04PM +0100, Arnd Bergmann wrote: > On Tue, Feb 20, 2018 at 1:47 PM, Olof's autobuilder wrote: > > > Warnings: > > > > arm64.allmodconfig: > > drivers/media/tuners/r820t.c:1334:1: warning: the frame size of 2896 bytes > > is larger than 2048 bytes [-Wframe-la

[PATCH] uvcvideo: add quirk to force Phytec CAM 004H to GBRG

2018-02-21 Thread Christoph Fritz
This patch adds a quirk to force Phytec CAM 004H to format GBRG because it is announcing its format wrong. Signed-off-by: Christoph Fritz Tested-by: Norbert Wesp --- drivers/media/usb/uvc/uvc_driver.c | 16 drivers/media/usb/uvc/uvcvideo.h | 1 + 2 files changed, 17 insertio

[ALPHA PATCH] vivid: add media device

2018-02-21 Thread Hans Verkuil
Add support for the media controller to the vivid driver. Very preliminary, but enough to help out Alexandre. I need to add other entities representing tuner and video receivers and transmitters, i.e. give it a proper MC graph. Signed-off-by: Hans Verkuil --- diff --git a/drivers/media/platform

Re: [PATCH v2] media: staging/imx: Implement init_cfg subdev pad op

2018-02-21 Thread Philipp Zabel
On Sun, 2018-02-11 at 10:29 -0800, Steve Longerbeam wrote: > Implement the init_cfg pad op in all imx-media subdevices. The try > formats are initialized to the current active formats on all pads. > > Signed-off-by: Steve Longerbeam > --- > Changes since v1: > - It isn't necessary to acquire the

Re: [PATCH] media: imx: mipi csi-2: Fix set_fmt try

2018-02-21 Thread Philipp Zabel
On Sun, 2018-02-11 at 10:51 -0800, Steve Longerbeam wrote: > csi2_set_fmt() was setting the try_fmt only on the first pad, and pad > index was ignored. Fix by introducing __csi2_get_fmt(). > > Signed-off-by: Steve Longerbeam > --- > drivers/staging/media/imx/imx6-mipi-csi2.c | 24 +++