Re: [PATCH] media: rc: ir-spi needs OF

2017-10-09 Thread Andi Shyti
On Mon, Oct 09, 2017 at 09:46:50AM +0100, Sean Young wrote: > Without device tree, there is no way to use this driver. > > Signed-off-by: Sean Young Thanks, Sean! Acked-by: Andi Shyti Andi > --- > drivers/media/rc/Kconfig | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/drivers/med

cron job: media_tree daily build: ERRORS

2017-10-09 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 Oct 10 05:00:14 CEST 2017 media-tree git hash:c1301077213d4dca34f01fc372b64d3c4a49a437 media_build gi

Re: [PATCHv3 0/2] drm/bridge/adv7511: add CEC support

2017-10-09 Thread Archit Taneja
On 10/07/2017 04:16 PM, Hans Verkuil wrote: From: Hans Verkuil This patch series adds CEC support to the drm adv7511/adv7533 drivers. I have tested this with the Qualcomm Dragonboard C410 (adv7533 based) and the Renesas R-Car Koelsch board (adv7511 based). I only have the Koelsch board to t

[PATCH v4 4/5] media: atmel-isc: Remove unnecessary member

2017-10-09 Thread Wenyou Yang
Remove the memeber *config from the isc_subdev_entity struct, the member is useless afterward. Signed-off-by: Wenyou Yang --- Changes in v4: None Changes in v3: None Changes in v2: None drivers/media/platform/atmel/atmel-isc.c | 10 ++ 1 file changed, 2 insertions(+), 8 deletions(-) d

[PATCH v4 5/5] media: atmel-isc: Rework the format list

2017-10-09 Thread Wenyou Yang
To improve the readability of code, split the format array into two, one for the format description, other for the register configuration. Meanwhile, add the flag member to indicate the format can be achieved from the sensor or be produced by the controller, and rename members related to the regist

[PATCH v4 3/5] media: atmel-isc: Enable the clocks during probe

2017-10-09 Thread Wenyou Yang
To meet the relationship, enable the HCLOCK and ispck during the device probe, "isc_pck frequency is less than or equal to isc_ispck, and isc_ispck is greater than or equal to HCLOCK." Meanwhile, call the pm_runtime_enable() in the right place. Signed-off-by: Wenyou Yang --- Changes in v4: - Mo

[PATCH v4 2/5] media: atmel-isc: Add prepare and unprepare ops

2017-10-09 Thread Wenyou Yang
A software write operation to the ISC_CLKEN or ISC_CLKDIS register requires double clock domain synchronization and is not permitted when the ISC_SR.SIP is asserted. So add the .prepare and .unprepare ops to make sure the ISC_CLKSR.SIP is unasserted before the write operation to the ISC_CLKEN or IS

[PATCH v4 1/5] media: atmel-isc: Add spin lock for clock enable ops

2017-10-09 Thread Wenyou Yang
Add the spin lock for the clock enable and disable operations. Signed-off-by: Wenyou Yang --- Changes in v4: None Changes in v3: - Fix the wrong used spinlock. - s/_/- on the subject. Changes in v2: None drivers/media/platform/atmel/atmel-isc.c | 15 ++- 1 file changed, 14 inser

[PATCH v4 0/5] media: atmel-isc: Rework the format list and clock provider

2017-10-09 Thread Wenyou Yang
To improve the readability of code, rework the format list table, split the format array into two. Meanwhile, fix the issue of the clock provider operation and the pm runtime support. Changes in v4: - Call pm_runtime_get_sync() and pm_runtime_put_sync() in ->prepare and ->unprepare callback.

Re: [PATCH 2/2] media: venus: venc: fix bytesused v4l2_plane field

2017-10-09 Thread Nicolas Dufresne
I confirm this works properly now. This was tested with GStreamer with the following command: gst-launch-1.0 videotestsrc ! v4l2vp8enc ! v4l2vp8dec ! kmssink And the following patch, which is work in progress to implement data_offset. https://gitlab.collabora.com/nicolas/gst-plugins-good/co

Re: [PATCH 2/2] media: venus: venc: fix bytesused v4l2_plane field

2017-10-09 Thread Stanimir Varbanov
Hans, On 9.10.2017 15:31, Hans Verkuil wrote: On 09/10/17 14:24, Stanimir Varbanov wrote: This fixes wrongly filled bytesused field of v4l2_plane structure by include data_offset in the plane, Also fill data_offset and bytesused for capture type of buffers only. Signed-off-by: Stanimir Varban

Re: [PATCH 16/24] media: v4l2-subdev: document remaining undocumented functions

2017-10-09 Thread Sakari Ailus
On Mon, Oct 09, 2017 at 07:19:22AM -0300, Mauro Carvalho Chehab wrote: > There are several undocumented v4l2-subdev functions that are > part of kAPI. Document them. > > Signed-off-by: Mauro Carvalho Chehab > --- > include/media/v4l2-subdev.h | 70 > +

Re: [PATCH 17/24] media: v4l2-subdev: fix a typo

2017-10-09 Thread Sakari Ailus
On Mon, Oct 09, 2017 at 07:19:23AM -0300, Mauro Carvalho Chehab wrote: > ownner -> owner > > Signed-off-by: Mauro Carvalho Chehab > --- > include/media/v4l2-subdev.h | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.

Re: [PATCH 10/24] media: v4l2-subdev: use kernel-doc markups to document subdev flags

