Re: [PATCH v6 2/2] media: V3s: Add support for Allwinner CSI.

2018-01-29 Thread Maxime Ripard
Hi, On Mon, Jan 29, 2018 at 03:34:02PM +0100, Arnd Bergmann wrote: > On Mon, Jan 29, 2018 at 10:25 AM, Linus Walleij > wrote: > > On Mon, Jan 29, 2018 at 9:25 AM, Maxime Ripard > > wrote: > >> On Sat, Jan 27, 2018 at 05:14:26PM +0100,

Re: [PATCH 8/8] platform: vivid-cec: fix potential integer overflow in vivid_cec_pin_adap_events

2018-01-29 Thread Hans Verkuil
Hi Gustavo, On 01/30/2018 01:33 AM, Gustavo A. R. Silva wrote: > Cast len to const u64 in order to avoid a potential integer > overflow. This variable is being used in a context that expects > an expression of type const u64. > > Addresses-Coverity-ID: 1454996 ("Unintentional integer overflow")

Re: [RFC PATCH 5/8] media: Document the media request API

2018-01-29 Thread Alexandre Courbot
On Tue, Jan 30, 2018 at 1:04 AM, Hans Verkuil wrote: > On 01/26/2018 07:02 AM, Alexandre Courbot wrote: >> From: Laurent Pinchart >> >> The media request API is made of a new ioctl to implement request >> management. Document it. >>

Re: [RFC PATCH 0/8] [media] Request API, take three

2018-01-29 Thread Alexandre Courbot
Hi Hans, On Mon, Jan 29, 2018 at 8:21 PM, Hans Verkuil wrote: > On 01/26/2018 07:02 AM, Alexandre Courbot wrote: >> Howdy. Here is your bi-weekly request API redesign! ;) >> >> Again, this is a simple version that only implements the flow of requests, >> without applying

Re: [RFC PATCH 6/8] v4l2: document the request API interface

2018-01-29 Thread Alexandre Courbot
On Tue, Jan 30, 2018 at 1:03 AM, Hans Verkuil wrote: > On 01/26/2018 07:02 AM, Alexandre Courbot wrote: >> Document how the request API can be used along with the existing V4L2 >> interface. >> >> Signed-off-by: Alexandre Courbot >> --- >>

cron job: media_tree daily build: ERRORS

2018-01-29 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: Tue Jan 30 05:00:20 CET 2018 media-tree git hash:4852fdca8818972d0ea5b5ce7114da628f9954a4 media_build

Re: [RFC PATCH 1/9] media: add request API core and UAPI

2018-01-29 Thread Alexandre Courbot
Hi Sakari, thanks for the review! The version you reviewed is not the latest one, but I suppose most of your comments still apply. On Fri, Jan 26, 2018 at 5:39 PM, Sakari Ailus wrote: > Hi Alexandre, > > I remember it was discussed that the work after the V4L2 jobs API

Re: [PATCH v7 2/2] media: V3s: Add support for Allwinner CSI.

2018-01-29 Thread Yong
Hi, On Mon, 29 Jan 2018 13:49:14 -0800 Randy Dunlap wrote: > On 01/29/2018 01:21 AM, Yong Deng wrote: > > Allwinner V3s SoC features two CSI module. CSI0 is used for MIPI CSI-2 > > interface and CSI1 is used for parallel interface. This is not > > documented in datasheet

Re: Regression in VB2 alloc prepare/finish balancing with em28xx/au0828

2018-01-29 Thread Devin Heitmueller
Hello Sakari, Thanks for taking the time to investigate. See comments inline. On Sun, Jan 28, 2018 at 5:23 PM, Sakari Ailus wrote: > Hi Devin, > > On Sun, Jan 28, 2018 at 09:12:44AM -0500, Devin Heitmueller wrote: >> Hello all, >> >> I recently updated to the

RE: [PATCH v4] media: dw9807: Add dw9807 vcm driver

2018-01-29 Thread Yeh, Andy
Please ignore this. This is the wrong patch which has been obsoleted. -Original Message- From: Yeh, Andy Sent: Tuesday, January 30, 2018 12:35 AM To: linux-media@vger.kernel.org Cc: Yeh, Andy ; sakari.ai...@linux.intel.com; tf...@chromium.org; Chiang, AlanX

RE: [PATCH v4] media: dw9807: Add dw9807 vcm driver

2018-01-29 Thread Yeh, Andy
This is the right one. Sorry for inconvenience. -Original Message- From: Yeh, Andy Sent: Tuesday, January 30, 2018 12:53 AM To: linux-media@vger.kernel.org Cc: Yeh, Andy ; sakari.ai...@linux.intel.com; tf...@chromium.org; Chiang, AlanX

[PATCH 7/8] platform: sh_veu: fix potential integer overflow in sh_veu_colour_offset

