cron job: media_tree daily build: WARNINGS

2019-06-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: Sun Jun 30 05:00:12 CEST 2019 media-tree git hash:f81cbfc4f82a75ca0a2dc181a9c93b88f0e6509d media_build gi

[PATCH V2 27/29] staging: bcm2835-camera: Add sanity checks for queue_setup/CREATE_BUFS

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Fixes a v4l2-compliance failure when passed a buffer that is too small. queue_setup wasn't handling the case where *nplanes != 0, as used from CREATE_BUFS and requiring the driver to sanity check the provided buffer parameters. It was assuming that it was always being used in

[PATCH V2 28/29] staging: bcm2835-camera: Set the field value within each buffer

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Fixes a v4l2-compliance failure v4l2-test-buffers.cpp(415): g_field() == V4L2_FIELD_ANY The driver only ever produces progresive frames, so field should always be set to V4L2_FIELD_NONE. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Ac

[PATCH V2 29/29] staging: bcm2835-camera: Correct ctrl min/max/step/def to 64bit

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson The V4L2 control API was expanded to take 64 bit values in commit 0ba2aeb6dab (Apr 16 2014), but as this driver wasn't in the mainline kernel at that point this was overlooked. Update to use 64 bit values. This also fixes a couple of warnings in 64 bit builds. Signed-off-by

[PATCH V2 25/29] staging: mmal-vchiq: Avoid use of bool in structures

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Fixes up a checkpatch error "Avoid using bool structure members because of possible alignment issues". Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- drivers/staging/vc04_services/bcm2835-camera/mmal

[PATCH V2 26/29] staging: bcm2835-camera: Fix stride on RGB3/BGR3 formats

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson RGB3/BGR3 end up being 3 bytes per pixel, which meant that the alignment code ended up trying to align using bitmasking with a mask of 96. That doesn't work, so switch to an arithmetic alignment for those formats. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren

Re: [PATCH for v5.3] v4l2-subdev: fix regression in check_pad()

2019-06-29 Thread Hans Verkuil
On 6/29/19 3:13 PM, Janusz Krzysztofik wrote: > On Saturday, June 29, 2019 2:57:09 P.M. CEST Hans Verkuil wrote: >> On 6/29/19 2:06 PM, Janusz Krzysztofik wrote: >>> Hi Hans, >>> >>> On Saturday, June 29, 2019 12:00:24 P.M. CEST Hans Verkuil wrote: sd->entity.graph_obj.mdev can be NULL when th

Re: [PATCH for v5.3] v4l2-subdev: fix regression in check_pad()

2019-06-29 Thread Janusz Krzysztofik
On Saturday, June 29, 2019 2:57:09 P.M. CEST Hans Verkuil wrote: > On 6/29/19 2:06 PM, Janusz Krzysztofik wrote: > > Hi Hans, > > > > On Saturday, June 29, 2019 12:00:24 P.M. CEST Hans Verkuil wrote: > >> sd->entity.graph_obj.mdev can be NULL when this function is called, and > >> that breaks exis

Re: [PATCH for v5.3] v4l2-subdev: fix regression in check_pad()

