[PATCH v3] v4l2-core: Add metadata type to vfl_devnode_type

2019-09-12 Thread Vandana BN
Add VFL_TYPE_METADATA, to detect devices of type metadata and to disable unneeded ioctls. Without this change, format ioctls for both video and metadata devices could be called on both device nodes.This is true for other ioctls as well. Signed-off-by: Vandana BN --- V3 Updated commit message dr

Re: [PATCH v2 6/6] smiapp: Avoid fall-through in switch

2019-09-12 Thread Hans Verkuil
On 9/13/19 8:47 AM, Sakari Ailus wrote: > Remove switch fall-through cases in the driver. > > Signed-off-by: Sakari Ailus Reviewed-by: Hans Verkuil > --- > drivers/media/i2c/smiapp/smiapp-core.c | 11 ++- > 1 file changed, 6 insertions(+), 5 deletions(-) > > diff --git a/drivers/medi

[PATCH v2 6/6] smiapp: Avoid fall-through in switch

2019-09-12 Thread Sakari Ailus
Remove switch fall-through cases in the driver. Signed-off-by: Sakari Ailus --- drivers/media/i2c/smiapp/smiapp-core.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/media/i2c/smiapp/smiapp-core.c b/drivers/media/i2c/smiapp/smiapp-core.c index 76d7d204ec

Re: [PATCH 6/6] smiapp: Avoid fall-through in switch

2019-09-12 Thread Sakari Ailus
On Thu, Sep 12, 2019 at 03:17:54PM +0200, Hans Verkuil wrote: > On 8/19/19 2:47 PM, Sakari Ailus wrote: > > Remove switch fall-through cases in the driver. > > > > Signed-off-by: Sakari Ailus > > --- > > drivers/media/i2c/smiapp/smiapp-core.c | 11 +-- > > 1 file changed, 5 insertions(+)

cron job: media_tree daily build: ERRORS

2019-09-12 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 Sep 13 05:00:12 CEST 2019 media-tree git hash:6f51fdfd8229d5358c2d6e272cf73478866e8ddc media_build gi

Re: [PATCH -next 2/2] media: aspeed: set hsync and vsync polarities to normal before starting mode detection

2019-09-12 Thread Andrew Jeffery
On Fri, 13 Sep 2019, at 02:36, Jae Hyun Yoo wrote: > On 9/11/2019 10:39 PM, Andrew Jeffery wrote: > > > > > > On Wed, 11 Sep 2019, at 04:37, Jae Hyun Yoo wrote: > >> Sometimes it detects a weird resolution such as 1024x287 when the > >> actual resolution is 1024x768. To resolve such an issue,

[PATCH v3 09/11] media: v4l2-ctrls: Add helper to register properties

2019-09-12 Thread Jacopo Mondi
Add an helper function to v4l2-ctrls to register controls associated with a device property. Add an UNSET flag to the device properties to distinguish uninitialized properties from properties with an actual value at control registration time. Signed-off-by: Jacopo Mondi --- drivers/media/v4l2-co

[PATCH v3 11/11] media: i2c: ov13858: Parse and register properties

2019-09-12 Thread Jacopo Mondi
Parse device properties and register controls for them using the newly introduced helpers. Signed-off-by: Jacopo Mondi --- drivers/media/i2c/ov13858.c | 11 +++ 1 file changed, 11 insertions(+) diff --git a/drivers/media/i2c/ov13858.c b/drivers/media/i2c/ov13858.c index aac6f77afa0f..aa

[PATCH v3 10/11] media: i2c: ov5670: Parse and register properties

2019-09-12 Thread Jacopo Mondi
Parse device properties and register controls for them using the newly introduced helpers. Signed-off-by: Jacopo Mondi --- drivers/media/i2c/ov5670.c | 12 1 file changed, 12 insertions(+) diff --git a/drivers/media/i2c/ov5670.c b/drivers/media/i2c/ov5670.c index 041fcbb4eebd..3d14

[PATCH v3 05/11] media: v4l2-ctrls: Add camera location and rotation

