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

2018-02-08 Thread Hans Verkuil
On 02/09/2018 07:01 AM, Tim Harvey wrote: >>> +static int >>> +tda1997x_g_input_status(struct v4l2_subdev *sd, u32 *status) >>> +{ >>> + struct tda1997x_state *state = to_state(sd); >>> + >>> + mutex_lock(>lock); >>> + if (state->detected_timings) >> >> What this actually tests if the

[PATCH v10 0/8] TDA1997x HDMI video reciver

2018-02-08 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 v10 3/8] media: add digital video decoder entity functions

2018-02-08 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 v10 1/8] v4l2-dv-timings: add v4l2_hdmi_colorimetry()

2018-02-08 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 v10 7/8] ARM: dts: imx: Add TDA19971 HDMI Receiver to GW54xx

2018-02-08 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 v10 4/8] MAINTAINERS: add entry for NXP TDA1997x driver

2018-02-08 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:

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

2018-02-08 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 v10 8/8] ARM: dts: imx: Add TDA19971 HDMI Receiver to GW551x

2018-02-08 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 v10 2/8] media: v4l-ioctl: fix clearing pad for VIDIOC_DV_TIMIGNS_CAP

2018-02-08 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 v10 6/8] media: i2c: Add TDA1997x HDMI receiver driver

2018-02-08 Thread Tim Harvey
Add support for the TDA1997x HDMI receivers. Cc: Hans Verkuil Signed-off-by: Tim Harvey --- v10: - removed unnecessary check for !timings in get/set/query dv timings (Hans) - dropped pointless s_stream handler (Hans) - remove need for

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

2018-02-08 Thread Tim Harvey
On Thu, Feb 8, 2018 at 7:06 AM, Hans Verkuil wrote: > Hi Tim, > > I was so hoping I could make a pull request for this, but I still found > problems with g/s/query_dv_timings. > > I strongly suspect that v4l2-compliance would fail if you boot up the system > *without* a source

cron job: media_tree daily build: ERRORS

2018-02-08 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 Feb 9 05:00:22 CET 2018 media-tree git hash:273caa260035c03d89ad63d72d8cd3d9e5c5e3f1 media_build

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

2018-02-08 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 v2 8/9] v4l: xilinx: dma: Get scaling and padding factor to calculate DMA params

2018-02-08 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 v2 2/9] media: xilinx: vip: Add the pixel format for RGB24

2018-02-08 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 v2 6/9] v4l: xilinx: dma: Add multi-planar support

2018-02-08 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 v2 3/9] uapi: media: New fourcc codes needed by Xilinx Video IP

2018-02-08 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 v2 0/9] Add support for multi-planar formats and 10 bit formats

2018-02-08 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

[PATCH v2 5/9] v4l: xilinx: dma: Update video format descriptor

2018-02-08 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 v2 1/9] v4l: xilinx: dma: Remove colorspace check in xvip_dma_verify_format

2018-02-08 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 v2 4/9] media-bus: uapi: Add YCrCb 420 media bus format

2018-02-08 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 v2 7/9] v4l: xilinx: dma: Add scaling and padding factor functions

2018-02-08 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] media: intel-ipu3: cio2: Disable and sync irq before stream off

2018-02-08 Thread Yong Zhi
This is to avoid pending interrupts to be handled during stream off, in which case, the ready buffer will be removed from buffer list, thus not all buffers can be returned to VB2 as expected. Disable CIO2 irq at cio2_hw_exit() so no new interrupts are generated. Signed-off-by: Yong Zhi

Re: [PATCH 2/2] drm: adv7511: Add support for i2c_new_secondary_device

2018-02-08 Thread Laurent Pinchart
Hi Kieran, On Thursday, 8 February 2018 01:30:43 EET Kieran Bingham wrote: > On 07/02/18 21:59, Laurent Pinchart wrote: > > On Wednesday, 7 February 2018 17:14:09 EET Kieran Bingham wrote: > >> On 29/01/18 10:26, Laurent Pinchart wrote: > >>> On Monday, 22 January 2018 14:50:00 EET Kieran Bingham