2019-06-29 Thread Hans Verkuil
On 6/29/19 2:57 PM, Hans Verkuil wrote: > On 6/29/19 2:06 PM, Janusz Krzysztofik wrote: >> Hi Hans, >> >> On Saturday, June 29, 2019 12:00:24 P.M. CEST Hans Verkuil wrote: >>> sd->entity.graph_obj.mdev can be NULL when this function is called, and >>> that breaks existing drivers (rcar-vin, but pro

[PATCHv2 for v5.3] v4l2-subdev: fix regression in check_pad()

2019-06-29 Thread Hans Verkuil
sd->entity.graph_obj.mdev can be NULL when this function is called, and that breaks existing drivers (rcar-vin, but probably others as well). Check if sd->entity.num_pads is non-zero instead since that doesn't depend on mdev. Signed-off-by: Hans Verkuil Reported-by: Niklas Söderlund Fixes: a8fa

[PATCH for v5.3] v4l2-subdev: fix regression in check_pad()

2019-06-29 Thread Hans Verkuil
sd->entity.graph_obj.mdev can be NULL when this function is called, and that breaks existing drivers (rcar-vin, but probably others as well). Check if sd->entity.num_pads is non-zero instead since that doesn't depend on mdev. Signed-off-by: Hans Verkuil Reported-by: Niklas Söderlund Fixes: a8fa

Re: [PATCH for v5.3] v4l2-subdev: fix regression in check_pad()

2019-06-29 Thread Hans Verkuil
On 6/29/19 2:06 PM, Janusz Krzysztofik wrote: > Hi Hans, > > On Saturday, June 29, 2019 12:00:24 P.M. CEST Hans Verkuil wrote: >> sd->entity.graph_obj.mdev can be NULL when this function is called, and >> that breaks existing drivers (rcar-vin, but probably others as well). >> >> Check if sd->enti

Re: [RFC] Stateful codecs and requirements for compressed formats

2019-06-29 Thread Nicolas Dufresne
Le samedi 29 juin 2019 à 11:02 +0100, Dave Stevenson a écrit : > Hi Nicolas > > On Fri, 28 Jun 2019 at 16:48, Nicolas Dufresne wrote: > > Le vendredi 28 juin 2019 à 16:21 +0100, Dave Stevenson a écrit : > > > Hi Hans > > > > > > On Fri, 28 Jun 2019 at 15:34, Hans Verkuil wrote: > > > > Hi all,

[PATCH V2 21/29] staging: bcm2835-camera: Fix up mmal-parameters.h

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Fixes up all the checkpatch error "line over 80 characters" in mmal-parameters.h Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- .../vc04_services/bcm2835-camera/mmal-parameters.h | 261 +-

[PATCH V2 24/29] staging: bcm2835-camera: Remove/amend some obsolete comments

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Remove a todo which has been done. Remove a template line that was redundant. Make a comment clearer as to the non-obvious meaning of a field. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- drivers/s

[PATCH V2 22/29] staging: bcm2835-camera: Use enums for max value in controls

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Controls of type MMAL_CONTROL_TYPE_STD_MENU call v4l2_ctrl_new_std_menu with a max value and a mask. The max value is one of the defined values for the control, however in the config array there are several entries where raw numbers have been used instead. Replace these with

[PATCH V2 16/29] staging: bcm2835-camera: Handle empty EOS buffers whilst streaming

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson The change to mapping V4L2 to MMAL buffers 1:1 didn't handle the condition we get with raw pixel buffers (eg YUV and RGB) direct from the camera's stills port. That sends the pixel buffer and then an empty buffer with the EOS flag set. The EOS buffer wasn't handled and return

[PATCH V2 20/29] staging: bcm2835-camera: Fix multiple assignments should be avoided

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Clear checkpatch complaints of "multiple assignments should be avoided" Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 5 +++-- 1 file

[PATCH V2 18/29] staging: bcm2835-camera: Add multiple inclusion protection to headers

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson mmal-common.h and mmal-msg.h didn't have the normal ifndef FOO / define FOO / endif protection to stop it being included multiple times. Add it. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- drivers

[PATCH V2 19/29] staging: bcm2835-camera: Unify header inclusion defines

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Most of the headers use ifndef FOO_H, whilst mmal-parameters.h used ifndef __FOO_H. Revise mmal-parameters.h to drop the underscores and make the headers all consistent. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Car

[PATCH V2 17/29] staging: bcm2835-camera: Set sequence number correctly

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Set the sequence number in vb2_v4l2_buffer mainly so the latest v4l2-ctl reports the frame rate correctly. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- drivers/staging/vc04_services/bcm2835-camera/

[PATCH V2 23/29] staging: bcm2835-camera: Correct V4L2_CID_COLORFX_CBCR behaviour

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson With V4L2_CID_COLORFX_CBCR calling ctrl_set_colfx it was incorrectly assigning the colour values to the enable field of dev->colourfx instead of the u and v fields. Correct the assignments. Reported as a Coverity issue Detected by CoverityScan CID#1419711 ("Unused value")

[PATCH] media: imx7.rst: Fix the references to the CSI multiplexer

2019-06-29 Thread Fabio Estevam
In imx7s.dtsi the node name for the CSI multiplexer is "csi-mux", not "csi_mux", so fix all the references in the document. This fixes the following error when the instructions are followed: # media-ctl -l "'imx7-mipi-csis.0':1 -> 'csi_mux':1[1]" Unable to parse link: Invalid argument (22) While

[PATCH V2 12/29] staging: bcm2835-camera: Fix missing lines between items

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Fix checkpatch errors for missing blank lines after variable or structure declarations. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.h |

[PATCH V2 07/29] staging: bcm2835-camera: Fix comment style violations.

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Fix comment style violations in the header files. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- .../vc04_services/bcm2835-camera/mmal-msg-format.h | 95 --- .../vc04_services/bcm2835-ca

[PATCH V2 03/29] staging: bcm2835-camera: Do not bulk receive from service thread

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson vchi_bulk_queue_receive will queue up to a default of 4 bulk receives on a connection before blocking. If called from the VCHI service_callback thread, then that thread is unable to service the VCHI_CALLBACK_BULK_RECEIVED events that would enable the queue call to succeed. A

[PATCH V2 11/29] staging: bcm2835-camera: Fix brace style issues.

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Fix mismatched or missing brace issues flagged by checkpatch. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 3 ++- drivers/staging/vc0

[PATCH V2 14/29] staging: bcm2835-camera: Ensure all buffers are returned on disable

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson With the recent change to match MMAL and V4L2 buffers there is a need to wait for all MMAL buffers to be returned during stop_streaming. Fixes: 938416707071 ("staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping") Signed-off-by: Dave Stevenson Signed-off-by: Stefan W

[PATCH V2 08/29] staging: bcm2835-camera: Fix spacing around operators

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Fix checkpatch warnings over spaces around operators. Many were around operations that can be replaced with the BIT(x) macro, so replace with that where appropriate. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho

[PATCH V2 15/29] staging: bcm2835-camera: Remove check of the number of buffers supplied

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Before commit "staging: bcm2835-camera: Remove V4L2/MMAL buffer remapping" there was a need to ensure that there were sufficient buffers supplied from the user to cover those being sent to the VPU (always 1). Now the buffers are linked 1:1 between MMAL and V4L2, therefore th

[PATCH V2 01/29] staging: bcm2835-camera: Check the error for REPEAT_SEQ_HEADER

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson When handling for V4L2_CID_MPEG_VIDEO_REPEAT_SEQ_HEADER was added the firmware would reject the setting if H264 hadn't already been selected. This was fixed in the firmware at that point, but to enable backwards compatibility the returned error was ignored. That was Dec 2013

[PATCH V2 04/29] staging: bcm2835-camera: Correctly denote key frames in encoded data

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Forward MMAL key frame flags to the V4L2 buffers. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 3 +++ 1 file changed, 3 insertions(+)

[PATCH V2 10/29] staging: bcm2835-camera: Fix multiple line dereference errors

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Fix checkpatch errors "Avoid multiple line dereference" Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- drivers/staging/vc04_services/bcm2835-camera/bcm2835-camera.c | 11 --- 1 file changed,

[PATCH V2 02/29] staging: bcm2835-camera: Replace spinlock protecting context_map with mutex

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson The commit "staging: bcm2835-camera: Replace open-coded idr with a struct idr." replaced an internal implementation of an idr with the standard functions and a spinlock. idr_alloc(GFP_KERNEL) can sleep whilst calling kmem_cache_alloc to allocate the new node, but this is not

[PATCH V2 00/29] staging: bcm2835-camera: Improvements

2019-06-29 Thread Stefan Wahren
This is an attempt to help Dave Stevenson to get all the fixes and improvements of the bcm2835-camera driver into mainline. Mostly i only polished the commit logs for upstream. The series based on the latest bugfix V2 of staging: bcm2835-camera: Restore return behavior of ctrl_set_bitrate(). Cha

[PATCH V2 06/29] staging: bcm2835-camera: Remove dead email addresses

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson None of the listed author email addresses were valid. Keep list of authors and the companies they represented. Update my email address. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- drivers/staging/

[PATCH V2 09/29] staging: bcm2835-camera: Reduce length of enum names

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson We have numerous lines over 80 chars, or oddly split. Many of these are due to using long enum names such as MMAL_COMPONENT_CAMERA. Reduce the length of these enum names. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Car

[PATCH V2 13/29] staging: bcm2835-camera: Fix open parenthesis alignment

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Fix checkpatch "Alignment should match open parenthesis" errors. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- .../vc04_services/bcm2835-camera/bcm2835-camera.c | 9 .../vc04_services/bcm

[PATCH V2 05/29] staging: bcm2835-camera: Return early on errors

2019-06-29 Thread Stefan Wahren
From: Dave Stevenson Fix several instances where it is easier to return early on error conditions than handle it as an else clause. As requested by Mauro. Signed-off-by: Dave Stevenson Signed-off-by: Stefan Wahren Acked-by: Hans Verkuil Acked-by: Mauro Carvalho Chehab --- .../vc04_services/

Re: [PATCH for v5.3] v4l2-subdev: fix regression in check_pad()

2019-06-29 Thread Janusz Krzysztofik
Hi Hans, On Saturday, June 29, 2019 12:00:24 P.M. CEST Hans Verkuil wrote: > sd->entity.graph_obj.mdev can be NULL when this function is called, and > that breaks existing drivers (rcar-vin, but probably others as well). > > Check if sd->entity.num_pads is non-zero instead since that doesn't depe

Re: Setting up the links for imx7-mipi-csis

2019-06-29 Thread Fabio Estevam
Hi Sakari, On Sat, Jun 29, 2019 at 6:13 AM Sakari Ailus wrote: > What does media-ctp -p say? Thanks for this hint! I managed to fix the media-ctl failure by looking at media-ctl -p output. Documentation/media/v4l-drivers/imx7.rst mentions "csi_mux", but media-ctl says "csi-mux", so I needed t

Re: [PATCH for v5.3] v4l2-subdev: fix regression in check_pad()

2019-06-29 Thread Niklas Söderlund
Hi Hans, Thanks for your work. On 2019-06-29 12:00:24 +0200, Hans Verkuil wrote: > sd->entity.graph_obj.mdev can be NULL when this function is called, and > that breaks existing drivers (rcar-vin, but probably others as well). > > Check if sd->entity.num_pads is non-zero instead since that doesn

Re: [PATCH 00/31] staging: bcm2835-camera: Improvements

2019-06-29 Thread Stefan Wahren
Hi Dave, Am 28.06.19 um 19:29 schrieb Dave Stevenson: > Hi Stefan > > Could you try running > v4l2-ctl -v width=640,height=480,pixelformat=YU12 > before running v4l2-compliance? The default format is JPEG, and I just > wonder if there is an issue lurking in the compression side. yes, this is much

Re: [RFC] Stateful codecs and requirements for compressed formats

2019-06-29 Thread Dave Stevenson
Hi Nicolas On Fri, 28 Jun 2019 at 16:48, Nicolas Dufresne wrote: > > Le vendredi 28 juin 2019 à 16:21 +0100, Dave Stevenson a écrit : > > Hi Hans > > > > On Fri, 28 Jun 2019 at 15:34, Hans Verkuil wrote: > > > Hi all, > > > > > > I hope I Cc-ed everyone with a stake in this issue. > > > > > > On

[PATCH for v5.3] v4l2-subdev: fix regression in check_pad()

2019-06-29 Thread Hans Verkuil
sd->entity.graph_obj.mdev can be NULL when this function is called, and that breaks existing drivers (rcar-vin, but probably others as well). Check if sd->entity.num_pads is non-zero instead since that doesn't depend on mdev. Signed-off-by: Hans Verkuil Reported-by: Niklas Söderlund Fixes: a8fa

Re: Setting up the links for imx7-mipi-csis

2019-06-29 Thread Sakari Ailus
Hi Fabio, On Fri, Jun 28, 2019 at 10:12:21PM -0300, Fabio Estevam wrote: > Hi Rui, > > On Fri, Jun 28, 2019 at 7:03 PM Fabio Estevam wrote: > > > The first command succeeds, but the second one fails: > > > > # media-ctl -l "'imx7-mipi-csis.0':1 -> 'csi_mux':1[1]" > > Unable to parse link: Inval