2019-09-12 Thread Jacopo Mondi
Add support for the newly defined V4L2_CID_CAMERA_SENSOR_LOCATION and V4L2_CID_CAMERA_SENSOR_ROTATION read-only controls used to report the camera device mounting position and orientation respectively. Reviewed-by: Laurent Pinchart Signed-off-by: Jacopo Mondi --- drivers/media/v4l2-core/v4l2-ct

[PATCH v3 08/11] media: v4l2-ctrls: Sort includes alphabetically

2019-09-12 Thread Jacopo Mondi
Before adding a new include directive, sort the existing ones in alphabetical order. Signed-off-by: Jacopo Mondi --- drivers/media/v4l2-core/v4l2-ctrls.c | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-ctrls.c b/drivers/media/v4l2-core/v4

[PATCH v3 04/11] media: v4l2-ctrl: Document V4L2_CID_CAMERA_SENSOR_ROTATION

2019-09-12 Thread Jacopo Mondi
Add documentation for the V4L2_CID_CAMERA_SENSOR_ROTATION camera control. The newly added read-only control reports the camera device mounting rotation. Signed-off-by: Jacopo Mondi --- .../media/uapi/v4l/ext-ctrls-camera.rst | 117 ++ 1 file changed, 117 insertions(+) diff

[PATCH v3 02/11] media: v4l2-ctrl: Document V4L2_CID_CAMERA_SENSOR_LOCATION

2019-09-12 Thread Jacopo Mondi
Add documentation for the V4L2_CID_CAMERA_SENSOR_LOCATION camera control. The newly added read-only control reports the camera device mounting position. Signed-off-by: Jacopo Mondi --- .../media/uapi/v4l/ext-ctrls-camera.rst | 32 +++ 1 file changed, 32 insertions(+) diff

[PATCH v3 03/11] dt-bindings: video-interfaces: Expand rotation description

2019-09-12 Thread Jacopo Mondi
Expand the 'rotation' property description to define the direction and orientation of the axis around which the device mounting rotation is expressed. Signed-off-by: Jacopo Mondi --- .../devicetree/bindings/media/video-interfaces.txt| 8 +--- 1 file changed, 5 insertions(+), 3 deleti

[PATCH v3 01/11] dt-bindings: video-interfaces: Document 'location' property

2019-09-12 Thread Jacopo Mondi
Add the 'location' device property, used to specify a device mounting position. The property is particularly meaningful for mobile devices with a well defined usage orientation. Signed-off-by: Jacopo Mondi --- .../devicetree/bindings/media/video-interfaces.txt| 11 +++ 1 file changed

[PATCH v3 00/11] media: Report camera sensor properties

2019-09-12 Thread Jacopo Mondi
Hello, third iteration following: "media: v4l2-ctrls: Add camera sensor location" https://patchwork.kernel.org/project/linux-media/list/?series=160901 "[v2,00/10] media: Report camera sensor properties https://patchwork.kernel.org/cover/6443/ Compared to v2 I have dropped the two patches repo

[PATCH v3 07/11] include: v4l2-ctrl: Sort forward declarations

2019-09-12 Thread Jacopo Mondi
Before adding a new forward declaration to the v4l2-ctrls.h header file, sort the existing ones alphabetically. Signed-off-by: Jacopo Mondi --- include/media/v4l2-ctrls.h | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/include/media/v4l2-ctrls.h b/include/media/v4l2-c

[PATCH v3 06/11] media: v4l2-fwnode: Add helper to parse device properties

2019-09-12 Thread Jacopo Mondi
Add an helper function to parse common device properties in the same way as v4l2_fwnode_endpoint_parse() parses common endpoint properties. Initially parse the 'rotation' and 'location' properties from the firmware interface. Signed-off-by: Jacopo Mondi --- drivers/media/v4l2-core/v4l2-fwnode.c

Re: [PATCH -next 2/2] media: aspeed: set hsync and vsync polarities to normal before starting mode detection