Re: [PATCH v3 2/2] v4l: cadence: Add Cadence MIPI-CSI2 TX driver

2018-02-08 Thread Laurent Pinchart
Hi Maxime, Thank you for the patch. On Wednesday, 7 February 2018 16:26:43 EET Maxime Ripard wrote: > The Cadence MIPI-CSI2 TX controller is an hardware block meant to be used > as a bridge between pixel interfaces and a CSI-2 bus. > > It supports operating with an internal or external D-PHY,

Re: [PATCH] media: imx: csi: fix enum_mbus_code for unknown mbus format codes

2018-02-08 Thread Hans Verkuil
On 02/08/2018 08:27 PM, Steve Longerbeam wrote: > > > On 02/08/2018 06:47 AM, Philipp Zabel wrote: >> If no imx_media_pixfmt is found for a given mbus format code, >> we shouldn't crash. Return -EINVAL for any index. > > Hi Philipp, > > If imx_media_find_mbus_format() returns NULL at that

[PATCH 2/7] [media] staging/cxd2099: convert to regmap API

2018-02-08 Thread Daniel Scheller
From: Daniel Scheller Convert the cxd2099 driver to use regmap for I2C accesses, removing all own i2c_*() functions. With that, make the driver a proper I2C client driver. This also adds the benefit of having a proper cleanup function (cxd2099_remove() in this case) that

[PATCH 1/7] [media] ddbridge/ci: further deduplicate code/logic in ddb_ci_attach()

2018-02-08 Thread Daniel Scheller
From: Daniel Scheller Deduplicate the checks for a valid ptr in port->en, and also handle the default case to also catch eventually yet unsupported CI hardware. Signed-off-by: Daniel Scheller --- drivers/media/pci/ddbridge/ddbridge-ci.c | 12

[PATCH 0/7] cxd2099: convert to regmap API and move out of staging

2018-02-08 Thread Daniel Scheller
From: Daniel Scheller Patch series done by Jasmin and me. This patch series, besides one little cosmetic fix in ddbridge, converts the cxd2099 CI controller driver to the regmap API and thus makes it a proper I2C client driver. This not only moves it away from the legacy/

[PATCH 3/7] [media] ddbridge: adapt cxd2099 attach to new i2c_client way

2018-02-08 Thread Daniel Scheller
From: Daniel Scheller Change the way the cxd2099 hardware is being attached to the new I2C client interface way. Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich --- drivers/media/pci/ddbridge/ddbridge-ci.c | 62

[PATCH 4/7] [media] ngene: adapt cxd2099 attach to the new i2c_client way

2018-02-08 Thread Daniel Scheller
From: Daniel Scheller Change the way the cxd2099 hardware is being attached to the new I2C client interface way. Signed-off-by: Daniel Scheller Signed-off-by: Jasmin Jessich --- drivers/media/pci/ngene/ngene-core.c | 41

[PATCH 6/7] [media] cxd2099: move driver out of staging into dvb-frontends