2018-01-29 Thread Gustavo A. R. Silva
Cast left and top to dma_addr_t in order to avoid a potential integer overflow. This variable is being used in a context that expects an expression of type dma_addr_t (u64). Addresses-Coverity-ID: 1056807 ("Unintentional integer overflow") Addresses-Coverity-ID: 1056808 ("Unintentional integer

[PATCH 5/8] pci: cx88-input: fix potential integer overflow

2018-01-29 Thread Gustavo A. R. Silva
Cast ir->polling to ktime_t in order to avoid a potential integer overflow. This variable is being used in a context that expects an expression of type ktime_t (s64). Addresses-Coverity-ID: 1392628 ("Unintentional integer overflow") Addresses-Coverity-ID: 1392630 ("Unintentional integer

[PATCH 4/8] i2c: ov9650: fix potential integer overflow in __ov965x_set_frame_interval

2018-01-29 Thread Gustavo A. R. Silva
Cast fi->interval.numerator to u64 in order to avoid a potential integer overflow. This variable is being used in a context that expects an expression of type u64. Addresses-Coverity-ID: 1324146 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva ---

[PATCH 8/8] platform: vivid-cec: fix potential integer overflow in vivid_cec_pin_adap_events

2018-01-29 Thread Gustavo A. R. Silva
Cast len to const u64 in order to avoid a potential integer overflow. This variable is being used in a context that expects an expression of type const u64. Addresses-Coverity-ID: 1454996 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva ---

[PATCH 1/8] rtl2832: fix potential integer overflow in rtl2832_set_frontend

2018-01-29 Thread Gustavo A. R. Silva
Cast dev->pdata->clk to u64 in order to avoid a potential integer overflow. This variable is being used in a context that expects an expression of type u64. Addresses-Coverity-ID: 1271223 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva ---

[PATCH 0/8] fix potential integer overflows

2018-01-29 Thread Gustavo A. R. Silva
This patchset aims to fix potential integer overflows reported by Coverity. In all cases the potential overflowing expressions are evaluated using 32-bit arithmetic before being used in contexts that expect a 64-bit arithmetic. So a cast to the proper type was added to each of those expressions

[PATCH 2/8] dvb-frontends: ves1820: fix potential integer overflow

2018-01-29 Thread Gustavo A. R. Silva
Cast state->config->xin to u64 in order to avoid a potential integer overflow. This variable is being used in a context that expects an expression of type u64. Addresses-Coverity-ID: 200604 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva ---

[PATCH 6/8] rockchip/rga: fix potential integer overflow in rga_buf_map

2018-01-29 Thread Gustavo A. R. Silva
Cast p to dma_addr_t in order to avoid a potential integer overflow. This variable is being used in a context that expects an expression of type dma_addr_t (u64). Addresses-Coverity-ID: 1458347 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva ---

[PATCH 3/8] i2c: max2175: fix potential integer overflow in max2175_set_nco_freq

2018-01-29 Thread Gustavo A. R. Silva
Cast expression (clock_rate - abs_nco_freq) to s64 in order to avoid a potential integer overflow. This variable is being used in a context that expects an expression of type s64. Addresses-Coverity-ID: 1446589 ("Unintentional integer overflow") Signed-off-by: Gustavo A. R. Silva

Re: [PATCH v7 2/2] media: V3s: Add support for Allwinner CSI.

2018-01-29 Thread Arnd Bergmann
On Mon, Jan 29, 2018 at 10:49 PM, Randy Dunlap wrote: > On 01/29/2018 01:21 AM, Yong Deng wrote: >> Allwinner V3s SoC features two CSI module. CSI0 is used for MIPI CSI-2 >> interface and CSI1 is used for parallel interface. This is not >> documented in datasheet but by

Re: [PATCH v1] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil

2018-01-29 Thread Sakari Ailus
Hi Andy, Please add a cover page and send the entire set together (v5). On Tue, Jan 30, 2018 at 12:34:32AM +0800, Andy Yeh wrote: > From: Alan Chiang > > Dongwoon DW9807 is a voice coil lens driver. > > Also add a vendor prefix for Dongwoon for one did not exist

Re: [PATCH v4] media: dw9807: Add dw9807 vcm driver

2018-01-29 Thread Sakari Ailus
Hi Andy and Alan, Thanks for the update. A number of patches you've sent lately have arrived twice in slightly different form. If that happens, could you reply and tell which one is the right one, please? Please see my comments below. On Tue, Jan 30, 2018 at 12:52:59AM +0800, Andy Yeh wrote: >

Re: [PATCH v7 2/2] media: V3s: Add support for Allwinner CSI.

2018-01-29 Thread Randy Dunlap
On 01/29/2018 01:21 AM, Yong Deng wrote: > Allwinner V3s SoC features two CSI module. CSI0 is used for MIPI CSI-2 > interface and CSI1 is used for parallel interface. This is not > documented in datasheet but by test and guess. > > This patch implement a v4l2 framework driver for it. > >

Re: [PATCH 12/12] v4l2-compat-ioctl32.c: refactor, fix security bug in compat ioctl32

2018-01-29 Thread Sakari Ailus
Hi Hans, On Mon, Jan 29, 2018 at 06:41:20PM +0100, Hans Verkuil wrote: > On 01/29/2018 06:06 PM, Sakari Ailus wrote: > > Hi Hans, > > > > Thanks for your efforts on this patch and the patchset. Please see my > > comments below. > > > > On Fri, Jan 26, 2018 at 01:43:27PM +0100, Hans Verkuil

Re: [PATCH 1/2] media: adv7604: Add support for i2c_new_secondary_device

2018-01-29 Thread Rob Herring
On Mon, Jan 22, 2018 at 12:49:56PM +, Kieran Bingham wrote: > From: Jean-Michel Hautbois > > The ADV7604 has thirteen 256-byte maps that can be accessed via the main > I²C ports. Each map has it own I²C address and acts as a standard slave > device on the

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

2018-01-29 Thread Sakari Ailus
On Mon, Jan 29, 2018 at 11:02:56AM +0100, Hans Verkuil wrote: > On 01/29/2018 10:56 AM, Sakari Ailus wrote: > > Hi Hans, > > > > On Fri, Jan 26, 2018 at 01:43:26PM +0100, Hans Verkuil wrote: > >> From: Hans Verkuil > >> > >> Some ioctls need to copy back the result even

Re: [PATCH 09/12] v4l2-compat-ioctl32.c: copy clip list in put_v4l2_window32

2018-01-29 Thread Sakari Ailus
On Mon, Jan 29, 2018 at 12:13:14PM -0200, Mauro Carvalho Chehab wrote: > Em Mon, 29 Jan 2018 11:47:42 +0200 > Sakari Ailus escreveu: > > > > > + compat_caddr_t p; > > > + > > > if (copy_to_user(>w, >w, sizeof(kp->w)) || > > > put_user(kp->field, >field) || > > >

Re: [PATCH 02/12] v4l2-ioctl.c: use check_fmt for enum/g/s/try_fmt

2018-01-29 Thread Sakari Ailus
Hi Hans, On Mon, Jan 29, 2018 at 11:09:32AM +0100, Hans Verkuil wrote: > On 01/26/2018 03:41 PM, Sakari Ailus wrote: > > Hi Hans, > > > > On Fri, Jan 26, 2018 at 01:43:17PM +0100, Hans Verkuil wrote: > >> From: Hans Verkuil > >> > >> Don't duplicate the buffer type

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

2018-01-29 Thread Rob Herring
On Mon, Jan 22, 2018 at 12:50:01PM +, Kieran Bingham wrote: > The ADV7511 has four 256-byte maps that can be accessed via the main I²C > ports. Each map has it own I²C address and acts as a standard slave > device on the I²C bus. > > Allow a device tree node to override the default addresses

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

2018-01-29 Thread Rob Herring
On Mon, Jan 29, 2018 at 12:26:00PM +0200, Laurent Pinchart wrote: > Hi Kieran, > > Thank you for the patch. > > On Monday, 22 January 2018 14:50:00 EET Kieran Bingham wrote: > > The ADV7511 has four 256-byte maps that can be accessed via the main I²C > > ports. Each map has it own I²C address

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

2018-01-29 Thread Benoit Parrot
Maxime, Thank you for the patch. Maxime Ripard wrote on Fri [2018-Jan-19 09:15:47 +0100]: > 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

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

2018-01-29 Thread Benoit Parrot
Maxime, Thank you for the patch. Maxime Ripard wrote on Fri [2018-Jan-19 09:13:57 +0100]: > 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

Re: [PATCH 12/12] v4l2-compat-ioctl32.c: refactor, fix security bug in compat ioctl32

2018-01-29 Thread Hans Verkuil
On 01/29/2018 06:06 PM, Sakari Ailus wrote: > Hi Hans, > > Thanks for your efforts on this patch and the patchset. Please see my > comments below. > > On Fri, Jan 26, 2018 at 01:43:27PM +0100, Hans Verkuil wrote: >> From: Daniel Mentz >> >> The 32-bit compat v4l2 ioctl

Re: [PATCH 12/12] v4l2-compat-ioctl32.c: refactor, fix security bug in compat ioctl32

2018-01-29 Thread Sakari Ailus
Hi Hans, Thanks for your efforts on this patch and the patchset. Please see my comments below. On Fri, Jan 26, 2018 at 01:43:27PM +0100, Hans Verkuil wrote: > From: Daniel Mentz > > The 32-bit compat v4l2 ioctl is implemented based on its 64-bit s/v4l2 ioctl/V4L2

[PATCH v4] media: dw9807: Add dw9807 vcm driver

2018-01-29 Thread Andy Yeh
From: Alan Chiang DW9807 is a 10 bit DAC from Dongwoon, designed for linear control of voice coil motor. This driver creates a V4L2 subdevice and provides control to set the desired focus. Signed-off-by: Andy Yeh --- since v1: - changed author.

[PATCH v10 12/30] rcar-vin: enable Gen3 hardware configuration

2018-01-29 Thread Niklas Söderlund
Add the register needed to work with Gen3 hardware. This patch adds the logic for how to work with the Gen3 hardware. More work is required to enable the subdevice structure needed to configure capturing. Signed-off-by: Niklas Söderlund Reviewed-by: Hans

[PATCH v10 07/30] rcar-vin: move functions regarding scaling

2018-01-29 Thread Niklas Söderlund
In preparation of refactoring the scaling code move the code regarding scaling to to the top of the file to avoid the need to add forward declarations. No code is changed in this commit only whole functions moved inside the same file. Signed-off-by: Niklas Söderlund

[PATCH v10 14/30] rcar-vin: add flag to switch to media controller mode

2018-01-29 Thread Niklas Söderlund
On Gen3 a media controller API needs to be used to allow userspace to configure the subdevices in the pipeline instead of directly controlling a single source subdevice, which is and will continue to be the mode of operation on Gen2. Prepare for these two modes of operation by adding a flag to

[PATCH v10 19/30] rcar-vin: set a default field to fallback on

2018-01-29 Thread Niklas Söderlund
If the field is not supported by the driver it should not try to keep the current field. Instead it should set it to a default fallback. Since trying a format should always result in the same state regardless of the current state of the device. Signed-off-by: Niklas Söderlund

[PATCH v10 21/30] rcar-vin: prepare for media controller mode initialization

2018-01-29 Thread Niklas Söderlund
Prepare for media controller by calling a different initialization then for when running in device centric mode. Add trivial configuration of the mbus and creation of the media pad for the video device entity. While we are at it clearly mark the digital device centric notifier functions with a

[PATCH v10 18/30] rcar-vin: add check for colorspace

2018-01-29 Thread Niklas Söderlund
Add a check to ensure the colorspace from user-space is good. On Gen2 it works without this change as the sensor sets the colorspace but on Gen3 this can fail if the colorspace provided by the user is not good. The values to check for comes from v4l2-compliance sources which is the tool that found

[PATCH v10 16/30] rcar-vin: update bytesperline and sizeimage calculation

2018-01-29 Thread Niklas Söderlund
Remove over complicated logic to calculate the value for bytesperline and sizeimage that was carried over from the soc_camera port. Update the calculations to match how other drivers are doing it. Signed-off-by: Niklas Söderlund ---

[PATCH v10 23/30] rcar-vin: change name of video device

2018-01-29 Thread Niklas Söderlund
The rcar-vin driver needs to be part of a media controller to support Gen3. Give each VIN instance a unique name so it can be referenced from userspace. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 2 +- 1 file changed,

[PATCH v10 28/30] rcar-vin: enable support for r8a7795

2018-01-29 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a7795 ES1.x and ES2.0. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/Kconfig | 2 +- drivers/media/platform/rcar-vin/rcar-core.c | 120 2 files changed,

[PATCH v10 30/30] rcar-vin: enable support for r8a77970

2018-01-29 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a77970. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 23 +++ 1 file changed, 23 insertions(+) diff --git a/drivers/media/platform/rcar-vin/rcar-core.c

[PATCH v10 29/30] rcar-vin: enable support for r8a7796

2018-01-29 Thread Niklas Söderlund
Add the SoC specific information for Renesas r8a7796. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-core.c | 44 + 1 file changed, 44 insertions(+) diff --git

[PATCH v10 25/30] rcar-vin: parse Gen3 OF and setup media graph

2018-01-29 Thread Niklas Söderlund
The parsing and registering CSI-2 subdevices with the v4l2 async framework is a collaborative effort shared between the VIN instances which are part of the group. When the last VIN in the group is probed it asks all other VINs to parse its share of OF and record the async subdevices it finds in

[PATCH v10 27/30] rcar-vin: extend {start,stop}_streaming to work with media controller

2018-01-29 Thread Niklas Söderlund
The procedure to start or stop streaming using the non-MC single subdevice and the MC graph and multiple subdevices are quite different. Create a new function to abstract which method is used based on which mode the driver is running in and add logic to start the MC graph. Signed-off-by: Niklas

[PATCH v10 22/30] rcar-vin: add group allocator functions

2018-01-29 Thread Niklas Söderlund
In media controller mode all VIN instances needs to be part of the same media graph. There is also a need for each VIN instance to know about and in some cases be able to communicate with other VIN instances. Add an allocator framework where the first VIN instance to be probed creates a shared

[PATCH v10 13/30] rcar-vin: add function to manipulate Gen3 chsel value

2018-01-29 Thread Niklas Söderlund
On Gen3 the CSI-2 routing is controlled by the VnCSI_IFMD register. One feature of this register is that it's only present in the VIN0 and VIN4 instances. The register in VIN0 controls the routing for VIN0-3 and the register in VIN4 controls routing for VIN4-7. To be able to control routing from

[PATCH v10 20/30] rcar-vin: use different v4l2 operations in media controller mode

2018-01-29 Thread Niklas Söderlund
When the driver runs in media controller mode it should not directly control the subdevice instead userspace will be responsible for configuring the pipeline. To be able to run in this mode a different set of v4l2 operations needs to be used. Add a new set of v4l2 operations to support operation

[PATCH v10 17/30] rcar-vin: update pixelformat check for M1

2018-01-29 Thread Niklas Söderlund
If the pixelformat is not supported it should not fail but be set to something that works. While we are at it move the check together with other pixelformat checks of this function. Signed-off-by: Niklas Söderlund ---

[PATCH v10 26/30] rcar-vin: add link notify for Gen3

2018-01-29 Thread Niklas Söderlund
Add the ability to process media device link change request. Link enabling is a bit complicated on Gen3, whether or not it's possible to enable a link depends on what other links already are enabled. On Gen3 the 8 VINs are split into two subgroup's (VIN0-3 and VIN4-7) and from a routing

[PATCH v10 24/30] rcar-vin: add chsel information to rvin_info

2018-01-29 Thread Niklas Söderlund
Each Gen3 SoC has a limited set of predefined routing possibilities for which CSI-2 device and virtual channel can be routed to which VIN instance. Prepare to store this information in the struct rvin_info. Signed-off-by: Niklas Söderlund ---

[PATCH v10 11/30] rcar-vin: move media bus configuration to struct rvin_info

2018-01-29 Thread Niklas Söderlund
Bus configuration will once the driver is extended to support Gen3 contain information not specific to only the directly connected parallel subdevice. Move it to struct rvin_dev to show it's not always coupled to the parallel subdevice. Signed-off-by: Niklas Söderlund

[PATCH v10 09/30] rcar-vin: read subdevice format for crop only when needed

2018-01-29 Thread Niklas Söderlund
Instead of caching the subdevice format each time the video device format is set read it directly when it's needed. As it turns out the format is only needed when figuring out the max rectangle for cropping. This simplifies the code and makes it clearer what the source format is used for.

[PATCH v10 15/30] rcar-vin: break out format alignment and checking

2018-01-29 Thread Niklas Söderlund
Part of the format alignment and checking can be shared with the Gen3 format handling. Break that part out to a separate function. Signed-off-by: Niklas Söderlund --- drivers/media/platform/rcar-vin/rcar-v4l2.c | 93 - 1 file

[PATCH v10 04/30] rcar-vin: move subdevice handling to async callbacks

2018-01-29 Thread Niklas Söderlund
In preparation for Gen3 support move the subdevice initialization and clean up from rvin_v4l2_{register,unregister}() directly to the async callbacks. This simplifies the addition of Gen3 support as the rvin_v4l2_register() can be shared for both Gen2 and Gen3 while direct subdevice control are

[PATCH v10 06/30] rcar-vin: move max width and height information to chip information

2018-01-29 Thread Niklas Söderlund
On Gen3 the max supported width and height will be different from Gen2. Move the limits to the struct rvin_info to prepare for Gen3 support. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham Reviewed-by:

[PATCH v10 05/30] rcar-vin: move model information to own struct

2018-01-29 Thread Niklas Söderlund
When Gen3 support is added to the driver more than model ID will be different for the different SoCs. To avoid a lot of if statements in the code create a struct rvin_info to store this information. While we are at it rename the poorly chosen enum which contains the different model IDs from

[PATCH v10 10/30] rcar-vin: fix handling of single field frames (top, bottom and alternate fields)

2018-01-29 Thread Niklas Söderlund
There was never proper support in the VIN driver to deliver ALTERNATING field format to user-space, remove this field option. The problem is that ALTERNATING filed order requires the sequence numbers of buffers returned to userspace to reflect if fields where dropped or not, something which is not

[PATCH v10 08/30] rcar-vin: all Gen2 boards can scale simplify logic

2018-01-29 Thread Niklas Söderlund
The logic to preserve the requested format width and height are too complex and come from a premature optimization for Gen3. All Gen2 SoC can scale and the Gen3 implementation will not use these functions at all so simply preserve the width and height when interacting with the subdevice much like

[PATCH v10 03/30] rcar-vin: unregister video device on driver removal

2018-01-29 Thread Niklas Söderlund
If the video device was registered by the complete() callback it should be unregistered when a device is unbound from the driver. Protect from printing an uninitialized video device node name by adding a check in rvin_v4l2_unregister() to identify that the video device is registered.

[PATCH v10 01/30] rcar-vin: add Gen3 devicetree bindings documentation

2018-01-29 Thread Niklas Söderlund
Document the devicetree bindings for the CSI-2 inputs available on Gen3. There is a need to add a custom property 'renesas,id' and to define which CSI-2 input is described in which endpoint under the port@1 node. This information is needed since there are a set of predefined routes between each

[PATCH v10 02/30] rcar-vin: rename poorly named initialize and cleanup functions

2018-01-29 Thread Niklas Söderlund
The functions to register and unregister the hardware and video device where poorly named from the start. Rename them to better describe their intended function. Signed-off-by: Niklas Söderlund Reviewed-by: Kieran Bingham

[PATCH v10 00/30] rcar-vin: Add Gen3 with media controller

2018-01-29 Thread Niklas Söderlund
Hi, This series adds Gen3 VIN support to rcar-vin driver for Renesas r8a7795, r8a7796 and r8a77970. It is based on the media-tree and depends on Fabrizio Castro patches as they touches the order of the compatible strings in the documentation to reduce merge conflicts. The dependencies are:

[PATCH v4] media: dw9807: Add dw9807 vcm driver

2018-01-29 Thread Andy Yeh
From: Alan Chiang DW9807 is a 10 bit DAC from Dongwoon, designed for linear control of voice coil motor. This driver creates a V4L2 subdevice and provides control to set the desired focus. Signed-off-by: Andy Yeh --- since v1: - changed author.

[PATCH v1] media: dt-bindings: Add bindings for Dongwoon DW9807 voice coil

2018-01-29 Thread Andy Yeh
From: Alan Chiang Dongwoon DW9807 is a voice coil lens driver. Also add a vendor prefix for Dongwoon for one did not exist previously. Signed-off-by: Andy Yeh --- Documentation/devicetree/bindings/media/i2c/dongwoon,dw9807.txt | 9 + 1 file

Re: [RFC PATCH 5/8] media: Document the media request API

2018-01-29 Thread Hans Verkuil
On 01/26/2018 07:02 AM, Alexandre Courbot wrote: > From: Laurent Pinchart > > The media request API is made of a new ioctl to implement request > management. Document it. > > Signed-off-by: Laurent Pinchart >

Re: [RFC PATCH 6/8] v4l2: document the request API interface

2018-01-29 Thread Hans Verkuil
On 01/26/2018 07:02 AM, Alexandre Courbot wrote: > Document how the request API can be used along with the existing V4L2 > interface. > > Signed-off-by: Alexandre Courbot > --- > Documentation/media/uapi/v4l/buffer.rst | 10 +- >

[PATCH v4 0/6] arm: sunxi: IR support for A83T

2018-01-29 Thread Philipp Rossak
This patch series adds support for the sunxi A83T ir module and enhances the sunxi-ir driver. Right now the base clock frequency for the ir driver is a hard coded define and is set to 8 MHz. This works for the most common ir receivers. On the Sinovoip Bananapi M3 the ir receiver needs, a 3 MHz

[PATCH v4 2/6] media: dt: bindings: Update binding documentation for sunxi IR controller

2018-01-29 Thread Philipp Rossak
This patch updates documentation for Device-Tree bindings for sunxi IR controller and adds the new optional property for the base clock frequency. Signed-off-by: Philipp Rossak Acked-by: Maxime Ripard Reviewed-by: Rob Herring

[PATCH v4 1/6] media: rc: update sunxi-ir driver to get base clock frequency from devicetree

2018-01-29 Thread Philipp Rossak
This patch updates the sunxi-ir driver to set the base clock frequency from devicetree. This is necessary since there are different ir receivers on the market, that operate with different frequencies. So this value could be set if the attached ir receiver needs a different base clock frequency,

[PATCH v4 4/6] arm: dts: sun8i: a83t: Add support for the cir interface

2018-01-29 Thread Philipp Rossak
The cir interface is like on the H3 located at 0x01f02000 and is exactly the same. This patch adds support for the ir interface on the A83T. Signed-off-by: Philipp Rossak --- arch/arm/boot/dts/sun8i-a83t.dtsi | 10 ++ 1 file changed, 10 insertions(+) diff --git

[PATCH v4 3/6] arm: dts: sun8i: a83t: Add the cir pin for the A83T

2018-01-29 Thread Philipp Rossak
The CIR Pin of the A83T is located at PL12. Signed-off-by: Philipp Rossak --- arch/arm/boot/dts/sun8i-a83t.dtsi | 5 + 1 file changed, 5 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a83t.dtsi b/arch/arm/boot/dts/sun8i-a83t.dtsi index de5119a2a91c..06e96db7c41a

[PATCH v5 5/6] arm: dts: sun8i: a83t: bananapi-m3: Enable IR controller

2018-01-29 Thread Philipp Rossak
The Bananapi M3 has an onboard IR receiver. This enables the onboard IR receiver subnode. Unlike the other IR receivers this one needs a base clock frequency of 300 Hz (3 MHz), to be able to work. Signed-off-by: Philipp Rossak Acked-by: Chen-Yu Tsai ---

[PATCH v4 6/6] arm: dts: sun8i: h3-h8: ir register size should be the whole memory block

2018-01-29 Thread Philipp Rossak
The size of the register should be the size of the whole memory block, not just the registers, that are needed. Signed-off-by: Philipp Rossak --- arch/arm/boot/dts/sunxi-h3-h5.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git

RE: [PATCH v3] media: dw9807: Add dw9807 vcm driver

2018-01-29 Thread Yeh, Andy
Hi Sakari, All comments are all addressed, except below one. And will separate the DT binding. > + while (dw9807_i2c_check(client) != 0) { > + if (MAX_RETRY == ++retry) { > + dev_err(>dev, "Cannot do the write operation > because VCM is busy\n"); > +

Re: [PATCH 12/12] v4l2-compat-ioctl32.c: refactor, fix security bug in compat ioctl32

2018-01-29 Thread Mauro Carvalho Chehab
Em Fri, 26 Jan 2018 13:43:27 +0100 Hans Verkuil escreveu: > From: Daniel Mentz > > The 32-bit compat v4l2 ioctl is implemented based on its 64-bit > equivalent. It converts 32-bit data structures into its 64-bit > equivalents and needs to provide the

Re: [PATCH v6 2/2] media: V3s: Add support for Allwinner CSI.

2018-01-29 Thread Arnd Bergmann
On Mon, Jan 29, 2018 at 10:25 AM, Linus Walleij wrote: > On Mon, Jan 29, 2018 at 9:25 AM, Maxime Ripard > wrote: >> On Sat, Jan 27, 2018 at 05:14:26PM +0100, Linus Walleij wrote: >> However, in DT systems, that >> field is filled only

Re: [PATCH 09/12] v4l2-compat-ioctl32.c: copy clip list in put_v4l2_window32

2018-01-29 Thread Mauro Carvalho Chehab
Em Mon, 29 Jan 2018 11:47:42 +0200 Sakari Ailus escreveu: > > + compat_caddr_t p; > > + > > if (copy_to_user(>w, >w, sizeof(kp->w)) || > > put_user(kp->field, >field) || > > put_user(kp->chromakey, >chromakey) || > > put_user(kp->clipcount,

Re: [PATCH 08/12] v4l2-compat-ioctl32.c: fix ctrl_is_pointer

2018-01-29 Thread Mauro Carvalho Chehab
Em Sun, 28 Jan 2018 01:18:57 +0200 Sakari Ailus escreveu: > Hi Hans, > ... > > + > > + if (ops->vidioc_query_ext_ctrl) > > + ret = ops->vidioc_query_ext_ctrl(file, fh, ); > > Is there a need for this? > > The only driver implementing vidioc_query_ext_ctrl

Re: dvb usb issues since kernel 4.9

2018-01-29 Thread Mauro Carvalho Chehab
Em Fri, 26 Jan 2018 17:37:39 -0200 Mauro Carvalho Chehab escreveu: > Em Fri, 26 Jan 2018 12:17:37 -0200 > Mauro Carvalho Chehab escreveu: > > > Hi Alan, > > > > Em Mon, 8 Jan 2018 14:15:35 -0500 (EST) > > Alan Stern

Re: [Patch v7 12/12] Documention: v4l: Documentation for HEVC CIDs

2018-01-29 Thread Hans Verkuil
On 01/29/2018 02:15 PM, Smitha T Murthy wrote: >>> The values set in V4L2_CID_MPEG_VIDEO_HEVC_MIN_QP and >>> V4L2_CID_MPEG_VIDEO_HEVC_MAX_QP will give the limits for the L0-L6 QP >>> values that can be set. >> >> OK. If you can clarify this in the documentation, then I can Ack this. >> >>

Re: [Patch v7 12/12] Documention: v4l: Documentation for HEVC CIDs

2018-01-29 Thread Smitha T Murthy
On Mon, 2018-01-29 at 14:27 +0100, Hans Verkuil wrote: > On 01/29/2018 01:42 PM, Smitha T Murthy wrote: > > On Wed, 2018-01-24 at 15:16 +0100, Hans Verkuil wrote: > >> On 24/01/18 11:59, Smitha T Murthy wrote: > >>> Added V4l2 controls for HEVC encoder > >>> > >>> Signed-off-by: Smitha T Murthy

Re: [Patch v7 12/12] Documention: v4l: Documentation for HEVC CIDs

2018-01-29 Thread Smitha T Murthy
On Mon, 2018-01-29 at 14:27 +0100, Hans Verkuil wrote: > On 01/29/2018 01:42 PM, Smitha T Murthy wrote: > > On Wed, 2018-01-24 at 15:16 +0100, Hans Verkuil wrote: > >> On 24/01/18 11:59, Smitha T Murthy wrote: > >>> Added V4l2 controls for HEVC encoder > >>> > >>> Signed-off-by: Smitha T Murthy

Re: [PATCH] staging: media: atomisp2: remove unused headers

2018-01-29 Thread LABBE Corentin
On Mon, Jan 29, 2018 at 03:22:33PM +0200, Andy Shevchenko wrote: > On Mon, Jan 29, 2018 at 3:11 PM, Corentin Labbe wrote: > > All thoses headers are not used by any source files. > > Lets just remove them. > > How did you test this? > > P.S. I like the patch, but since

Re: [Patch v7 12/12] Documention: v4l: Documentation for HEVC CIDs

2018-01-29 Thread Hans Verkuil
On 01/29/2018 01:42 PM, Smitha T Murthy wrote: > On Wed, 2018-01-24 at 15:16 +0100, Hans Verkuil wrote: >> On 24/01/18 11:59, Smitha T Murthy wrote: >>> Added V4l2 controls for HEVC encoder >>> >>> Signed-off-by: Smitha T Murthy >>> --- >>>

Re: [PATCH] staging: media: atomisp2: remove unused headers

2018-01-29 Thread Andy Shevchenko
On Mon, Jan 29, 2018 at 3:11 PM, Corentin Labbe wrote: > All thoses headers are not used by any source files. > Lets just remove them. How did you test this? P.S. I like the patch, but since driver in a state of coma vigil, I'm afraid you may do something which shouldn't be

Re: [Patch v7 12/12] Documention: v4l: Documentation for HEVC CIDs

2018-01-29 Thread Smitha T Murthy
On Wed, 2018-01-24 at 15:16 +0100, Hans Verkuil wrote: > On 24/01/18 11:59, Smitha T Murthy wrote: > > Added V4l2 controls for HEVC encoder > > > > Signed-off-by: Smitha T Murthy > > --- > > Documentation/media/uapi/v4l/extended-controls.rst | 400 > >

[PATCH 2/2] media: dvb_demux: improve debug messages

2018-01-29 Thread Mauro Carvalho Chehab
From: Mauro Carvalho Chehab Do some cleanup of debug messages, making them cleaner and easier to be used to analyze what's going on. Signed-off-by: Mauro Carvalho Chehab Signed-off-by: Mauro Carvalho Chehab ---

[PATCH 1/2] media: dvb_demux: Better handle discontinuity errors

2018-01-29 Thread Mauro Carvalho Chehab
From: Mauro Carvalho Chehab When a packet discontinuity happens, it is not just the payload that was lost. The headers are lost too. So, the max size is not 184 but, instead 188. Also, while printing warnings, make a distinction between MPEG-TS indicated discontinuity

Re: [PATCH v2] staging: media: remove remains of VIDEO_ATOMISP_OV8858

2018-01-29 Thread Andy Shevchenko
On Mon, 2018-01-29 at 12:16 +, Corentin Labbe wrote: > OV8858 files are left unusable since commit 3a81c7660f80 ("media: > staging: atomisp: Remove IMX sensor support") > They are uncompilable since they depends on dw9718.c and vcm.c which > was removed. > > Remove the OV8858 kconfig and

Re: [PATCH v6 4/6] media: i2c: Add TDA1997x HDMI receiver driver

2018-01-29 Thread Hans Verkuil
On 01/25/2018 05:15 PM, Tim Harvey wrote: > On Mon, Jan 15, 2018 at 4:56 AM, Hans Verkuil wrote: >> On 12/28/2017 09:09 PM, Tim Harvey wrote: >>> Add support for the TDA1997x HDMI receivers. >>> >> >> This looks good. >> >> But there is one corner case that isn't handled in

Re: [PATCH] sh: clk: Relax clk rate match test

2018-01-29 Thread Laurent Pinchart
Hi Jacopo, On Friday, 26 January 2018 18:24:54 EET jacopo mondi wrote: > On Thu, Jan 25, 2018 at 03:39:32PM +0100, Geert Uytterhoeven wrote: > > Hi Jacopo, > > [snip] > > --- > > drivers/sh/clk/core.c | 9 ++--- > 1 file changed, 6 insertions(+), 3 deletions(-) >

Re: [PATCH] media: rc: ir-spi: fix duty cycle

2018-01-29 Thread Andi Shyti
Hi Sean, On Sat, Jan 27, 2018 at 02:05:37PM +, Sean Young wrote: > Calculate the pulse rather than having a few preset values. > > Cc: Andi Shyti > Signed-off-by: Sean Young Looks good to me. Acked-by: Andi Shyti Thanks,

Re: [RFC PATCH] v4l2-event/dev: wakeup pending events when unregistering

2018-01-29 Thread Hans Verkuil
Hi Michael, On 01/22/2018 02:52 PM, Michael Walz wrote: > Hi Hans, > > > On 18.01.2018 16:13, Hans Verkuil wrote: >> Only apply the change to v4l2_dev.c, ignore the changes to >> v4l2_event. I think it is sufficient to just apply that bit. > > I tried both variants, with changes to v4l2_event

Re: [RFC PATCH 0/8] [media] Request API, take three

2018-01-29 Thread Hans Verkuil
On 01/26/2018 07:02 AM, Alexandre Courbot wrote: > Howdy. Here is your bi-weekly request API redesign! ;) > > Again, this is a simple version that only implements the flow of requests, > without applying controls. The intent is to get an agreement on a base to work > on, since the previous

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

2018-01-29 Thread Laurent Pinchart
Hi Jacopo, Thank you for the patch. On Friday, 26 January 2018 15:55:26 EET 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. > >

  1   2   >