2019-09-12 Thread Jae Hyun Yoo
On 9/11/2019 10:39 PM, Andrew Jeffery wrote: On Wed, 11 Sep 2019, at 04:37, Jae Hyun Yoo wrote: Sometimes it detects a weird resolution such as 1024x287 when the actual resolution is 1024x768. To resolve such an issue, this commit adds clearing for hsync and vsync polarity register bits at the

Re: [PATCH -next 1/2] media: aspeed: refine hsync/vsync polarity setting logic

2019-09-12 Thread Jae Hyun Yoo
Hi Andrew, On 9/11/2019 10:33 PM, Andrew Jeffery wrote: On Wed, 11 Sep 2019, at 04:37, Jae Hyun Yoo wrote: This commit refines hsync/vsync polarity setting logic by making also clearing register bits possible based on probed sync state accordingly. That was tough to parse, but I think I under

Re: [PATCH v2 01/10] media: dt-bindings: Document 'location' property

2019-09-12 Thread Jacopo Mondi
Hi Mauro, On Thu, Sep 12, 2019 at 09:51:47AM -0300, Mauro Carvalho Chehab wrote: > Em Tue, 27 Aug 2019 15:21:26 +0300 > Laurent Pinchart escreveu: > > > Hi Jacopo, > > > > Thank you for the patch. > > > > On Tue, Aug 27, 2019 at 11:23:27AM +0200, Jacopo Mondi wrote: > > > Add the 'location' devic

[PATCH 2/3] media: imx: fix and simplify pixel format enumeration

2019-09-12 Thread Philipp Zabel
Merge yuv_formats and rgb_formats into a single array. Always loop over all entries, skipping those that are incompatible with the requested enumeration. This simplifies the code, lets us get rid of the manual counting of array entries, and stops accidentally ignoring some non-mbus RGB formats. Be

[PATCH 3/3] media: imx: fix media bus format enumeration

2019-09-12 Thread Philipp Zabel
Iterate over all media bus formats, not just over the first format in each imx_media_pixfmt entry. Before: $ v4l2-ctl -d $(media-ctl -e ipu1_csi0) --list-subdev-mbus-codes 0 ioctl: VIDIOC_SUBDEV_ENUM_MBUS_CODE (pad=0) 0x2006: MEDIA_BUS_FMT_UYVY8_2X8 0x2008: MEDIA_BUS_FMT_YUYV8

[PATCH 1/3] media: imx: enable V4L2_PIX_FMT_XBGR32, _BGRX32, and _RGBX32

2019-09-12 Thread Philipp Zabel
Now that proper V4L2 pixel formats exist for all 32-bit RGB permutations, drop support for the poorly defined legacy format V4L2_PIX_FMT_BGR32. Signed-off-by: Philipp Zabel --- drivers/staging/media/imx/imx-media-utils.c | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git

Re: [RFC] V4L2 & Metadata: switch to /dev/v4l-metaX instead of /dev/videoX

2019-09-12 Thread Hans Verkuil
On 9/12/19 4:57 PM, Philipp Zabel wrote: > On Thu, 2019-09-12 at 16:49 +0200, Hans Verkuil wrote: >> On 9/12/19 4:21 PM, Mauro Carvalho Chehab wrote: >>> Em Thu, 12 Sep 2019 14:16:11 +0100 >>> Kieran Bingham escreveu: >>> Hi Hans, On 12/09/2019 08:48, Hans Verkuil wrote: > Hi al

Re: [RFC] V4L2 & Metadata: switch to /dev/v4l-metaX instead of /dev/videoX

2019-09-12 Thread Philipp Zabel
On Thu, 2019-09-12 at 16:49 +0200, Hans Verkuil wrote: > On 9/12/19 4:21 PM, Mauro Carvalho Chehab wrote: > > Em Thu, 12 Sep 2019 14:16:11 +0100 > > Kieran Bingham escreveu: > > > > > Hi Hans, > > > > > > On 12/09/2019 08:48, Hans Verkuil wrote: > > > > Hi all, > > > > > > > > I am increasingly