2017-10-09 Thread Sakari Ailus
Hi Mauro, On Mon, Oct 09, 2017 at 07:19:16AM -0300, Mauro Carvalho Chehab wrote: > Right now, those are documented together with the subdev struct, > instead of together with the definitions. > > Convert the definitions to an enum, use BIT() macros and document > it at its right place. > > Signe

Re: [PATCH 15/24] media: v4l2-subdev: get rid of __V4L2_SUBDEV_MK_GET_TRY() macro

2017-10-09 Thread Sakari Ailus
Hi Mauro, On Mon, Oct 09, 2017 at 07:19:21AM -0300, Mauro Carvalho Chehab wrote: > The __V4L2_SUBDEV_MK_GET_TRY() macro is used to define > 3 functions that have the same arguments. The code of those > functions is simple enough to just declare them, de-obfuscating > the code. > > While here, rep

Re: [PATCH v15 01/32] v4l: async: Remove re-probing support

2017-10-09 Thread Laurent Pinchart
Hi Sylwester, On Monday, 9 October 2017 19:44:52 EEST Sylwester Nawrocki wrote: > On 10/09/2017 04:18 PM, Sakari Ailus wrote: > > Sure, how about this at the end of the current commit message: > > > > If there is a need to support removing the clock provider in the future, > > this should be impl

Re: [PATCH] [media] ov5645: I2C address change

2017-10-09 Thread Laurent Pinchart
Hi Todor, On Monday, 9 October 2017 19:18:17 EEST Todor Tomov wrote: > On 9.10.2017 15:52, Laurent Pinchart wrote: > > On Monday, 9 October 2017 12:34:26 EEST Sakari Ailus wrote: > >> On Mon, Oct 09, 2017 at 11:36:01AM +0300, Todor Tomov wrote: > >>> On 4.10.2017 13:47, Laurent Pinchart wrote: >

Re: [PATCH v2 21/25] media: lirc: introduce LIRC_SET_POLL_MODE

2017-10-09 Thread Sean Young
On Mon, Oct 09, 2017 at 12:50:19PM +0200, Hans Verkuil wrote: > On 05/10/17 10:45, Sean Young wrote: > > If you want to poll for both decoded scancodes and raw IR, then this > > ioctl will help you. > > I don't get the point of this. You can be in one mode at a time anyway, > so why not just poll

Re: usb/media/imon: null-ptr-deref in imon_probe

2017-10-09 Thread arvindY
Hi Andrey, I have added NULL check for usb_ifnum_to_if() and send a patch. Please re-test it. ~arvind On Monday 09 October 2017 11:20 PM, Andrey Konovalov wrote: Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (4.1

[PATCH] media: imon: Fix null-ptr-deref in imon_probe

2017-10-09 Thread Arvind Yadav
It seems that the return value of usb_ifnum_to_if() can be NULL and needs to be checked. Signed-off-by: Arvind Yadav --- This bug report by Andrey Konovalov usb/media/imon: null-ptr-deref in imon_probe drivers/media/rc/imon.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/medi

usb/media/imon: null-ptr-deref in imon_probe

2017-10-09 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (4.14-rc4). It seems that the return value of usb_ifnum_to_if() can be NULL and needs to be checked. kasan: CONFIG_KASAN_INLINE enabled kasan: GPF could be caused by NUL

usb/media/imon: global-out-of-bounds in imon_probe/imon_init_intf0

2017-10-09 Thread Andrey Konovalov
Hi! I've got the following report while fuzzing the kernel with syzkaller. On commit 8a5776a5f49812d29fe4b2d0a2d71675c3facf3f (4.14-rc4). It seems that imon_ir_raw doesn't have the .key_table initializer, which causes out-of-bounds access when iterating over the key table. =

Re: [PATCH v2 20/25] media: lirc: document LIRC_MODE_SCANCODE

2017-10-09 Thread Sean Young
On Mon, Oct 09, 2017 at 12:27:16PM +0200, Hans Verkuil wrote: > On 05/10/17 10:45, Sean Young wrote: > > Lirc supports a new mode which requires documentation. > > > > Signed-off-by: Sean Young > > --- > > Documentation/media/lirc.h.rst.exceptions | 26 > > ++ > > D

Re: [PATCH v15 01/32] v4l: async: Remove re-probing support

2017-10-09 Thread Sylwester Nawrocki
Hi Sakari, On 10/09/2017 04:18 PM, Sakari Ailus wrote: > Sure, how about this at the end of the current commit message: > > If there is a need to support removing the clock provider in the future, > this should be implemented in the clock framework instead, not in V4L2. I find it a little bit mi

Re: [PATCH v2 10/25] media: lirc: validate scancode for transmit

2017-10-09 Thread Sean Young
On Mon, Oct 09, 2017 at 11:20:52AM +0200, Hans Verkuil wrote: > On 05/10/17 10:45, Sean Young wrote: > > Ensure we reject an attempt to transmit invalid scancodes. > > > > Signed-off-by: Sean Young > > --- > > drivers/media/rc/ir-lirc-codec.c | 3 +++ > > drivers/media/rc/rc-core-priv.h | 1 +

Re: [PATCH] [media] ov5645: I2C address change

2017-10-09 Thread Todor Tomov
Hi Laurent :) On 9.10.2017 15:52, Laurent Pinchart wrote: > Hello, > > On Monday, 9 October 2017 12:34:26 EEST Sakari Ailus wrote: >> On Mon, Oct 09, 2017 at 11:36:01AM +0300, Todor Tomov wrote: >>> On 4.10.2017 13:47, Laurent Pinchart wrote: CC'ing the I2C mainling list and the I2C mainta