2018-02-08 Thread Daniel Scheller
From: Daniel Scheller According to the TODO file, this driver only landed in staging because of the way device nodes and data transfers are handled. Besides that this way (use of secX devices) has become sort of standard to date (ie. VDR supports this literally since ages via

[PATCH 7/7] [media] MAINTAINERS: add entry for cxd2099

2018-02-08 Thread Daniel Scheller
From: Jasmin Jessich The cxd2099 driver is now maintained and being taken care of by * Jasmin Jessich Signed-off-by: Jasmin Jessich --- MAINTAINERS | 8 1 file changed, 8 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index

[PATCH 5/7] [media] staging/cxd2099: remove remainders from old attach way

2018-02-08 Thread Daniel Scheller
From: Daniel Scheller As all drivers using the cxd2099 are converted to handle attach/detach the generic I2C client way, the static inline cxd2099_attach isn't required anymore. Thus cleanup cxd2099.h from the remainders, the adr struct member isn't used anymore aswell.

Re: [PATCH] media: imx: csi: fix enum_mbus_code for unknown mbus format codes

2018-02-08 Thread Steve Longerbeam
On 02/08/2018 06:47 AM, Philipp Zabel wrote: If no imx_media_pixfmt is found for a given mbus format code, we shouldn't crash. Return -EINVAL for any index. Hi Philipp, If imx_media_find_mbus_format() returns NULL at that location, it means the current format has an invalid pixel code. It's

Re: [PATCH v3 1/2] dt-bindings: media: Add Cadence MIPI-CSI2 TX Device Tree bindings

2018-02-08 Thread Laurent Pinchart
Hi Maxime, Thank you for the patch. On Wednesday, 7 February 2018 16:26:42 EET Maxime Ripard wrote: > The Cadence MIPI-CSI2 TX controller is a CSI2 bridge that supports up to 4 > video streams and can output on up to 4 CSI-2 lanes, depending on the > hardware implementation. > > It can operate

RE: [PATCH] media: intel-ipu3: cio2: Synchronize irqs at stop_streaming

2018-02-08 Thread Zhi, Yong
Hi, Sakari, > -Original Message- > From: Sakari Ailus [mailto:sakari.ai...@iki.fi] > Sent: Wednesday, February 7, 2018 11:38 PM > To: Zhi, Yong > Cc: linux-media@vger.kernel.org; sakari.ai...@linux.intel.com; > tf...@chromium.org; Qiu, Tian Shu

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

2018-02-08 Thread Laurent Pinchart
Hi Maxime, Thank you for the patch. On Thursday, 8 February 2018 17:08:30 EET Maxime Ripard wrote: > The Cadence CSI-2 RX Controller is an hardware block meant to be used as a > bridge between a CSI-2 bus and pixel grabbers. > > It supports operating with internal or external D-PHY, with up to

[PATCH] cec: improve debugging

2018-02-08 Thread Hans Verkuil
cec_transmit_msg_fh() first checked the message for errors, and only after the message was found to be valid did it log the message contents. However, that makes it hard to associate an error in the kernel log with the message since the message contents was never logged in that case. So swap the

Re: [PATCH v3 4/8] i2c: ov9650: use 64-bit arithmetic instead of 32-bit

2018-02-08 Thread Gustavo A. R. Silva
Hi Sakari, On 02/07/2018 03:59 PM, Sakari Ailus wrote: Hi Gustavo, On Tue, Feb 06, 2018 at 10:47:50AM -0600, Gustavo A. R. Silva wrote: Add suffix ULL to constants 1 and 100 in order to give the compiler complete information about the proper arithmetic to use. Notice that these

Re: [PATCH v8 0/7] TDA1997x HDMI video reciver

2018-02-08 Thread Hans Verkuil
On 02/08/18 16:13, Philipp Zabel wrote: > On Thu, 2018-02-08 at 13:01 +0100, Hans Verkuil wrote: >>> These are likely to be filled correctly already. I've just added a commit >>> to v4l2-compliance to make it easier to see what function is used: >>> >>> v4l2-compliance -m0 -v >> >> Actually,

[PATCH v7 0/2] media: v4l: Add support for the Cadence MIPI-CSI2 RX

2018-02-08 Thread Maxime Ripard
Hi, Here is the seventh attempt at supporting the MIPI-CSI2 RX block from Cadence. This IP block is able to receive CSI data over up to 4 lanes, and split it to over 4 streams. Those streams are basically the interfaces to the video grabbers that will perform the capture. It is able to map

[PATCH v7 1/2] dt-bindings: media: Add Cadence MIPI-CSI2 RX Device Tree bindings

2018-02-08 Thread Maxime Ripard
The Cadence MIPI-CSI2 RX controller is a CSI2RX bridge that supports up to 4 CSI-2 lanes, and can route the frames to up to 4 streams, depending on the hardware implementation. It can operate with an external D-PHY, an internal one or no D-PHY at all in some configurations. Acked-by: Rob Herring

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

2018-02-08 Thread Maxime Ripard
The Cadence CSI-2 RX Controller is an hardware block meant to be used as a bridge between a CSI-2 bus and pixel grabbers. It supports operating with internal or external D-PHY, with up to 4 lanes, or without any D-PHY. The current code only supports the former case. It also support dynamic

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

2018-02-08 Thread Hans Verkuil
Hi Tim, I was so hoping I could make a pull request for this, but I still found problems with g/s/query_dv_timings. I strongly suspect that v4l2-compliance would fail if you boot up the system *without* a source connected. And I discovered that I was missing additional checks in the timings

[PATCH] media: imx: csi: fix enum_mbus_code for unknown mbus format codes

2018-02-08 Thread Philipp Zabel
If no imx_media_pixfmt is found for a given mbus format code, we shouldn't crash. Return -EINVAL for any index. Signed-off-by: Philipp Zabel --- drivers/staging/media/imx/imx-media-csi.c | 4 1 file changed, 4 insertions(+) diff --git

[GIT PULL FOR v4.17] sur40: add video controls for SUR40 driver

2018-02-08 Thread Hans Verkuil
The following changes since commit 273caa260035c03d89ad63d72d8cd3d9e5c5e3f1: media: v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs (2018-01-31 03:09:04 -0500) are available in the Git repository at: git://linuxtv.org/hverkuil/media_tree.git sur40 for you to fetch changes up

[PATCH 5/5] ov5670: Use v4l2_find_nearest_size

2018-02-08 Thread Sakari Ailus
Use v4l2_find_nearest_size instead of a driver specific function to find nearest matching size. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ov5670.c | 34 +++--- 1 file changed, 3 insertions(+), 31 deletions(-) diff --git

[PATCH 2/5] vivid: Use v4l2_find_nearest_size

2018-02-08 Thread Sakari Ailus
Use v4l2_find_nearest_size instead of a driver specific function to find nearest matching size. Signed-off-by: Sakari Ailus --- drivers/media/platform/vivid/vivid-vid-cap.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git

[PATCH 4/5] ov13858: Use v4l2_find_nearest_size

2018-02-08 Thread Sakari Ailus
Use v4l2_find_nearest_size instead of a driver specific function to find nearest matching size. Signed-off-by: Sakari Ailus --- drivers/media/i2c/ov13858.c | 37 +++-- 1 file changed, 3 insertions(+), 34 deletions(-) diff --git

[PATCH 0/5] Move finding the best match for size to V4L2 common

2018-02-08 Thread Sakari Ailus
Hi folks, This set should make it a bit easier to support finding the right size in sensor drivers. Two sensor drivers and vivid are converted as an example. I've tested the vivid change only but the patches are effectively the same and trivial. Sakari Ailus (5): v4l: common: Add a function

[PATCH 1/5] v4l: common: Add a function to obtain best size from a list

2018-02-08 Thread Sakari Ailus
Add a function (as well as a helper macro) to obtain the best size in a list of device specific sizes. This helps writing drivers as well as aligns interface behaviour across drivers. The struct in which this information is contained in is typically specific to the driver, therefore the existing

[PATCH 3/5] v4l: common: Remove v4l2_find_nearest_format

2018-02-08 Thread Sakari Ailus
v4l2_find_nearest_format is not useful for drivers in finding the best matching format as it assumes a V4L2 specific struct. Drivers will use v4l2_find_nearest_size instead. Signed-off-by: Sakari Ailus --- drivers/media/v4l2-core/v4l2-common.c | 26

[PATCH v2] media: ov5640: fix framerate update

2018-02-08 Thread Hugues Fruchet
After a framerate update through s_frame_interval(), the new framerate was not taken into account when streaming, but was taken into account on next session. This was due to sensor->current_mode not updated accordingly to new framerate setting in ov5640_s_frame_interval(). Signed-off-by: Hugues

[PATCH] media: ov5640: fix framerate update

2018-02-08 Thread Hugues Fruchet
After a framerate update through s_frame_interval(), the new framerate was not taken into account when streaming, but was taken into account on next session. This was due to sensor->current_mode not updated accordingly to new framerate setting in ov5640_s_frame_interval(). Change-Id:

Re: [PATCH v8 0/7] TDA1997x HDMI video reciver

2018-02-08 Thread Hans Verkuil
On 02/08/18 12:56, Hans Verkuil wrote: > On 02/08/18 11:46, Philipp Zabel wrote: >> On Wed, 2018-02-07 at 23:19 +0100, Hans Verkuil wrote: >>> On 02/07/2018 11:05 PM, Tim Harvey wrote: On Wed, Feb 7, 2018 at 1:09 AM, Hans Verkuil wrote: > On 02/07/18 09:22, Hans

Re: [PATCH v8 0/7] TDA1997x HDMI video reciver

2018-02-08 Thread Hans Verkuil
On 02/08/18 11:46, Philipp Zabel wrote: > On Wed, 2018-02-07 at 23:19 +0100, Hans Verkuil wrote: >> On 02/07/2018 11:05 PM, Tim Harvey wrote: >>> On Wed, Feb 7, 2018 at 1:09 AM, Hans Verkuil wrote: On 02/07/18 09:22, Hans Verkuil wrote: > On 02/07/2018 12:29 AM, Tim

Re: [PATCH] media: stm32-dcmi: add g/s_parm framerate support

2018-02-08 Thread Hugues FRUCHET
Thanks Hans, v2 sent, rebased on your helpers ! Best regards, Hugues. On 02/07/2018 06:52 PM, Hans Verkuil wrote: > On 02/07/2018 06:43 PM, Hugues Fruchet wrote: >> Add g/s_parm framerate support by calling subdev >> g/s_frame_interval ops. >> This allows user to control sensor framerate by >>

[PATCH v2] media: stm32-dcmi: add g/s_parm framerate support

2018-02-08 Thread Hugues Fruchet
Add g/s_parm framerate support by calling subdev g/s_frame_interval ops. This allows user to control sensor framerate by calling ioctl G/S_PARM. Signed-off-by: Hugues Fruchet --- version 2: - Rebase on Hans branch to use new helpers: See

Re: [PATCH v8 0/7] TDA1997x HDMI video reciver

2018-02-08 Thread Philipp Zabel
On Wed, 2018-02-07 at 23:19 +0100, Hans Verkuil wrote: > On 02/07/2018 11:05 PM, Tim Harvey wrote: > > On Wed, Feb 7, 2018 at 1:09 AM, Hans Verkuil wrote: > > > On 02/07/18 09:22, Hans Verkuil wrote: > > > > On 02/07/2018 12:29 AM, Tim Harvey wrote: > > > > > Media Controller

Re: [PATCH v5 04/16] media: rkisp1: add Rockchip MIPI Synopsys DPHY driver

2018-02-08 Thread Jacob Chen
Hi hans, 2018-02-06 21:21 GMT+08:00 Hans Verkuil : > On 12/29/17 08:52, Shunqian Zheng wrote: >> From: Jacob Chen >> >> This commit adds a subdev driver for Rockchip MIPI Synopsys DPHY driver >> >> Signed-off-by: Jacob Chen

[PATCH 2/2] media: ov5645: Improve mode finding function

2018-02-08 Thread Todor Tomov
Find the sensor mode by comparing the size of the requested image size and the sensor mode's image size. The distance between image sizes is the size in pixels of the non-overlapping regions between the requested size and the frame-specified size. This logic is borrowed from et8ek8 sensor driver.

[PATCH 1/2] media: ov5645: Fix write_reg return code

2018-02-08 Thread Todor Tomov
I2C transfer functions return number of successful operations (on success). Do not return the received positive return code but instead return 0 on success. The users of write_reg function already use this logic. Signed-off-by: Todor Tomov --- drivers/media/i2c/ov5645.c

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

2018-02-08 Thread Sakari Ailus
Hi Maxime, On Thu, Feb 08, 2018 at 11:05:08AM +0200, Sakari Ailus wrote: > Hi Maxime, > > Thanks for the update. Please see my comments below. > > On Wed, Feb 07, 2018 at 03:24:37PM +0100, Maxime Ripard wrote: > > The Cadence CSI-2 RX Controller is an hardware block meant to be used as a > >

Re: [PATCH v3 1/2] dt-bindings: media: Add Cadence MIPI-CSI2 TX Device Tree bindings

2018-02-08 Thread Sakari Ailus
On Wed, Feb 07, 2018 at 03:26:42PM +0100, Maxime Ripard wrote: > The Cadence MIPI-CSI2 TX controller is a CSI2 bridge that supports up to 4 > video streams and can output on up to 4 CSI-2 lanes, depending on the > hardware implementation. > > It can operate with an external D-PHY, an internal one

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

2018-02-08 Thread Sakari Ailus
Hi Maxime, Thanks for the update. Please see my comments below. On Wed, Feb 07, 2018 at 03:24:37PM +0100, Maxime Ripard wrote: > The Cadence CSI-2 RX Controller is an hardware block meant to be used as a > bridge between a CSI-2 bus and pixel grabbers. > > It supports operating with internal or

[PATCH 2/2] media: Add a driver for the ov7251 camera sensor

2018-02-08 Thread Todor Tomov
The ov7251 sensor is a 1/7.5-Inch B VGA (640x480) CMOS Digital Image Sensor from Omnivision. The driver supports the following modes: - 640x480 30fps - 640x480 60fps - 640x480 90fps Output format is MIPI RAW 10. The driver supports configuration via user controls for: - exposure and gain; -

[PATCH 1/2] dt-bindings: media: Binding document for OV7251 camera sensor

2018-02-08 Thread Todor Tomov
Add the document for ov7251 device tree binding. CC: Rob Herring CC: Mark Rutland CC: devicet...@vger.kernel.org Signed-off-by: Todor Tomov --- .../devicetree/bindings/media/i2c/ov7251.txt | 51 ++ 1

[GIT PULL FOR v4.17] Add SPDX headers for Cisco-authored sources

2018-02-08 Thread Hans Verkuil
This replaces all the old boilerplate license code with the new SPDX tags for Cisco-authored files in the media subsystem. Regards, Hans The following changes since commit 273caa260035c03d89ad63d72d8cd3d9e5c5e3f1: media: v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs

[GIT PULL FOR v4.17] media: replace g/s_parm by g/s_frame_interval

2018-02-08 Thread Hans Verkuil
There are currently two subdev ops variants to get/set the frame interval: g/s_parm and g/s_frame_interval. This patch series replaces all g/s_parm calls by g/s_frame_interval. The first patch adds helper functions that can be used by bridge drivers. Only em28xx can't use it and it needs custom

[PATCH 4/4] add video control handlers using V4L2 control framework

2018-02-08 Thread Florian Echtler
This patch registers four standard control handlers using the corresponding V4L2 framework. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 64 +++ 1 file changed, 64 insertions(+) diff --git

[PATCH 2/4] add default settings and module parameters for video controls

2018-02-08 Thread Florian Echtler
This patch adds parameter definitions and module parameters for the four userspace controls that the SUR40 can currently provide. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 28 1 file changed, 28 insertions(+) diff

[PATCH v4] add video controls for SUR40 driver

2018-02-08 Thread Florian Echtler
Iteration 4, now with min/max values for module parameters. Best regards, Florian

[PATCH 1/4] add missing blob structure field for tag id

2018-02-08 Thread Florian Echtler
The SUR40 can recognize specific printed patterns directly in hardware; this information (i.e. the pattern id) is present but currently unused in the blob structure. Signed-off-by: Florian Echtler --- drivers/input/touchscreen/sur40.c | 5 - 1 file changed, 4

[PATCH 3/4] add panel register access functions

2018-02-08 Thread Florian Echtler
These functions provide write access to the internal LCD panel registers which also control the sensor. They can be used to disable the preprocessor, set the illumination brightness, and adjust gain/contrast (which are stored together in one register internally called "vsvideo"). Signed-off-by:

Re: [PATCH 1/7] media: v4l2-compat-ioctl32.c: make ctrl_is_pointer work for subdevs

2018-02-08 Thread Hans Verkuil
On 02/07/2018 03:39 PM, Hans Verkuil wrote: > From: Hans Verkuil > > 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

[PATCHv2 03/15] v4l2-ioctl.c: fix VIDIOC_DV_TIMINGS_CAP: don't clear pad

2018-02-08 Thread Hans Verkuil
The pad field should be passed on to the subdev driver, but it is cleared in v4l2-ioctl.c so the subdev driver always sees a 0 pad. Found with v4l2-compliance. Signed-off-by: Hans Verkuil Reported-by: Tim Harvey Acked-by: Sakari Ailus

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

2018-02-08 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

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

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

[PATCHv2 11/15] media-device.c: zero reserved field

2018-02-08 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(). Signed-off-by: Hans Verkuil --- drivers/media/media-device.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/media/media-device.c

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

2018-02-08 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 --- Documentation/media/uapi/mediactl/media-ioc-g-topology.rst | 2 +- 1 file changed, 1

[PATCHv2 05/15] v4l2-subdev: clear reserved fields

2018-02-08 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,

[PATCHv2 00/15] Media Controller compliance fixes

2018-02-08 Thread Hans Verkuil
From: Hans Verkuil Hi all, I've been posting random patches fixing various MC problems, but it is easier to see them all in a single patch series. All patches except 13 and 14 are identical to was I posted earlier. For 13 and 14 I decided to drop the requirement that

[PATCHv2 13/15] media: document and zero reservedX fields in media_v2_topology

2018-02-08 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. The reservedX fields were not set to 0, that is now also fixed. Found with v4l2-compliance. Signed-off-by: Hans Verkuil

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

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

[PATCHv2 12/15] media.h: fix confusing typo in comment

2018-02-08 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 --- include/uapi/linux/media.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/uapi/linux/media.h

[PATCHv2 10/15] media: media-types.rst: fix typo

2018-02-08 Thread Hans Verkuil
From: Alexandre Courbot with -> which Signed-off-by: Alexandre Courbot --- 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

[PATCHv2 06/15] v4l2-subdev: implement VIDIOC_DBG_G_CHIP_INFO ioctl

2018-02-08 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

[PATCHv2 04/15] v4l2-subdev: without controls return -ENOTTY

2018-02-08 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

[PATCHv2 07/15] subdev-formats.rst: fix incorrect types

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

[PATCHv2 09/15] media-types.rst: fix type, small improvements

2018-02-08 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 ---

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

2018-02-08 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 --- drivers/media/platform/vimc/vimc-debayer.c | 2 +- drivers/media/platform/vimc/vimc-scaler.c | 2 +-

[PATCH] media: ivtv: remove ivtv-alsa-mixer

2018-02-08 Thread Corentin Labbe
ivtv-alsa-mixer functions was introduced in commit 269c11fbac4f ("[media] ivtv, ivtv-alsa: Add initial ivtv-alsa interface driver for ivtv") But according to commit message, ivtv-alsa-mixer.c was already dead code. 5 years after, we should remove it. Signed-off-by: Corentin Labbe

[PATCH] media: cx18: remove unused cx18-alsa-mixer

2018-02-08 Thread Corentin Labbe
cx18-alsa-mixer functions are not used since commit 4cb565cc2700 ("V4L/DVB: cx18: make it so cx18-alsa-main.c compiles") 9 year later, lets just remove them. Signed-off-by: Corentin Labbe --- drivers/media/pci/cx18/cx18-alsa-main.c | 1 -