Re: [RFC] V4L2 & Metadata: switch to /dev/v4l-metaX instead of /dev/videoX

2019-09-12 Thread Hans Verkuil
On 9/12/19 4:21 PM, Mauro Carvalho Chehab wrote: > Em Thu, 12 Sep 2019 14:16:11 +0100 > Kieran Bingham escreveu: > >> Hi Hans, >> >> On 12/09/2019 08:48, Hans Verkuil wrote: >>> Hi all, >>> >>> I am increasingly unhappy about the choice of /dev/videoX for metadata >>> devices. >>> >>> It is conf

Re: [RFC] V4L2 & Metadata: switch to /dev/v4l-metaX instead of /dev/videoX

2019-09-12 Thread Mauro Carvalho Chehab
Em Thu, 12 Sep 2019 14:16:11 +0100 Kieran Bingham escreveu: > Hi Hans, > > On 12/09/2019 08:48, Hans Verkuil wrote: > > Hi all, > > > > I am increasingly unhappy about the choice of /dev/videoX for metadata > > devices. > > > > It is confusing for end-users (especially w.r.t. the common uvc d

Re: [PATCH v2] v4l2-core: Add metadata type to vfl_devnode_type.

2019-09-12 Thread Hans Verkuil
Hi Vandana, On 9/12/19 10:06 AM, Vandana BN wrote: > Add VFL_TYPE_METADATA, to detect devices of type metadata and > to disable unneeded ioctls. The commit text can be improved. It would be good to add the reason for this change (in this case because without this check the format ioctls for both

Re: [RFC] V4L2 & Metadata: switch to /dev/v4l-metaX instead of /dev/videoX

2019-09-12 Thread Hans Verkuil
On 9/12/19 3:16 PM, Kieran Bingham wrote: > Hi Hans, > > On 12/09/2019 08:48, Hans Verkuil wrote: >> Hi all, >> >> I am increasingly unhappy about the choice of /dev/videoX for metadata >> devices. >> >> It is confusing for end-users (especially w.r.t. the common uvc driver) and >> if we want to

Proposal for a v4l2_ctrl_new_std_compound() function

2019-09-12 Thread Hans Verkuil
Hi Ricardo, As per our irc discussion, here is a proposal how I think it can be done. The core problem is that for compound types we want to provide a default value that can be used in std_init_compound() without having to provide our own type ops. The new v4l2_ctrl_new_std_compound would pass a c

Re: [PATCH 2/6] v4l: subdev: Provide a locking scheme for subdev operations

2019-09-12 Thread Sakari Ailus
Hi Hans, On Thu, Sep 12, 2019 at 03:11:27PM +0200, Hans Verkuil wrote: > On 8/19/19 2:47 PM, Sakari Ailus wrote: > > The V4L2 sub-device's operations are called both from other drivers as > > well as through the IOCTL uAPI. Previously the sub-device drivers were > > responsible for managing their

Re: [PATCH 6/6] smiapp: Avoid fall-through in switch

2019-09-12 Thread Hans Verkuil
On 8/19/19 2:47 PM, Sakari Ailus wrote: > Remove switch fall-through cases in the driver. > > Signed-off-by: Sakari Ailus > --- > drivers/media/i2c/smiapp/smiapp-core.c | 11 +-- > 1 file changed, 5 insertions(+), 6 deletions(-) > > diff --git a/drivers/media/i2c/smiapp/smiapp-core.c >

Re: [RFC] V4L2 & Metadata: switch to /dev/v4l-metaX instead of /dev/videoX

2019-09-12 Thread Kieran Bingham
Hi Hans, On 12/09/2019 08:48, Hans Verkuil wrote: > Hi all, > > I am increasingly unhappy about the choice of /dev/videoX for metadata > devices. > > It is confusing for end-users (especially w.r.t. the common uvc driver) and > if we want to change this, then we need to do it soon. > > This pa

Re: [PATCH 2/6] v4l: subdev: Provide a locking scheme for subdev operations

2019-09-12 Thread Hans Verkuil
On 8/19/19 2:47 PM, Sakari Ailus wrote: > The V4L2 sub-device's operations are called both from other drivers as > well as through the IOCTL uAPI. Previously the sub-device drivers were > responsible for managing their own serialisation. This patch adds an > optional mutex the drivers may set, and

Re: [PATCH v2 01/10] media: dt-bindings: Document 'location' property

2019-09-12 Thread Mauro Carvalho Chehab
Em Tue, 27 Aug 2019 15:21:26 +0300 Laurent Pinchart escreveu: > Hi Jacopo, > > Thank you for the patch. > > On Tue, Aug 27, 2019 at 11:23:27AM +0200, Jacopo Mondi wrote: > > Add the 'location' device property, used to specify the camera device > > mounting position. The property is particularly

Re: [PATCH 1/6] v4l: subdev: Set sd->devnode before registering the subdev

2019-09-12 Thread Hans Verkuil
On 8/19/19 2:47 PM, Sakari Ailus wrote: > The subdev's video device node was only assigned after registering the > device node in the system. While it is unlikely that a driver needed to > use this field in handling system calls to its file handle, there remains > a slim chance the devnode field re

Re: [PATCH 0/4] Enable Hantro G1 post-processor

2019-09-12 Thread Ezequiel Garcia
On Thu, 2019-09-12 at 14:52 +0900, Tomasz Figa wrote: > On Thu, Sep 12, 2019 at 4:49 AM Nicolas Dufresne wrote: > > Le mercredi 11 septembre 2019 à 09:27 +0100, Ezequiel Garcia a écrit : > > > On Mon, 2019-09-09 at 16:07 +0900, Tomasz Figa wrote: > > > > Hi Ezequiel, > > > > > > > > On Wed, Sep 4

[PATCH v2] v4l2-core: Add metadata type to vfl_devnode_type.

2019-09-12 Thread Vandana BN
Add VFL_TYPE_METADATA, to detect devices of type metadata and to disable unneeded ioctls. Signed-off-by: Vandana BN --- drivers/media/v4l2-core/v4l2-dev.c | 57 ++-- drivers/media/v4l2-core/v4l2-ioctl.c | 5 ++- include/media/v4l2-dev.h | 2 + 3 files chan

[RFC] V4L2 & Metadata: switch to /dev/v4l-metaX instead of /dev/videoX

2019-09-12 Thread Hans Verkuil
Hi all, I am increasingly unhappy about the choice of /dev/videoX for metadata devices. It is confusing for end-users (especially w.r.t. the common uvc driver) and if we want to change this, then we need to do it soon. This patch https://patchwork.linuxtv.org/patch/58693/ adds a new VFL_TYPE_ME

[PATCH] v4l2-dev: refine selection of valid v4l-touch ioctls

2019-09-12 Thread Hans Verkuil
The selection of which ioctls are valid for touch devices was too wide. Refine this to only the set of ioctls that make sense for such devices. Signed-off-by: Hans Verkuil --- This patch sits on top of Vandana's metadata patch: https://patchwork.linuxtv.org/patch/58693/ --- drivers/media/v4l2-co

Re: [ANN] Topics for a media summit in Lyon in October

2019-09-12 Thread Michael Tretter
Hi Hans, On Tue, 03 Sep 2019 09:21:43 +0200, Hans Verkuil wrote: > Hi all, > > I've decided to hold the meeting during the ELCE and not on Thursday. > Two key people can't be there on Thursday and some travel back Thursday > evening and so would have to leave early. > > Looking at the schedule I

Re: [PATCH] v4l2-core: Add metadata type to vfl_devnode_type.

2019-09-12 Thread Hans Verkuil
On 9/10/19 1:38 PM, Vandana BN wrote: > Add VFL_TYPE_METADATA, to detect devices of type metadata and > to disable unneeded ioctls. > > Signed-off-by: Vandana BN > --- > drivers/media/v4l2-core/v4l2-dev.c | 57 ++-- > drivers/media/v4l2-core/v4l2-ioctl.c | 5 ++- > inc