Re: [PATCH v15 01/32] v4l: async: Remove re-probing support

2017-10-09 Thread Mauro Carvalho Chehab
Em Mon, 9 Oct 2017 16:20:08 +0200 Hans Verkuil escreveu: > On 09/10/17 16:18, Sakari Ailus wrote: > > Hi Hans, > > > > On Mon, Oct 09, 2017 at 04:08:47PM +0200, Hans Verkuil wrote: > >> On 09/10/17 16:06, Sakari Ailus wrote: > >>> Hi Mauro, > >>> > >>> On Mon, Oct 09, 2017 at 08:22:39AM -030

Re: [PATCH v2 01/25] media: lirc: implement scancode sending

2017-10-09 Thread Hans Verkuil
On 09/10/17 17:11, Sean Young wrote: > On Mon, Oct 09, 2017 at 11:14:28AM +0200, Hans Verkuil wrote: >> On 05/10/17 10:45, Sean Young wrote: > -snip- >>> +/* >>> + * struct lirc_scancode - decoded scancode with protocol for use with >>> + * LIRC_MODE_SCANCODE >>> + * >>> + * @timestamp: Timestamp i

Re: [PATCH v2 01/25] media: lirc: implement scancode sending

2017-10-09 Thread Sean Young
On Mon, Oct 09, 2017 at 11:14:28AM +0200, Hans Verkuil wrote: > On 05/10/17 10:45, Sean Young wrote: -snip- > > +/* > > + * struct lirc_scancode - decoded scancode with protocol for use with > > + * LIRC_MODE_SCANCODE > > + * > > + * @timestamp: Timestamp in nanoseconds using CLOCK_MONOTONIC when I

Re: [PATCH v15 01/32] v4l: async: Remove re-probing support

2017-10-09 Thread Hans Verkuil
On 09/10/17 16:18, Sakari Ailus wrote: > Hi Hans, > > On Mon, Oct 09, 2017 at 04:08:47PM +0200, Hans Verkuil wrote: >> On 09/10/17 16:06, Sakari Ailus wrote: >>> Hi Mauro, >>> >>> On Mon, Oct 09, 2017 at 08:22:39AM -0300, Mauro Carvalho Chehab wrote: Em Thu, 5 Oct 2017 00:50:20 +0300 Sa

Re: [PATCH v15 01/32] v4l: async: Remove re-probing support

2017-10-09 Thread Sakari Ailus
Hi Hans, On Mon, Oct 09, 2017 at 04:08:47PM +0200, Hans Verkuil wrote: > On 09/10/17 16:06, Sakari Ailus wrote: > > Hi Mauro, > > > > On Mon, Oct 09, 2017 at 08:22:39AM -0300, Mauro Carvalho Chehab wrote: > >> Em Thu, 5 Oct 2017 00:50:20 +0300 > >> Sakari Ailus escreveu: > >> > >>> Remove V4L2

Re: [PATCH v15 01/32] v4l: async: Remove re-probing support

2017-10-09 Thread Hans Verkuil
On 09/10/17 16:06, Sakari Ailus wrote: > Hi Mauro, > > On Mon, Oct 09, 2017 at 08:22:39AM -0300, Mauro Carvalho Chehab wrote: >> Em Thu, 5 Oct 2017 00:50:20 +0300 >> Sakari Ailus escreveu: >> >>> Remove V4L2 async re-probing support. The re-probing support has been >>> there to support cases whe

Re: [PATCH v15 01/32] v4l: async: Remove re-probing support

2017-10-09 Thread Sakari Ailus
Hi Mauro, On Mon, Oct 09, 2017 at 08:22:39AM -0300, Mauro Carvalho Chehab wrote: > Em Thu, 5 Oct 2017 00:50:20 +0300 > Sakari Ailus escreveu: > > > Remove V4L2 async re-probing support. The re-probing support has been > > there to support cases where the sub-devices require resources provided b

Re: [PATCH 05/24] media: v4l2-dev: convert VFL_TYPE_* into an enum

2017-10-09 Thread Mike Isely
Acked-By: Mike Isely On Mon, 9 Oct 2017, Mauro Carvalho Chehab wrote: > Using enums makes easier to document, as it can use kernel-doc > markups. It also allows cross-referencing, with increases the > kAPI readability. > > Signed-off-by: Mauro Carvalho Chehab > --- > Documentation/media/kapi

Re: [PATCH v3 00/17] kernel-doc: add supported to document nested structs/

2017-10-09 Thread Mauro Carvalho Chehab
Em Sun, 8 Oct 2017 12:07:29 +0200 Markus Heiser escreveu: > > Am 07.10.2017 um 18:34 schrieb Jonathan Corbet : > > > > On Wed, 4 Oct 2017 08:48:38 -0300 > > Mauro Carvalho Chehab wrote: > > > >> Right now, it is not possible to document nested struct and nested unions. > >> kernel-doc simpl

Re: [PATCH v11 1/4] rockchip/rga: v4l2 m2m support

2017-10-09 Thread Heiko Stübner
Hi Hans, Am Montag, 9. Oktober 2017, 14:48:13 CEST schrieb Hans Verkuil: > On 09/10/17 11:04, Jacob Chen wrote: > > Rockchip RGA is a separate 2D raster graphic acceleration unit. It > > accelerates 2D graphics operations, such as point/line drawing, image > > scaling, rotation, BitBLT, alpha blen

Re: [PATCH] [media] ov5645: I2C address change

2017-10-09 Thread Laurent Pinchart
Hello, On Monday, 9 October 2017 12:34:26 EEST Sakari Ailus wrote: > On Mon, Oct 09, 2017 at 11:36:01AM +0300, Todor Tomov wrote: > > On 4.10.2017 13:47, Laurent Pinchart wrote: > >> CC'ing the I2C mainling list and the I2C maintainer. > >> > >> On Wednesday, 4 October 2017 13:30:08 EEST Sakari

Re: [PATCH v11 1/4] rockchip/rga: v4l2 m2m support

2017-10-09 Thread Hans Verkuil
On 09/10/17 11:04, Jacob Chen wrote: > Rockchip RGA is a separate 2D raster graphic acceleration unit. It > accelerates 2D graphics operations, such as point/line drawing, image > scaling, rotation, BitBLT, alpha blending and image blur/sharpness > > The driver supports various operations from the

Re: [PATCH v11 0/4] Add Rockchip RGA V4l2 support

2017-10-09 Thread Hans Verkuil
Hi Jacob, A patch adding an entry to MAINTAINERS is still missing. Just post a separate patch for that. Regards, Hans On 09/10/17 11:04, Jacob Chen wrote: > change in V11: > - fix compile warning > > change in V10: > - move to rockchip/rga > - changes according to comments > - some st

Re: [PATCH 00/24] V4L2 kAPI cleanups and documentation improvements part 2

2017-10-09 Thread Mauro Carvalho Chehab
Em Mon, 9 Oct 2017 07:19:06 -0300 Mauro Carvalho Chehab escreveu: > That's the second part of my V4L2 kAPI documentation improvements. > It is meant to reduce the gap between the kAPI media headers > and documentation, at least with regards to kernel-doc markups. > > We should likely write more

Re: [PATCH 2/2] media: venus: venc: fix bytesused v4l2_plane field

2017-10-09 Thread Hans Verkuil
On 09/10/17 14:24, Stanimir Varbanov wrote: > This fixes wrongly filled bytesused field of v4l2_plane structure > by include data_offset in the plane, Also fill data_offset and > bytesused for capture type of buffers only. > > Signed-off-by: Stanimir Varbanov > --- > drivers/media/platform/qcom/

[PATCH 1/2] media: venus: fix wrong size on dma_free

2017-10-09 Thread Stanimir Varbanov
This change will fix an issue with dma_free size found with DMA API debug enabled. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/hfi_venus.c | 12 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/drivers/media/platform/qcom/venus/hfi_venus.c b/

[PATCH 2/2] media: venus: venc: fix bytesused v4l2_plane field

2017-10-09 Thread Stanimir Varbanov
This fixes wrongly filled bytesused field of v4l2_plane structure by include data_offset in the plane, Also fill data_offset and bytesused for capture type of buffers only. Signed-off-by: Stanimir Varbanov --- drivers/media/platform/qcom/venus/venc.c | 9 + 1 file changed, 5 insertions(+

Re: [PATCH v14 20/28] v4l: fwnode: Add a helper function to obtain device / integer references

2017-10-09 Thread Hans Verkuil
Hi Sakari, My reply here is also valid for v15. On 26/09/17 13:30, Sakari Ailus wrote: > Hi Hans, > > Thanks for the review. > > On Tue, Sep 26, 2017 at 10:47:40AM +0200, Hans Verkuil wrote: >> On 26/09/17 00:25, Sakari Ailus wrote: >>> v4l2_fwnode_reference_parse_int_prop() will find an fwnode

[GIT PULL FOR v4.15] RC fixes

2017-10-09 Thread Sean Young
Hi Mauro, Here is the new tango driver and some fixes to ensure drivers which depend on device tree, only build if device tree is enabled (or test compile). Please note that MAINTAINERS already has an entry for tango, which matches the new driver. Thanks, Sean The following changes since commi

Re: [PATCH v15 04/32] v4l: async: Fix notifier complete callback error handling

2017-10-09 Thread Hans Verkuil
On 04/10/17 23:50, Sakari Ailus wrote: > The notifier complete callback may return an error. This error code was > simply returned to the caller but never handled properly. > > Move calling the complete callback function to the caller from > v4l2_async_test_notify and undo the work that was done e

Re: [PATCH v15 05/32] v4l: async: Correctly serialise async sub-device unregistration

2017-10-09 Thread Hans Verkuil
On 04/10/17 23:50, Sakari Ailus wrote: > The check whether an async sub-device is bound to a notifier was performed > without list_lock held, making it possible for another process to > unbind the async sub-device before the sub-device unregistration function > proceeds to take the lock. > > Fix t

Re: [PATCH v15 07/32] v4l: async: Add V4L2 async documentation to the documentation build

2017-10-09 Thread Mauro Carvalho Chehab
Em Thu, 5 Oct 2017 00:50:26 +0300 Sakari Ailus escreveu: > The V4L2 async wasn't part of the documentation build. Fix this. > > Signed-off-by: Sakari Ailus > Reviewed-by: Niklas Söderlund > Acked-by: Hans Verkuil > Reviewed-by: Laurent Pinchart Reviewed-by: Mauro Carvalho Chehab It doesn

Re: [PATCH v15 03/32] v4l: async: fix unbind error in v4l2_async_notifier_unregister()

2017-10-09 Thread Hans Verkuil
On 04/10/17 23:50, Sakari Ailus wrote: > From: Niklas Söderlund > > The call to v4l2_async_cleanup() will set sd->asd to NULL so passing it to > notifier->unbind() have no effect and leaves the notifier confused. Call have -> has > the unbind() callback prior to cleaning up the subdevice to avo

Re: [PATCH v15 01/32] v4l: async: Remove re-probing support

2017-10-09 Thread Mauro Carvalho Chehab
Em Thu, 5 Oct 2017 00:50:20 +0300 Sakari Ailus escreveu: > Remove V4L2 async re-probing support. The re-probing support has been > there to support cases where the sub-devices require resources provided by > the main driver's hardware to function, such as clocks. > > Reprobing has allowed unbin

Re: [PATCH v15 02/32] v4l: async: Don't set sd->dev NULL in v4l2_async_cleanup

2017-10-09 Thread Hans Verkuil
On 04/10/17 23:50, Sakari Ailus wrote: > v4l2_async_cleanup() is called when the async sub-device is unbound from > the media device. As the pointer is set by the driver registering the > async sub-device, leave the pointer as set by the driver. > > Signed-off-by: Sakari Ailus Acked-by: Hans Ver

Re: [PATCH 03/24] media: v4l2-mediabus: use BIT() macro for flags

2017-10-09 Thread Sakari Ailus
On Mon, Oct 09, 2017 at 07:19:09AM -0300, Mauro Carvalho Chehab wrote: > Instead of using (1 << n) for bits, use the BIT() macro, > as it makes them better documented. I wouldn't say this makes a difference from documentation point of view. Anyway, Acked-by: Sakari Ailus > > Signed-off-by: Ma

Re: [PATCH 02/24] media: v4l2-flash-led-class.h: add kernel-doc to two ancillary funcs

2017-10-09 Thread Sakari Ailus
Hi Mauro, Thanks for the patch. On Mon, Oct 09, 2017 at 07:19:08AM -0300, Mauro Carvalho Chehab wrote: > There are two ancillary functions at v4l2-flash-led-class.h > that aren't documented. > > Document them. > > Signed-off-by: Mauro Carvalho Chehab > --- > include/media/v4l2-flash-led-class

Re: [PATCH 01/24] media: v4l2-dev.h: add kernel-doc to two macros

2017-10-09 Thread Sakari Ailus
Hi Mauro, On Mon, Oct 09, 2017 at 07:19:07AM -0300, Mauro Carvalho Chehab wrote: > There are two macros at v4l2-dev.h that aren't documented. > > Document them, for completeness. > > Signed-off-by: Mauro Carvalho Chehab > --- > include/media/v4l2-dev.h | 18 +++--- > 1 file changed

Re: [PATCH 09/24] media: v4l2-dev: document video_device flags

2017-10-09 Thread Hans Verkuil
On 09/10/17 12:19, Mauro Carvalho Chehab wrote: > Convert #defines to enums and add kernel-doc markups for V4L2 > video_device flags. > > Signed-off-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Regards, Hans > --- > include/media/v4l2-dev.h | 25 ++--- > 1 fi

Re: [PATCH 07/24] media: get rid of i2c-addr.h

2017-10-09 Thread Hans Verkuil
On 09/10/17 12:19, Mauro Carvalho Chehab wrote: > In the past, the same I2C address were used on multiple places. > After I2C rebinding changes, this is no longer needed. So, we > can just get rid of this header, placing the I2C address where > they belong, e. g. either at bttv driver or at tvtuner

Re: [PATCH 08/24] media: v4l2-dev: document VFL_DIR_* direction defines

2017-10-09 Thread Hans Verkuil
On 09/10/17 12:19, Mauro Carvalho Chehab wrote: > The V4L_DIR_* direction flags document the direction for a > V4L2 device node. Convert them to enum and document. > > Signed-off-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Regards, Hans > --- > include/media/v4l2-dev.h | 22 +++

Re: [PATCH 06/24] media: i2c-addr.h: get rid of now unused defines

2017-10-09 Thread Hans Verkuil
On 09/10/17 12:19, Mauro Carvalho Chehab wrote: > Some of the previously used I2C addresses there aren't used > anymore. So, get rid of them. > > Signed-off-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Regards, Hans > --- > include/media/i2c-addr.h | 7 --- > 1 file changed,

Re: [PATCH 05/24] media: v4l2-dev: convert VFL_TYPE_* into an enum

2017-10-09 Thread Hans Verkuil
On 09/10/17 12:19, Mauro Carvalho Chehab wrote: > Using enums makes easier to document, as it can use kernel-doc > markups. It also allows cross-referencing, with increases the > kAPI readability. > > Signed-off-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Regards, Hans > --- >

Re: [PATCH 04/24] media: v4l2-mediabus: convert flags to enums and document them

2017-10-09 Thread Hans Verkuil
On 09/10/17 12:19, Mauro Carvalho Chehab wrote: > There is a mess with media bus flags: there are two sets of > flags, one used by parallel and ITU-R BT.656 outputs, > and another one for CSI2. > > Depending on the type, the same bit has different meanings. > > That's very confusing, and counter-

Re: [PATCH v2 21/25] media: lirc: introduce LIRC_SET_POLL_MODE

2017-10-09 Thread Hans Verkuil
On 05/10/17 10:45, Sean Young wrote: > If you want to poll for both decoded scancodes and raw IR, then this > ioctl will help you. I don't get the point of this. You can be in one mode at a time anyway, so why not just poll for the current mode? > > int fd = open("/dev/lirc0", O_RDONLY | O_NONBL

Re: [PATCH] media: v4l2-tpg: use __u16 instead of int for struct tpg_rbg_color16

2017-10-09 Thread Hans Verkuil
On 09/10/17 12:23, Mauro Carvalho Chehab wrote: > Despite the struct says "color16", it was actually using 32 bits > for each color. Fix it. > > Suggested-by: Hans Verkuil > Signed-off-by: Mauro Carvalho Chehab Acked-by: Hans Verkuil Thanks! Hans > --- > > Should come after this pa

Re: [PATCH 24/24] media: v4l2-tpg.h: rename color structs

2017-10-09 Thread Hans Verkuil
On 09/10/17 12:19, Mauro Carvalho Chehab wrote: > The color structs right now are just "color" and "color16". > That may lead into conflicts, and don't define precisely what > they meant. As those are used by two drivers (vivid and vimc), > this is even on a somewhat public header! > > So rename t

Re: [PATCH 23/24] media: v4l2-tpg*.h: move headers to include/media/tpg and merge them

2017-10-09 Thread Hans Verkuil
On 09/10/17 12:19, Mauro Carvalho Chehab wrote: > The v4l2-tpg*.h headers are meant to be used only internally by > vivid and vimc. There's no sense keeping them together with the > V4L2 kAPI headers. Also, one header includes the other as they're > meant to be used together. So, merge them. > > S

Re: [PATCH v2 20/25] media: lirc: document LIRC_MODE_SCANCODE

2017-10-09 Thread Hans Verkuil
On 05/10/17 10:45, Sean Young wrote: > Lirc supports a new mode which requires documentation. > > Signed-off-by: Sean Young > --- > Documentation/media/lirc.h.rst.exceptions | 26 > ++ > Documentation/media/uapi/rc/lirc-dev-intro.rst | 26 >

[PATCH] media: v4l2-tpg: use __u16 instead of int for struct tpg_rbg_color16

2017-10-09 Thread Mauro Carvalho Chehab
Despite the struct says "color16", it was actually using 32 bits for each color. Fix it. Suggested-by: Hans Verkuil Signed-off-by: Mauro Carvalho Chehab --- Should come after this patch series: V4L2 kAPI cleanups and documentation improvements part 2 include/media/tpg/v4l2-tpg.h | 2 +-

[PATCH 18/24] media: vb2-core: use bitops for bits

2017-10-09 Thread Mauro Carvalho Chehab
Use the existing macros to identify vb2_io_modes bits. Signed-off-by: Mauro Carvalho Chehab --- include/media/videobuf2-core.h | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/include/media/videobuf2-core.h b/include/media/videobuf2-core.h index 5f4df060affb..0308d

[PATCH 08/24] media: v4l2-dev: document VFL_DIR_* direction defines

2017-10-09 Thread Mauro Carvalho Chehab
The V4L_DIR_* direction flags document the direction for a V4L2 device node. Convert them to enum and document. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-dev.h | 22 -- 1 file changed, 16 insertions(+), 6 deletions(-) diff --git a/include/media/v4l2-dev.h b

[PATCH 10/24] media: v4l2-subdev: use kernel-doc markups to document subdev flags

2017-10-09 Thread Mauro Carvalho Chehab
Right now, those are documented together with the subdev struct, instead of together with the definitions. Convert the definitions to an enum, use BIT() macros and document it at its right place. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-subdev.h | 36 -

[PATCH 01/24] media: v4l2-dev.h: add kernel-doc to two macros

2017-10-09 Thread Mauro Carvalho Chehab
There are two macros at v4l2-dev.h that aren't documented. Document them, for completeness. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-dev.h | 18 +++--- 1 file changed, 15 insertions(+), 3 deletions(-) diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev

[PATCH 15/24] media: v4l2-subdev: get rid of __V4L2_SUBDEV_MK_GET_TRY() macro

2017-10-09 Thread Mauro Carvalho Chehab
The __V4L2_SUBDEV_MK_GET_TRY() macro is used to define 3 functions that have the same arguments. The code of those functions is simple enough to just declare them, de-obfuscating the code. While here, replace BUG_ON() by WARN_ON() as there's no reason why to panic the Kernel if this fails. Signed

[PATCH 24/24] media: v4l2-tpg.h: rename color structs

2017-10-09 Thread Mauro Carvalho Chehab
The color structs right now are just "color" and "color16". That may lead into conflicts, and don't define precisely what they meant. As those are used by two drivers (vivid and vimc), this is even on a somewhat public header! So rename them to: color -> tpg_rbg_color8 color16 ->

[PATCH 20/24] media: vb2-core: document remaining functions

2017-10-09 Thread Mauro Carvalho Chehab
There are several VB2 core functions that aren't documented. Signed-off-by: Mauro Carvalho Chehab --- include/media/videobuf2-core.h | 54 +- 1 file changed, 53 insertions(+), 1 deletion(-) diff --git a/include/media/videobuf2-core.h b/include/media/video

[PATCH 17/24] media: v4l2-subdev: fix a typo

2017-10-09 Thread Mauro Carvalho Chehab
ownner -> owner Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-subdev.h | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/include/media/v4l2-subdev.h b/include/media/v4l2-subdev.h index e215732eed45..345da052618c 100644 --- a/include/media/v4l2-subdev.h +++ b/inclu

[PATCH 23/24] media: v4l2-tpg*.h: move headers to include/media/tpg and merge them

2017-10-09 Thread Mauro Carvalho Chehab
The v4l2-tpg*.h headers are meant to be used only internally by vivid and vimc. There's no sense keeping them together with the V4L2 kAPI headers. Also, one header includes the other as they're meant to be used together. So, merge them. Signed-off-by: Mauro Carvalho Chehab --- drivers/media/comm

[PATCH 07/24] media: get rid of i2c-addr.h

2017-10-09 Thread Mauro Carvalho Chehab
In the past, the same I2C address were used on multiple places. After I2C rebinding changes, this is no longer needed. So, we can just get rid of this header, placing the I2C address where they belong, e. g. either at bttv driver or at tvtuner. Signed-off-by: Mauro Carvalho Chehab --- drivers/me

[PATCH 00/24] V4L2 kAPI cleanups and documentation improvements part 2

2017-10-09 Thread Mauro Carvalho Chehab
That's the second part of my V4L2 kAPI documentation improvements. It is meant to reduce the gap between the kAPI media headers and documentation, at least with regards to kernel-doc markups. We should likely write more things at the ReST files under Documentation/ to better describe some of those

[PATCH 12/24] media: v4l2-subdev: fix description of tuner.s_radio ops

2017-10-09 Thread Mauro Carvalho Chehab
The description there is completely broken and it mentions an ioctl that doesn't exist. Fix it. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-subdev.h | 21 - 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/include/media/v4l2-subdev.h b/include/me

[PATCH 11/24] media: v4l2-subdev: create cross-references for ioctls

2017-10-09 Thread Mauro Carvalho Chehab
When generating Sphinx output, create cross-references for the callbacks for each ioctl. While here, fix a few wrong names for ioctls. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-subdev.h | 65 - 1 file changed, 34 insertions(+), 31 de

[PATCH 03/24] media: v4l2-mediabus: use BIT() macro for flags

2017-10-09 Thread Mauro Carvalho Chehab
Instead of using (1 << n) for bits, use the BIT() macro, as it makes them better documented. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-mediabus.h | 50 ++- 1 file changed, 26 insertions(+), 24 deletions(-) diff --git a/include/media/v4l2

[PATCH 13/24] media: v4l2-subdev: better document IO pin configuration flags

2017-10-09 Thread Mauro Carvalho Chehab
Convert V4L2_SUBDEV_IO_PIN_* to enums, use BIT() and document via kernel-doc. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-subdev.h | 33 + 1 file changed, 21 insertions(+), 12 deletions(-) diff --git a/include/media/v4l2-subdev.h b/include/media/v

[PATCH 21/24] media: vb2-core: fix descriptions for VB2-only functions

2017-10-09 Thread Mauro Carvalho Chehab
When we split VB2 into an independent streaming module and a V4L2 one, some vb2-core functions started to have a wrong description: they're meant to be used only by the API-specific parts of VB2, like vb2-v4l2, as the functions that V4L2 drivers should use are all under videobuf2-v4l2.h. Correct t

[PATCH 22/24] media: vb2: add cross references at memops and v4l2 kernel-doc markups

2017-10-09 Thread Mauro Carvalho Chehab
Add cross-references where needed and add periods at the end of each kernel-doc paragraph, in order to make it coherent with other VB2 descriptions. Signed-off-by: Mauro Carvalho Chehab --- include/media/videobuf2-memops.h | 8 +-- include/media/videobuf2-v4l2.h | 112 +--

[PATCH 06/24] media: i2c-addr.h: get rid of now unused defines

2017-10-09 Thread Mauro Carvalho Chehab
Some of the previously used I2C addresses there aren't used anymore. So, get rid of them. Signed-off-by: Mauro Carvalho Chehab --- include/media/i2c-addr.h | 7 --- 1 file changed, 7 deletions(-) diff --git a/include/media/i2c-addr.h b/include/media/i2c-addr.h index 5d0f56054d26..fba0457b74

[PATCH 19/24] media: vb2-core: Improve kernel-doc markups

2017-10-09 Thread Mauro Carvalho Chehab
There are several issues on the current markups: - lack of cross-references; - wrong cross-references; - lack of a period of the end of several phrases; - Some descriptions can be enhanced. Signed-off-by: Mauro Carvalho Chehab --- include/media/videobuf2-core.h | 376 ++--

[PATCH 04/24] media: v4l2-mediabus: convert flags to enums and document them

2017-10-09 Thread Mauro Carvalho Chehab
There is a mess with media bus flags: there are two sets of flags, one used by parallel and ITU-R BT.656 outputs, and another one for CSI2. Depending on the type, the same bit has different meanings. That's very confusing, and counter-intuitive. So, split them into two sets of flags, inside an en

[PATCH 02/24] media: v4l2-flash-led-class.h: add kernel-doc to two ancillary funcs

2017-10-09 Thread Mauro Carvalho Chehab
There are two ancillary functions at v4l2-flash-led-class.h that aren't documented. Document them. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-flash-led-class.h | 12 1 file changed, 12 insertions(+) diff --git a/include/media/v4l2-flash-led-class.h b/include/medi

[PATCH 14/24] media: v4l2-subdev: convert frame description to enum

2017-10-09 Thread Mauro Carvalho Chehab
As kernel-doc doesn't support documenting #define values, and using enum makes easier to identify where the values are used, convert V4L2_MBUS_FRAME_DESC_FL_* to enum, and use BIT() macro. While here, fix the description at v4l2_mbus_frame_desc_entry, in order to match what's described for V4L2_MB

[PATCH 05/24] media: v4l2-dev: convert VFL_TYPE_* into an enum

2017-10-09 Thread Mauro Carvalho Chehab
Using enums makes easier to document, as it can use kernel-doc markups. It also allows cross-referencing, with increases the kAPI readability. Signed-off-by: Mauro Carvalho Chehab --- Documentation/media/kapi/v4l2-dev.rst | 17 ++--- drivers/media/pci/cx88/cx88-blackbird.c | 3 +- dri

[PATCH 16/24] media: v4l2-subdev: document remaining undocumented functions

2017-10-09 Thread Mauro Carvalho Chehab
There are several undocumented v4l2-subdev functions that are part of kAPI. Document them. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-subdev.h | 70 + 1 file changed, 65 insertions(+), 5 deletions(-) diff --git a/include/media/v4l2-su

[PATCH 09/24] media: v4l2-dev: document video_device flags

2017-10-09 Thread Mauro Carvalho Chehab
Convert #defines to enums and add kernel-doc markups for V4L2 video_device flags. Signed-off-by: Mauro Carvalho Chehab --- include/media/v4l2-dev.h | 25 ++--- 1 file changed, 18 insertions(+), 7 deletions(-) diff --git a/include/media/v4l2-dev.h b/include/media/v4l2-dev.h i

Re: [PATCH v3 3/5] media: atmel-isc: Enable the clocks during probe

2017-10-09 Thread Yang, Wenyou
Hi Sakari, On 2017/10/9 15:58, Sakari Ailus wrote: Hi Wenyou, On Mon, Oct 09, 2017 at 01:49:44PM +0800, Yang, Wenyou wrote: Hi Sakari, Sorry for late answer, because I was in vacation last week. On 2017/9/29 5:25, Sakari Ailus wrote: Hi Wenyou, On Thu, Sep 28, 2017 at 04:18:26PM +0800, Wen

Re: [PATCH v2 18/25] media: lirc: implement reading scancode

2017-10-09 Thread Hans Verkuil
On 05/10/17 10:45, Sean Young wrote: > This implements LIRC_MODE_SCANCODE reading from the lirc device. The > scancode can be read from the input device too, but with this interface > you get the rc protocol, toggle and repeat status in addition too just too -> to Regards, Hans > the sc

Re: [PATCH 07/19] lirc_dev: remove kmalloc in lirc_dev_fop_read()

2017-10-09 Thread David Härdeman
October 4, 2017 6:57 PM, "Mauro Carvalho Chehab" wrote: > Em Sun, 25 Jun 2017 14:31:50 +0200 > David Härdeman escreveu: > >> lirc_zilog uses a chunk_size of 2 and ir-lirc-codec uses sizeof(int). >> >> Therefore, using stack memory should be perfectly fine. >> >> Signed-off-by: David Härdeman

Re: [PATCH] [media] ov5645: I2C address change

2017-10-09 Thread Sakari Ailus
Hi Todor, On Mon, Oct 09, 2017 at 11:36:01AM +0300, Todor Tomov wrote: > Hi Sakari, > > On 4.10.2017 13:47, Laurent Pinchart wrote: > > CC'ing the I2C mainling list and the I2C maintainer. > > > > On Wednesday, 4 October 2017 13:30:08 EEST Sakari Ailus wrote: > >> Hi Todor, > >> > >> On Mon, Oc

Re: [PATCH v2 10/25] media: lirc: validate scancode for transmit

2017-10-09 Thread Hans Verkuil
On 05/10/17 10:45, Sean Young wrote: > Ensure we reject an attempt to transmit invalid scancodes. > > Signed-off-by: Sean Young > --- > drivers/media/rc/ir-lirc-codec.c | 3 +++ > drivers/media/rc/rc-core-priv.h | 1 + > drivers/media/rc/rc-main.c | 53 > +--

Re: [PATCH v2 01/25] media: lirc: implement scancode sending

2017-10-09 Thread Hans Verkuil
On 05/10/17 10:45, Sean Young wrote: > This introduces a new lirc mode: scancode. Any device which can send raw IR > can now also send scancodes. > > int main() > { > int mode, fd = open("/dev/lirc0", O_RDWR); > > mode = LIRC_MODE_SCANCODE; > if (ioctl(fd, LIRC_SET_SEND_MODE,

[PATCH v11 0/4] Add Rockchip RGA V4l2 support

2017-10-09 Thread Jacob Chen
change in V11: - fix compile warning change in V10: - move to rockchip/rga - changes according to comments - some style changes change in V9: - remove protduff things - test with the latest v4l2-compliance change in V8: - remove protduff things change in V6,V7: - correct warning in checkpatch.p

[PATCH v11 4/4] dt-bindings: Document the Rockchip RGA bindings

2017-10-09 Thread Jacob Chen
Add DT bindings documentation for Rockchip RGA Signed-off-by: Jacob Chen Signed-off-by: Yakir Yang Acked-by: Rob Herring --- .../devicetree/bindings/media/rockchip-rga.txt | 33 ++ 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/me

[PATCH v11 2/4] ARM: dts: rockchip: add RGA device node for RK3288

2017-10-09 Thread Jacob Chen
This patch add the RGA dt config of rk3288 SoC. Signed-off-by: Jacob Chen Signed-off-by: Yakir Yang --- arch/arm/boot/dts/rk3288.dtsi | 11 +++ 1 file changed, 11 insertions(+) diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index a0a0b08bff74..8c6dfc0abc42 1

  1   2   >