[PATCH v5 11/13] media: dt-bindings: tvp5150: add optional tvnorms documentation

2019-04-04 Thread Marco Felsch
Document the optional binding to limit the possible tv-norms on the input connectors. Signed-off-by: Marco Felsch --- Documentation/devicetree/bindings/media/i2c/tvp5150.txt | 9 + 1 file changed, 9 insertions(+) diff --git a/Documentation/devicetree/bindings/media/i2c/tvp5150.txt b/Do

[PATCH v5 08/13] media: tvp5150: initialize subdev before parsing device tree

2019-04-04 Thread Marco Felsch
From: Michael Tretter There are several debug prints in the tvp5150_parse_dt() function, which do not print the prefix, because the v4l2_subdev is not initialized, yet. Initialize the v4l2_subdev before parsing the device tree to fix the debug messages. Signed-off-by: Michael Tretter Signed-of

[PATCH v5 07/13] media: tvp5150: add FORMAT_TRY support for get/set selection handlers

2019-04-04 Thread Marco Felsch
Since commit 10d5509c8d50 ("[media] v4l2: remove g/s_crop from video ops") the 'which' field for set/get_selection must be FORMAT_ACTIVE. There is no way to try different selections. The patch adds a helper function to select the correct selection memory space (sub-device file handle or driver stat

[PATCH v5 06/13] media: dt-bindings: tvp5150: Add input port connectors DT bindings

2019-04-04 Thread Marco Felsch
The TVP5150/1 decoders support different video input sources to their AIP1A/B pins. Possible configurations are as follows: - Analog Composite signal connected to AIP1A. - Analog Composite signal connected to AIP1B. - Analog S-Video Y (luminance) and C (chrominance) signals connected to

[PATCH v5 10/13] media: dt-bindings: tvp5150: cleanup bindings stlye

2019-04-04 Thread Marco Felsch
Use underlines to highlight optional and required properties. This is quite common for all bindings. Align descriptions and start sentence with uppercase letter. Also reword the usage of the required endpoint properties for the output port in case BT.656 should be used. Signed-off-by: Marco Felsch

[PATCH v5 13/13] media: tvp5150: make debug output more readable

2019-04-04 Thread Marco Felsch
The debug output for tvp5150_selmux() isn't really intuitive. Register values are printed decimal formatted and the input/output driver states are printed as enum. Even more the "normal" output enum mapps to zero so a active output will printing output=0 and a inactive output=1. Change this by bri

[PATCH v5 09/13] media: tvp5150: add s_power callback

2019-04-04 Thread Marco Felsch
Don't en-/disable the interrupts during s_stream because someone can disable the stream but wants to get informed if the stream is locked again. So keep the interrupts enabled the whole time the pipeline is opened. Signed-off-by: Marco Felsch --- drivers/media/i2c/tvp5150.c | 23

[PATCH v5 05/13] media: tvp5150: add input source selection of_graph support

2019-04-04 Thread Marco Felsch
This patch adds the of_graph support to describe the tvp connections. Physical the TVP5150 has three ports: AIP1A, AIP1B and YOUT. As result of discussion [1],[2] the device-tree maps these ports 1:1. The svideo connector must be conneted to port@0/endpoint@1, look at the Documentation for more inf

[PATCH v5 04/13] partial revert of "[media] tvp5150: add HW input connectors support"

2019-04-04 Thread Marco Felsch
From: Javier Martinez Canillas Commit f7b4b54e6364 ("[media] tvp5150: add HW input connectors support") added input signals support for the tvp5150, but the approach was found to be incorrect so the corresponding DT binding commit 82c2ffeb217a ("[media] tvp5150: document input connectors DT bindi

[PATCH v5 12/13] media: tvp5150: add support to limit tv norms on connector

2019-04-04 Thread Marco Felsch
The tvp5150 accepts NTSC(M,J,4.43), PAL (B,D,G,H,I,M,N) and SECAM video data and is able to auto-detect the input signal. The auto-detection does not work if the connector does not receive an input signal and the tvp5150 might not be configured correctly. This misconfiguration leads into wrong deco

[PATCH v5 03/13] media: v4l2-fwnode: add initial connector parsing support

2019-04-04 Thread Marco Felsch
The patch adds the initial connector parsing code, so we can move from a driver specific parsing code to a generic one. Currently only the generic fields and the analog-connector specific fields are parsed. Parsing the other connector specific fields can be added by a simple callbacks. Signed-off-

[PATCH v5 01/13] dt-bindings: connector: analog: add tv norms property

2019-04-04 Thread Marco Felsch
Some connectors no matter if in- or output supports only a limited range of tv norms. It doesn't matter if the hardware behind that connector supports more than the listed formats since the users are restriced by a label e.g. to plug only a camera into this connector which uses the PAL format. Thi

[PATCH v5 00/13] TVP5150 new features

2019-04-04 Thread Marco Felsch
Hi, few months ago I send my v4 of this series [1] unfortunately I got no feedback from Mauro but Jacopos feedback was quite helpfull =) After my v4 I send another series which adds a generic way to parse connector endpoints [2]. To make it easier for everyone I squashed both series [1,2] into th

[PATCH v5 02/13] media: v4l2-fwnode: add v4l2_fwnode_connector

2019-04-04 Thread Marco Felsch
Currently every driver needs to parse the connector endpoints by it self. This is the initial work to make this generic. The generic connector has some common fields and some connector specific parts. The generic one includes: - type - label - remote_port (the port where the connector is conn

cron job: media_tree daily build: WARNINGS

2019-04-04 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 Apr 5 05:00:11 CEST 2019 media-tree git hash:1c3ec30bb23023d738b538e64ac3028902d53692 media_build gi

Re: [RFC 4/8] omap3isp: Rework OF endpoint parsing

2019-04-04 Thread Sakari Ailus
Hi Hans, Thank you for reviewing this. On Thu, Apr 04, 2019 at 03:43:51PM +0200, Hans Verkuil wrote: > On 3/18/19 8:16 PM, Sakari Ailus wrote: ... > > +static int isp_parse_of_endpoints(struct isp_device *isp) > > +{ > > + struct fwnode_handle *ep; > > + struct isp_async_subdev *isd; > > +

Re: [RFC 2/8] v4l2-async: Add v4l2_async_notifier_add_fwnode_remote_subdev

2019-04-04 Thread Sakari Ailus
On Thu, Apr 04, 2019 at 03:39:41PM +0200, Hans Verkuil wrote: > On 3/18/19 8:16 PM, Sakari Ailus wrote: > > v4l2_async_notifier_add_fwnode_remote_subdev is a convenience function for > > parsing information on V4L2 fwnode subdevs. > > > > Signed-off-by: Sakari Ailus > > --- > > drivers/media/v4l

Re: [RFC 1/8] v4l2-async: Use endpoint node, not device node, for fwnode match

2019-04-04 Thread Sakari Ailus
Hi Hans, Thank you for the review. On Thu, Apr 04, 2019 at 03:37:44PM +0200, Hans Verkuil wrote: ... > > diff --git a/drivers/media/platform/davinci/vpif_capture.c > > b/drivers/media/platform/davinci/vpif_capture.c > > index 6216b7ac6875..bb4c9cb9f2ad 100644 > > --- a/drivers/media/platform/dav

Its Very Urgent!

2019-04-04 Thread Ms. Dalya
I have a proposal with a profit of Thirteen Million US Dollars, kindly contact me via Email for more details immediately.

[bug report] [media] s5p-mfc: use MFC_BUF_FLAG_EOS to identify last buffers in decoder capture queue

2019-04-04 Thread Dan Carpenter
Hello Andrzej Hajda, The patch 4d0b0ed63660: "[media] s5p-mfc: use MFC_BUF_FLAG_EOS to identify last buffers in decoder capture queue" from Oct 7, 2015, leads to the following static checker warning: drivers/media/platform/s5p-mfc/s5p_mfc_dec.c:664 vidioc_dqbuf() warn: uncapped us

Re: [PATCH 2/2] media: ov2659: fix unbalanced mutex_lock/unlock

2019-04-04 Thread Lad, Prabhakar
Hi Akinobu, Thanks for the patch. On Sat, Mar 30, 2019 at 2:01 PM Akinobu Mita wrote: > > Avoid returning with mutex locked. > > Fixes: fa8cb6444c32 ("[media] ov2659: Don't depend on subdev API") > Cc: "Lad, Prabhakar" > Cc: Sakari Ailus > Cc: Mauro Carvalho Chehab > Signed-off-by: Akinobu Mi

Re: [PATCH 1/2] media: ov2659: make S_FMT ioctl succeed even if requested format doesn't match

2019-04-04 Thread Lad, Prabhakar
Hi Akinobu, Thanks for the patch. On Sat, Mar 30, 2019 at 2:01 PM Akinobu Mita wrote: > > This driver returns an error if unsupported media bus pixel code is > requested by VIDIOC_SUBDEV_S_FMT. > > But according to Documentation/media/uapi/v4l/vidioc-subdev-g-fmt.rst, > > Drivers must not return

Re: [PATCH 1/6] media: v4l2-subdev: add stubs for v4l2_subdev_get_try_*

2019-04-04 Thread Jacopo Mondi
Hi Marco, Sakari, On Thu, Apr 04, 2019 at 11:39:34AM +0300, Sakari Ailus wrote: > Hi Marco, > > On Thu, Apr 04, 2019 at 09:39:57AM +0200, Marco Felsch wrote: > > In case of missing CONFIG_VIDEO_V4L2_SUBDEV_API those helpers aren't > > available. So each driver have to add ifdefs around those helpe

Re: [RFC 4/8] omap3isp: Rework OF endpoint parsing

2019-04-04 Thread Hans Verkuil
On 3/18/19 8:16 PM, Sakari Ailus wrote: > Rework OF endpoint parsing for the omap3isp driver. This does add some > lines of code. The benefits are still clear: > > - the great complication related to callbacks in endpoint parsing is gone; > instead endpoints are obtained port by port and > > -

Re: [RFC 2/8] v4l2-async: Add v4l2_async_notifier_add_fwnode_remote_subdev

2019-04-04 Thread Hans Verkuil
On 3/18/19 8:16 PM, Sakari Ailus wrote: > v4l2_async_notifier_add_fwnode_remote_subdev is a convenience function for > parsing information on V4L2 fwnode subdevs. > > Signed-off-by: Sakari Ailus > --- > drivers/media/v4l2-core/v4l2-async.c | 23 +++ > include/media/v4l2-async

Re: [RFC 1/8] v4l2-async: Use endpoint node, not device node, for fwnode match

2019-04-04 Thread Hans Verkuil
Some review comments: On 3/18/19 8:16 PM, Sakari Ailus wrote: > V4L2 async framework can use both device's fwnode and endpoints's fwnode > for matching the async sub-device with the sub-device. In order to proceed > moving towards endpoint matching assign the endpoint to the async > sub-device. >

[PATCH] videobuf2-vmalloc: get_userptr: buffers are always writable

2019-04-04 Thread Hans Verkuil
In vb2_vmalloc_get_userptr() the framevector is created with the 'write' argument set to false when vb2_create_framevec() is called for OUTPUT buffers. So the pages are marked as read-only. However, userspace will write to these buffers since it will fill in the data to output. Since get_userptr i

Re: [PATCH 1/6] media: v4l2-subdev: add stubs for v4l2_subdev_get_try_*

2019-04-04 Thread Sakari Ailus
Hi Marco, On Thu, Apr 04, 2019 at 09:39:57AM +0200, Marco Felsch wrote: > In case of missing CONFIG_VIDEO_V4L2_SUBDEV_API those helpers aren't > available. So each driver have to add ifdefs around those helpers or > add the CONFIG_VIDEO_V4L2_SUBDEV_API as dependcy. > > Make these helpers availabl

[RFC PATCH v2 0/7] media: v4l2: Add extended fmt and buffer ioctls

2019-04-04 Thread Boris Brezillon
Hello, This RFC follows the discussion started by Hans [1] a few months back. It does not try to address all the problem reported in this thread but instead focuses on the FMT and BUF(S) ioctls. Note that my primary goal is to unify handling for multiplanar and singleplanar formats and extend thi

[RFC PATCH v2 6/7] media: vivid: Convert the capture and output drivers to EXT_FMT/EXT_BUF

2019-04-04 Thread Boris Brezillon
This should simplify things a bit as we now have a single implementation instead of the MPLANE and !MPLANE versions. Signed-off-by: Boris Brezillon --- Changes in v2: - New patch --- drivers/media/platform/vivid/vivid-core.c| 30 ++- drivers/media/platform/vivid/vivid-vid-cap.c | 171 +-

[RFC PATCH v2 1/7] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane

2019-04-04 Thread Boris Brezillon
Support for multiplanar and singleplanar formats is mutually exclusive, at least in practice. In our attempt to unify support for support for mplane and !mplane in v4l, let's get rid of the ->vidioc_enum_fmt_{vid,out}_cap_mplane() hooks and call ->vidioc_enum_fmt_{vid,out}_cap() instead. Signed-of

[RFC PATCH v2 7/7] media: vimc: Implement the ext_fmt and ext_buf hooks

2019-04-04 Thread Boris Brezillon
Convert the driver to the _ext_fmt and _ext_buf API. Signed-off-by: Boris Brezillon --- Changes in v2: - New patch --- drivers/media/platform/vimc/vimc-capture.c | 65 +++--- drivers/media/platform/vimc/vimc-common.c | 4 +- drivers/media/platform/vimc/vimc-common.h | 2 +- d

[RFC PATCH v2 3/7] media: v4l2: Add extended buffer operations

2019-04-04 Thread Boris Brezillon
From: Hans Verkuil Those extended buffer ops have several purpose: 1/ Fix y2038 issues by converting the timestamp into an u64 counting the number of ns elapsed since 1970 2/ Unify single/multiplanar handling 3/ Add a new start offset field to each v4l2 plane buffer info struct to support t

[RFC PATCH v2 2/7] media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more)

2019-04-04 Thread Boris Brezillon
This is part of the multiplanar and singleplanar unification process. v4l2_ext_pix_format is supposed to work for both cases. We also add the concept of modifiers already employed in DRM to expose HW-specific formats (like tiled or compressed formats) and allow exchanging this information with the

[RFC PATCH v2 4/7] media: videobuf2: Expose helpers to implement the _ext_fmt and _ext_buf hooks

2019-04-04 Thread Boris Brezillon
The VB2 layer is used by a lot of drivers. Patch it to support the _EXT_FMT and _EXT_BUF ioctls in order to ease conversion of existing drivers to these new APIs. Note that internally, the VB2 core is now only using ext structs and old APIs are supported through conversion wrappers. Signed-off-by

[RFC PATCH v2 5/7] media: mediabus: Add an helper to convert a ext_pix format to an mbus_fmt

2019-04-04 Thread Boris Brezillon
Just a new version of v4l2_fill_mbus_format() to deal with the new v4l2_ext_pix_format struct. This is needed to convert the VIMC driver to the EXT_FMT/EXT_BUF iocts. Signed-off-by: Boris Brezillon --- Changes in v2: - New patch --- include/media/v4l2-mediabus.h | 22 ++ 1 fi

[PATCH 3/6] media: ov2680: get rid of extra ifdefs

2019-04-04 Thread Marco Felsch
We can drop the ifdef dance since the v4l2_subdev_get_try_format return the correct value in both cases with or without CONFIG_VIDEO_V4L2_SUBDEV_API is enabled. The patch is based on Lubomir's series [1]. [1] https://patchwork.kernel.org/cover/10703017/ Signed-off-by: Marco Felsch --- drivers/

[PATCH 5/6] media: ov7670: get rid of extra ifdefs

2019-04-04 Thread Marco Felsch
We can drop the ifdef dance since the v4l2_subdev_get_try_format return the correct value in both cases with or without CONFIG_VIDEO_V4L2_SUBDEV_API is enabled. The patch is based on Lubomir's series [1]. [1] https://patchwork.kernel.org/cover/10703017/ Signed-off-by: Marco Felsch --- drivers/

[PATCH 6/6] media: ov7740: get rid of extra ifdefs

2019-04-04 Thread Marco Felsch
We can drop the ifdef dance since the v4l2_subdev_get_try_format return the correct value in both cases with or without CONFIG_VIDEO_V4L2_SUBDEV_API is enabled. The patch is based on Lubomir's series [1]. [1] https://patchwork.kernel.org/cover/10703017/ Signed-off-by: Marco Felsch --- drivers/

[PATCH 4/6] media: ov5695: get rid of extra ifdefs

2019-04-04 Thread Marco Felsch
We can drop the ifdef dance since the v4l2_subdev_get_try_format return the correct value in both cases with or without CONFIG_VIDEO_V4L2_SUBDEV_API is enabled. The patch is based on Lubomir's series [1]. [1] https://patchwork.kernel.org/cover/10703017/ Signed-off-by: Marco Felsch --- drivers/

[PATCH 0/6] Avoid v4l2_subdev_get_try_ ifdef dance

2019-04-04 Thread Marco Felsch
Hi, during my work on [1] I prepared a patch to avoid driver interal ifdef dances for: - v4l2_subdev_get_try_format - v4l2_subdev_get_try_crop - v4l2_subdev_get_try_compose helper functions. Jacopo did some comments on it so I picked Lubomir's series [2] as base and prepared a new one since thi

[PATCH 2/6] media: ov2659: get rid of extra ifdefs

2019-04-04 Thread Marco Felsch
We can drop the ifdef dance since the v4l2_subdev_get_try_format return the correct value in both cases with or without CONFIG_VIDEO_V4L2_SUBDEV_API is enabled. The patch is based on Lubomir's series [1]. [1] https://patchwork.kernel.org/cover/10703017/ Signed-off-by: Marco Felsch --- drivers/

[PATCH 1/6] media: v4l2-subdev: add stubs for v4l2_subdev_get_try_*

2019-04-04 Thread Marco Felsch
In case of missing CONFIG_VIDEO_V4L2_SUBDEV_API those helpers aren't available. So each driver have to add ifdefs around those helpers or add the CONFIG_VIDEO_V4L2_SUBDEV_API as dependcy. Make these helpers available in case of CONFIG_VIDEO_V4L2_SUBDEV_API isn't set to avoid ifdefs. This approach