Re: [PATCHv2 02/12] videodev2.h: add V4L2_FMT_FLAG_DYN_RESOLUTION

2019-08-15 Thread Alexandre Courbot
On Wed, Aug 14, 2019 at 9:53 PM Paul Kocialkowski wrote: > > Hi, > > On Mon 12 Aug 19, 13:05, Hans Verkuil wrote: > > From: Maxime Jourdan > > > > Add an enum_fmt format flag to specifically tag coded formats where > > dynamic resolution switching is supported by the device. > > > > This is usefu

Re: [PATCHv2 05/12] media: mtk-vcodec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION

2019-08-15 Thread Alexandre Courbot
On Mon, Aug 12, 2019 at 8:06 PM Hans Verkuil wrote: > > From: Maxime Jourdan > > Tag all the coded formats where the mtk-vcodec decoder supports dynamic > resolution switching. > > Signed-off-by: Maxime Jourdan > Signed-off-by: Hans Verkuil >From our use of this driver in Chrome this seems to

Re: [PATCHv2 09/12] vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF

2019-08-15 Thread Alexandre Courbot
On Mon, Aug 12, 2019 at 8:06 PM Hans Verkuil wrote: > > This RFC patch adds support for the V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF flag. > It also adds a new V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF capability and > a v4l2_m2m_release_capture_buf() helper function. > > Drivers should set vb2_queue->

Re: [PATCHv2 10/12] videodev2.h: add V4L2_DEC_CMD_FLUSH

2019-08-15 Thread Alexandre Courbot
On Mon, Aug 12, 2019 at 8:07 PM Hans Verkuil wrote: > > Add this new V4L2_DEC_CMD_FLUSH decoder command and document it. > > Signed-off-by: Hans Verkuil > --- > Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst | 11 ++- > Documentation/media/videodev2.h.rst.exceptions | 1 + > i

Re: [PATCHv2 01/12] videodev2.h: add V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM

2019-08-15 Thread Alexandre Courbot
On Mon, Aug 12, 2019 at 8:05 PM Hans Verkuil wrote: > > Add an enum_fmt format flag to specifically tag coded formats where > full bytestream parsing is supported by the device. > > Some stateful decoders are capable of fully parsing a bytestream, > but others require that userspace pre-parses the

Re: [PATCHv2 01/12] videodev2.h: add V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM

2019-08-15 Thread Alexandre Courbot
On Thu, Aug 15, 2019 at 5:11 PM Alexandre Courbot wrote: > > On Mon, Aug 12, 2019 at 8:05 PM Hans Verkuil wrote: > > > > Add an enum_fmt format flag to specifically tag coded formats where > > full bytestream parsing is supported by the device. > > > > Some stateful decoders are capable of fully

Re: [PATCHv2 11/12] media: docs-rst: Document m2m stateless video decoder interface

2019-08-15 Thread Alexandre Courbot
On Mon, Aug 12, 2019 at 8:07 PM Hans Verkuil wrote: > > From: Alexandre Courbot > > Documents the protocol that user-space should follow when > communicating with stateless video decoders. > > The stateless video decoding API makes use of the new request and tags > APIs. While it has been impleme

Re: [PATCHv2 02/12] videodev2.h: add V4L2_FMT_FLAG_DYN_RESOLUTION

2019-08-15 Thread Tomasz Figa
On Thu, Aug 15, 2019 at 5:12 PM Alexandre Courbot wrote: > > On Wed, Aug 14, 2019 at 9:53 PM Paul Kocialkowski > wrote: > > > > Hi, > > > > On Mon 12 Aug 19, 13:05, Hans Verkuil wrote: > > > From: Maxime Jourdan > > > > > > Add an enum_fmt format flag to specifically tag coded formats where > >

Re: [PATCHv2 04/12] media: s5p_mfc_dec: set flags for OUTPUT coded formats

2019-08-15 Thread Tomasz Figa
Hi Hans, On Mon, Aug 12, 2019 at 8:05 PM Hans Verkuil wrote: > > From: Maxime Jourdan > > Tag all the coded formats where the s5p_mfc decoder supports dynamic > resolution switching or has a bytestream parser. > I believe it depends on the MFC hardware version. v5 might have some additional res

Re: MyGica T230 dvb-t2 data corruption since commit 5fa8815

2019-08-15 Thread Sean Young
Hi JP, On Tue, Aug 13, 2019 at 03:46:37PM +0200, JP wrote: > Thanks James, my tests on both DVB-T and DVB-C all went OK. > > So, with the t230 driver in cxusb broken for one hw version of > the device and both hw versions now working fine in dvbsky & > the driver in cxusb does not crash itself an

Re: [PATCHv2 09/12] vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF

2019-08-15 Thread Hans Verkuil
On 8/15/19 10:12 AM, Alexandre Courbot wrote: > On Mon, Aug 12, 2019 at 8:06 PM Hans Verkuil wrote: >> >> This RFC patch adds support for the V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF flag. >> It also adds a new V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF capability and >> a v4l2_m2m_release_capture_buf()

Re: [PATCHv2 10/12] videodev2.h: add V4L2_DEC_CMD_FLUSH

2019-08-15 Thread Hans Verkuil
On 8/15/19 10:12 AM, Alexandre Courbot wrote: > On Mon, Aug 12, 2019 at 8:07 PM Hans Verkuil wrote: >> >> Add this new V4L2_DEC_CMD_FLUSH decoder command and document it. >> >> Signed-off-by: Hans Verkuil >> --- >> Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst | 11 ++- >> Document

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

2019-08-15 Thread Marco Felsch
Currently every driver needs to parse the connector endpoints by it self. This is the initial work to make this generic. A generic connector has common members and connector specific members. The common members are: - type - label (optional) - links - nr_of_links The specific members are s

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

2019-08-15 Thread Marco Felsch
This patch adds the of_graph support to describe the tvp input 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. Look at the Documentation for more information. Since the TVP5150 is a converter/bridge the

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

2019-08-15 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 v7 06/13] media: dt-bindings: tvp5150: Add input port connectors DT bindings

2019-08-15 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 v7 03/13] media: v4l2-fwnode: add initial connector parsing support

2019-08-15 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 v7 09/13] media: tvp5150: add s_power callback

2019-08-15 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 v7 10/13] media: dt-bindings: tvp5150: cleanup bindings stlye

2019-08-15 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 v7 01/13] dt-bindings: connector: analog: add tv norms property

2019-08-15 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 v7 00/13] Add TVP5150 features

2019-08-15 Thread Marco Felsch
Hi, many thanks to Mauro, Hans, Jacopo and Laurent for the feedack :) Hopefully I got all the comments and concerns and fixed those with this v7. In short: - v4l2-connector label isn't set anymore if not specified - tvp5150 connectors are now static -> reduces code and is easier to review an

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

2019-08-15 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 v7 08/13] media: tvp5150: initialize subdev before parsing device tree

2019-08-15 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 v7 11/13] media: dt-bindings: tvp5150: add optional tvnorms documentation

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

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

2019-08-15 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 v7 04/13] partial revert of "[media] tvp5150: add HW input connectors support"

2019-08-15 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

Build failed in Jenkins: libcamera #3

2019-08-15 Thread jenkins
See Changes: -- Started by user Mauro Carvalho Chehab Running as SYSTEM Building remotely on slave2 in workspace No credentials specified Cloning

Re: [PATCHv2 09/12] vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF

2019-08-15 Thread Tomasz Figa
On Thu, Aug 15, 2019 at 8:53 PM Hans Verkuil wrote: > > On 8/15/19 10:12 AM, Alexandre Courbot wrote: > > On Mon, Aug 12, 2019 at 8:06 PM Hans Verkuil > > wrote: > >> > >> This RFC patch adds support for the V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF > >> flag. > >> It also adds a new V4L2_BUF_CAP_SUPP

[PATCH] videobuf2-core: avoid buffer operations while in stop_streaming

2019-08-15 Thread Hans Verkuil
The stop_streaming callback is called with the queue lock held. But some drivers (vivid being one of them) need to stop a kernel thread in stop_streaming, and if that kernel thread takes the same queue lock, then stop_streaming may have to unlock the queue lock, stop the thread, and lock it again.

Re: [PATCHv2 09/12] vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF

2019-08-15 Thread Hans Verkuil
On 8/15/19 2:27 PM, Tomasz Figa wrote: > On Thu, Aug 15, 2019 at 8:53 PM Hans Verkuil wrote: >> >> On 8/15/19 10:12 AM, Alexandre Courbot wrote: >>> On Mon, Aug 12, 2019 at 8:06 PM Hans Verkuil >>> wrote: This RFC patch adds support for the V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF flag

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

2019-08-15 Thread Laurent Pinchart
Hi Marco, On Fri, Aug 09, 2019 at 07:58:09AM +0200, Marco Felsch wrote: > On 19-05-16 19:27, Laurent Pinchart wrote: > > On Mon, Apr 15, 2019 at 02:44:01PM +0200, Marco Felsch wrote: > > > Some connectors no matter if in- or output supports only a limited > > > range of tv norms. It doesn't matter

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

2019-08-15 Thread Laurent Pinchart
Hi Marco, On Fri, Aug 09, 2019 at 09:55:36AM +0200, Marco Felsch wrote: > On 19-05-16 19:36, Laurent Pinchart wrote: > > On Mon, Apr 15, 2019 at 02:44:02PM +0200, Marco Felsch wrote: > > > Currently every driver needs to parse the connector endpoints by it self. > > > > s/it self/itself/ > > > >

[PATCH] radio/si470x: kill urb on error

2019-08-15 Thread Hans Verkuil
In the probe() function radio->int_in_urb was not killed if an error occurred in the probe sequence. It was also missing in the disconnect. This caused this syzbot issue: https://syzkaller.appspot.com/bug?extid=2d4fc2a0c45ad8da7e99 Signed-off-by: Hans Verkuil Reported-and-tested-by: syzbot+2d4f

Jenkins build is back to normal : libcamera #4

2019-08-15 Thread jenkins
See

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

2019-08-15 Thread Laurent Pinchart
Hi Marco, On Fri, Aug 09, 2019 at 02:16:06PM +0200, Marco Felsch wrote: > On 19-05-16 19:51, Laurent Pinchart wrote: > > On Tue, May 14, 2019 at 03:20:04PM -0300, Mauro Carvalho Chehab wrote: > >> Em Mon, 6 May 2019 12:10:41 +0200 Hans Verkuil escreveu: > >>> On 4/15/19 2:44 PM, Marco Felsch wrote

[PATCH] gspca: zero usb_buf on error

2019-08-15 Thread Hans Verkuil
If reg_r() fails, then gspca_dev->usb_buf was left uninitialized, and some drivers used the contents of that buffer in logic. This caused several syzbot errors: https://syzkaller.appspot.com/bug?extid=397fd082ce5143e2f67d https://syzkaller.appspot.com/bug?extid=1a35278dd0ebfb3a038a https://syzkal

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

2019-08-15 Thread Marco Felsch
On 19-08-15 15:33, Laurent Pinchart wrote: > Hi Marco, > > On Fri, Aug 09, 2019 at 07:58:09AM +0200, Marco Felsch wrote: > > On 19-05-16 19:27, Laurent Pinchart wrote: > > > On Mon, Apr 15, 2019 at 02:44:01PM +0200, Marco Felsch wrote: > > > > Some connectors no matter if in- or output supports on

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

2019-08-15 Thread Laurent Pinchart
On Tue, Aug 13, 2019 at 10:54:29AM +0200, Marco Felsch wrote: > Hi Laurent, > > On 19-05-16 21:03, Laurent Pinchart wrote: > > Hello Marco, > > > > Thank you for the patch. > > > > On Tue, May 14, 2019 at 03:25:45PM -0300, Mauro Carvalho Chehab wrote: > > > Em Mon, 15 Apr 2019 14:44:05 +0200 Mar

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

2019-08-15 Thread Laurent Pinchart
Hi Marco, On Tue, Aug 13, 2019 at 11:10:30AM +0200, Marco Felsch wrote: > On 19-05-16 21:07, Laurent Pinchart wrote: > > On Mon, Apr 15, 2019 at 02:44:12PM +0200, Marco Felsch wrote: > > > 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

[PATCH] dvb-usb-v2/gl861: fix wrong memcpy

2019-08-15 Thread Hans Verkuil
The memcpy in gl861_i2c_read_ex() in gl861.c swapped the src and dst arguments, leaving the rbuf uninitialized. This issue caused this syzbot error: https://syzkaller.appspot.com/bug?extid=9e6bf7282557bd1fc80d Signed-off-by: Hans Verkuil Reported-and-tested-by: syzbot+9e6bf7282557bd1fc...@syzka

[PATCH] hdpvr: add terminating 0 at end of string

2019-08-15 Thread Hans Verkuil
dev->usbc_buf was passed as argument for %s, but it was not safeguarded by a terminating 0. This caused this syzbot issue: https://syzkaller.appspot.com/bug?extid=79d18aac4bf1770dd050 Signed-off-by: Hans Verkuil Reported-and-tested-by: syzbot+79d18aac4bf1770dd...@syzkaller.appspotmail.com --- d

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

2019-08-15 Thread Laurent Pinchart
Hi Marco, On Thu, Aug 15, 2019 at 02:50:02PM +0200, Marco Felsch wrote: > On 19-08-15 15:33, Laurent Pinchart wrote: > > On Fri, Aug 09, 2019 at 07:58:09AM +0200, Marco Felsch wrote: > >> On 19-05-16 19:27, Laurent Pinchart wrote: > >>> On Mon, Apr 15, 2019 at 02:44:01PM +0200, Marco Felsch wrote:

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

2019-08-15 Thread Marco Felsch
Hi Laurent, On 19-08-15 15:38, Laurent Pinchart wrote: > Hi Marco, > > On Fri, Aug 09, 2019 at 09:55:36AM +0200, Marco Felsch wrote: > > On 19-05-16 19:36, Laurent Pinchart wrote: > > > On Mon, Apr 15, 2019 at 02:44:02PM +0200, Marco Felsch wrote: > > > > Currently every driver needs to parse the

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

2019-08-15 Thread Laurent Pinchart
Hi Marco, On Thu, Aug 15, 2019 at 03:04:37PM +0200, Marco Felsch wrote: > On 19-08-15 15:38, Laurent Pinchart wrote: > > On Fri, Aug 09, 2019 at 09:55:36AM +0200, Marco Felsch wrote: > >> On 19-05-16 19:36, Laurent Pinchart wrote: > >>> On Mon, Apr 15, 2019 at 02:44:02PM +0200, Marco Felsch wrote:

Re: [RFC 2/5] media: v4l2-ctrl: Document V4L2_CID_LOCATION

2019-08-15 Thread Sakari Ailus
On Thu, Aug 15, 2019 at 03:59:38PM +0300, Laurent Pinchart wrote: > Hi Sakari, > > On Thu, Aug 15, 2019 at 10:00:25AM +0300, Sakari Ailus wrote: > > On Wed, Aug 14, 2019 at 10:28:12PM +0200, Jacopo Mondi wrote: > > > Add documentation for the V4L2_CID_LOCATION camera control. The newly > > > added

Re: [RFC 2/5] media: v4l2-ctrl: Document V4L2_CID_LOCATION

2019-08-15 Thread Laurent Pinchart
Hi Sakari, On Thu, Aug 15, 2019 at 04:08:49PM +0300, Sakari Ailus wrote: > On Thu, Aug 15, 2019 at 03:59:38PM +0300, Laurent Pinchart wrote: > > On Thu, Aug 15, 2019 at 10:00:25AM +0300, Sakari Ailus wrote: > > > On Wed, Aug 14, 2019 at 10:28:12PM +0200, Jacopo Mondi wrote: > > > > Add documentati

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

2019-08-15 Thread Marco Felsch
Hi Laurent, On 19-08-15 15:48, Laurent Pinchart wrote: > Hi Marco, > > On Fri, Aug 09, 2019 at 02:16:06PM +0200, Marco Felsch wrote: > > On 19-05-16 19:51, Laurent Pinchart wrote: > > > On Tue, May 14, 2019 at 03:20:04PM -0300, Mauro Carvalho Chehab wrote: > > >> Em Mon, 6 May 2019 12:10:41 +0200

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

2019-08-15 Thread Marco Felsch
Hi Laurent, On 19-08-15 15:51, Laurent Pinchart wrote: > On Tue, Aug 13, 2019 at 10:54:29AM +0200, Marco Felsch wrote: > > Hi Laurent, > > > > On 19-05-16 21:03, Laurent Pinchart wrote: > > > Hello Marco, > > > > > > Thank you for the patch. > > > > > > On Tue, May 14, 2019 at 03:25:45PM -0300,

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

2019-08-15 Thread Marco Felsch
Hi Laurent, On 19-08-15 15:53, Laurent Pinchart wrote: > Hi Marco, > > On Tue, Aug 13, 2019 at 11:10:30AM +0200, Marco Felsch wrote: > > On 19-05-16 21:07, Laurent Pinchart wrote: > > > On Mon, Apr 15, 2019 at 02:44:12PM +0200, Marco Felsch wrote: > > > > The tvp5150 accepts NTSC(M,J,4.43), PAL (

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

2019-08-15 Thread Laurent Pinchart
H Marco, On Thu, Aug 15, 2019 at 03:22:51PM +0200, Marco Felsch wrote: > On 19-08-15 15:51, Laurent Pinchart wrote: > > On Tue, Aug 13, 2019 at 10:54:29AM +0200, Marco Felsch wrote: > >> On 19-05-16 21:03, Laurent Pinchart wrote: > >>> On Tue, May 14, 2019 at 03:25:45PM -0300, Mauro Carvalho Cheha

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

2019-08-15 Thread Marco Felsch
Hi Laurent, On 19-08-15 16:02, Laurent Pinchart wrote: > Hi Marco, > > On Thu, Aug 15, 2019 at 02:50:02PM +0200, Marco Felsch wrote: > > On 19-08-15 15:33, Laurent Pinchart wrote: > > > On Fri, Aug 09, 2019 at 07:58:09AM +0200, Marco Felsch wrote: > > >> On 19-05-16 19:27, Laurent Pinchart wrote:

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

2019-08-15 Thread Marco Felsch
Hi Laurent, On 19-08-15 16:10, Laurent Pinchart wrote: > Hi Marco, > > On Thu, Aug 15, 2019 at 03:04:37PM +0200, Marco Felsch wrote: > > On 19-08-15 15:38, Laurent Pinchart wrote: > > > On Fri, Aug 09, 2019 at 09:55:36AM +0200, Marco Felsch wrote: > > >> On 19-05-16 19:36, Laurent Pinchart wrote:

Re: [PATCHv2 02/12] videodev2.h: add V4L2_FMT_FLAG_DYN_RESOLUTION

2019-08-15 Thread Hans Verkuil
On 8/14/19 2:53 PM, Paul Kocialkowski wrote: > Hi, > > On Mon 12 Aug 19, 13:05, Hans Verkuil wrote: >> From: Maxime Jourdan >> >> Add an enum_fmt format flag to specifically tag coded formats where >> dynamic resolution switching is supported by the device. >> >> This is useful for some codec dri

Re: [PATCHv2 09/12] vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF

2019-08-15 Thread Alexandre Courbot
On Thu, Aug 15, 2019 at 8:53 PM Hans Verkuil wrote: > > On 8/15/19 10:12 AM, Alexandre Courbot wrote: > > On Mon, Aug 12, 2019 at 8:06 PM Hans Verkuil > > wrote: > >> > >> This RFC patch adds support for the V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF > >> flag. > >> It also adds a new V4L2_BUF_CAP_SUPP

[PATCHv3 06/12] media: vicodec: set flags for vdec/stateful OUTPUT coded formats

2019-08-15 Thread Hans Verkuil
From: Maxime Jourdan Tag all the coded formats where the vicodec stateful decoder supports dynamic resolution switching and bytestream parsing. Signed-off-by: Maxime Jourdan Reviewed-by: Paul Kocialkowski Signed-off-by: Hans Verkuil --- drivers/media/platform/vicodec/vicodec-core.c | 3 +++

[PATCHv3 05/12] media: mtk-vcodec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION

2019-08-15 Thread Hans Verkuil
From: Maxime Jourdan Tag all the coded formats where the mtk-vcodec decoder supports dynamic resolution switching. Signed-off-by: Maxime Jourdan Reviewed-by: Paul Kocialkowski Reviewed-by: Alexandre Courbot Signed-off-by: Hans Verkuil --- drivers/media/platform/mtk-vcodec/mtk_vcodec_dec.c |

[PATCHv3 09/12] vb2: add V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF

2019-08-15 Thread Hans Verkuil
This RFC patch adds support for the V4L2_BUF_FLAG_M2M_HOLD_CAPTURE_BUF flag. It also adds a new V4L2_BUF_CAP_SUPPORTS_M2M_HOLD_CAPTURE_BUF capability and a v4l2_m2m_release_capture_buf() helper function. Drivers should set vb2_queue->subsystem_flags to VB2_V4L2_FL_SUPPORTS_M2M_HOLD_CAPTURE_BUF to

[PATCHv3 08/12] pixfmt-compressed.rst: improve H264/HEVC/MPEG1+2/VP8+9 documentation

2019-08-15 Thread Hans Verkuil
The existing documentation was incorrect and did not correspond to how actual codec drivers implemented this. Update the documentation to explicitly specify what is actually expected. Signed-off-by: Hans Verkuil --- .../media/uapi/v4l/pixfmt-compressed.rst | 36 +++ 1 file

[PATCHv3 01/12] videodev2.h: add V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM

2019-08-15 Thread Hans Verkuil
Add an enum_fmt format flag to specifically tag coded formats where full bytestream parsing is supported by the device. Some stateful decoders are capable of fully parsing a bytestream, but others require that userspace pre-parses the bytestream into frames or fields (see the corresponding pixelfo

[PATCHv3 10/12] videodev2.h: add V4L2_DEC_CMD_FLUSH

2019-08-15 Thread Hans Verkuil
Add this new V4L2_DEC_CMD_FLUSH decoder command and document it. Signed-off-by: Hans Verkuil --- Documentation/media/uapi/v4l/vidioc-decoder-cmd.rst | 11 ++- Documentation/media/videodev2.h.rst.exceptions | 1 + include/uapi/linux/videodev2.h | 1 + 3 files c

[PATCHv3 03/12] media: venus: vdec: flag OUTPUT formats with V4L2_FMT_FLAG_DYN_RESOLUTION

2019-08-15 Thread Hans Verkuil
From: Maxime Jourdan Tag all the coded formats where the venus vdec supports dynamic resolution switching. Signed-off-by: Maxime Jourdan Acked-by: Stanimir Varbanov Reviewed-by: Paul Kocialkowski Signed-off-by: Hans Verkuil --- drivers/media/platform/qcom/venus/core.h | 1 + drivers/media/

[PATCHv3 02/12] videodev2.h: add V4L2_FMT_FLAG_DYN_RESOLUTION

2019-08-15 Thread Hans Verkuil
From: Maxime Jourdan Add an enum_fmt format flag to specifically tag coded formats where dynamic resolution switching is supported by the device. This is useful for some codec drivers that can support dynamic resolution switching for one or more of their listed coded formats. It allows userspace

[PATCHv3 04/12] media: s5p_mfc_dec: set flags for OUTPUT coded formats

2019-08-15 Thread Hans Verkuil
From: Maxime Jourdan Tag all the coded formats where the s5p_mfc decoder supports dynamic resolution switching or has a bytestream parser. Signed-off-by: Maxime Jourdan Reviewed-by: Paul Kocialkowski Signed-off-by: Hans Verkuil --- .../media/platform/s5p-mfc/s5p_mfc_common.h| 1 + drive

[PATCHv3 07/12] media: docs-rst: Document memory-to-memory video decoder interface

2019-08-15 Thread Hans Verkuil
From: Tomasz Figa Due to complexity of the video decoding process, the V4L2 drivers of stateful decoder hardware require specific sequences of V4L2 API calls to be followed. These include capability enumeration, initialization, decoding, seek, pause, dynamic resolution change, drain and end of st

[PATCHv3 12/12] media: docs-rst: Document memory-to-memory video encoder interface

2019-08-15 Thread Hans Verkuil
From: Tomasz Figa Due to complexity of the video encoding process, the V4L2 drivers of stateful encoder hardware require specific sequences of V4L2 API calls to be followed. These include capability enumeration, initialization, encoding, encode parameters change, drain and reset. Specifics of th

[PATCHv3 11/12] media: docs-rst: Document m2m stateless video decoder interface

2019-08-15 Thread Hans Verkuil
From: Alexandre Courbot Documents the protocol that user-space should follow when communicating with stateless video decoders. The stateless video decoding API makes use of the new request and tags APIs. While it has been implemented with the Cedrus driver so far, it should probably still be con

[PATCHv3 00/12] Stateful/stateless codec core support

2019-08-15 Thread Hans Verkuil
This series consolidates various patches/patch series that add features or document memory-to-memory video codec interfaces. This includes patches adding V4L2_FMT_FLAG_DYN_RESOLUTION, new code adding V4L2_FMT_FLAG_CONTINUOUS_BYTESTREAM, new code adding V4L2_DEC_CMD_FLUSH, patches adding V4L2_BUF_F

[PATCH 0/2] media: dvb-usb: move T230 to dvbsky

2019-08-15 Thread Jan Pieter van Woerkom
media: dvb-usb: move t230 driver from cxusb to dvbsky This solves (amongst others) the 'T230 dvb-t2 data corruption since commit 5fa8815' problem. The 'remove from cxusb' patch has 2 versions: the a version applies to linux-5.2 and earlier, the b version applies to linux 5.3-rc4 (and possibly oth

Re: [PATCH 1/2] media: dvb-usb: move T230 to dvbsky

2019-08-15 Thread Jan Pieter van Woerkom
add t230 to dvbsky Signed-off-by: Jan Pieter van Woerkom Tested-by: James Hutchinson --- diff -ru a/drivers/media/usb/dvb-usb-v2/dvbsky.c b/drivers/media/usb/dvb-usb-v2/dvbsky.c --- a/drivers/media/usb/dvb-usb-v2/dvbsky.c 2019-07-08 00:41:56.0 +0200 +++ b/drivers/media/usb/dvb-usb-

Re: [PATCH 2a/2] media: dvb-usb: move T230 to dvbsky

2019-08-15 Thread Jan Pieter van Woerkom
remove t230 from cxusb (for linux <= 5.2) Signed-off-by: Jan Pieter van Woerkom Tested-by: James Hutchinson --- diff -ru a/drivers/media/usb/dvb-usb/cxusb.c b/drivers/media/usb/dvb-usb/cxusb.c --- a/drivers/media/usb/dvb-usb/cxusb.c 2019-07-08 00:41:56.0 +0200 +++ b/drivers/media/usb/dvb

[PATCH v1] [media] mceusb: fix (eliminate) TX IR signal length limit

2019-08-15 Thread A Sun
Fix and eliminate mceusb's IR length limit for IR signals transmitted to the MCE IR blaster ports. An IR signal TX exceeding 306 pulse/space samples presently causes -EINVAL return error. There's no such limitation nor error with the MCE device hardware. And valid IR signals exist with more than

Re: [PATCH 2b/2] media: dvb-usb: move T230 to dvbsky

2019-08-15 Thread Jan Pieter van Woerkom
remove t230 from cxusb (for linux >= 5.3) Signed-off-by: Jan Pieter van Woerkom --- diff -ru a/drivers/media/usb/dvb-usb/cxusb.c b/drivers/media/usb/dvb-usb/cxusb.c --- a/drivers/media/usb/dvb-usb/cxusb.c 2019-08-11 22:26:41.0 +0200 +++ b/drivers/media/usb/dvb-usb/cxusb.c 2019-08-13 03:13

[PATCH v2 1/6] media: v4l2-core: Module re-organization

2019-08-15 Thread Ezequiel Garcia
videodev.ko and v4l2-common.ko driver are built under the same conditions. Therefore, it doesn't make much sense to split them in two different modules. Splitting v4l2-common to its own driver was done many years ago: commit a9254475bbfbed5f0596d952c6a3c9806e19dd0b Author: Mauro Carvalho Cheh

[PATCH v2 2/6] media: v4l2-core: move spi helpers out of v4l2-common.c

2019-08-15 Thread Ezequiel Garcia
Separate the spi helpers to v4l2-spi.c, in order to get rid of the ifdefery. No functional changes intended, this is just a cosmetic change to organize the code better. Signed-off-by: Ezequiel Garcia --- Changes v2: * None. --- drivers/media/v4l2-core/Makefile | 1 + drivers/media/v4l2-cor

[PATCH v2 6/6] media: v4l2-core: Remove BUG() from i2c and spi helpers

2019-08-15 Thread Ezequiel Garcia
Currently, the i2c and spi subdev creation helpers are calling BUG() when passed a NULL v4l2_device parameter. This makes little sense; simply returning NULL seems more sensible. These two helpers may already return NULL on error, so callers should already be checking for this, or at least be pre

[PATCH v2 0/6] V4L2 core I2C/SPI code cleanup

2019-08-15 Thread Ezequiel Garcia
Hi Mauro, Hans: A new spin of this cleanup series. Goal here is to remove some ifdefs and while at it remove some low hanging fruit. Patch 1 merges v4l2-common.ko into videodev.ko, since it doesn't seem to be useful to have them splitted. Patches 2 to 5 move the I2C and SPI helpers, so they can

[PATCH v2 4/6] media: v4l2-core: introduce a helper to unregister a spi subdev

2019-08-15 Thread Ezequiel Garcia
Introduce a new video4linux2 spi helper, to unregister a subdev. This allows to get rid of some more ifdefs. Signed-off-by: Ezequiel Garcia --- Changes v2: * None. --- drivers/media/v4l2-core/v4l2-device.c | 14 ++ drivers/media/v4l2-core/v4l2-spi.c| 8 include/media/v4

[PATCH v2 5/6] media: v4l2-core: introduce a helper to unregister a i2c subdev

2019-08-15 Thread Ezequiel Garcia
Introduce a new video4linux2 i2c helper, to unregister a subdev. This allows to get rid of yet another ifdef. Signed-off-by: Ezequiel Garcia --- Changes v2: * None. --- drivers/media/v4l2-core/v4l2-device.c | 25 ++--- drivers/media/v4l2-core/v4l2-i2c.c| 20 ++

[PATCH v2 3/6] media: v4l2-core: move i2c helpers out of v4l2-common.c

2019-08-15 Thread Ezequiel Garcia
Separate the i2c helpers to v4l2-i2c.c, in order to get rid of the ifdefery. No functional changes intended, this is just a cosmetic change to organize the code better. Given I2C is a tristate symbol, a hidden boolean symbol is introduced, to make the conditional build easier. Signed-off-by: Ezeq

[PATCH] cx231xx-video: fix WARN about mismatched capabilities

2019-08-15 Thread Brad Love
Since 049e684f2d ("media: v4l2-dev: fix WARN_ON(!vdev->device_caps)"), if device_caps != capabilities a WARNING is dumped: [6.887391] [ cut here ] [6.887422] WARNING: CPU: 0 PID: 988 at drivers/media/v4l2-core/v4l2-ioctl.c:1071 v4l_querycap+0xca/0xe0 [videodev] [

Re: [PATCH v3] media: imx: mipi csi-2: Don't fail if initial state times-out

2019-08-15 Thread Steve Longerbeam
On 8/14/19 12:16 AM, Sakari Ailus wrote: Hi Steve, On Tue, Aug 13, 2019 at 04:27:06PM -0700, Steve Longerbeam wrote: Hi Sakari, On 8/13/19 1:28 AM, Sakari Ailus wrote: Hi Steve, On Thu, Aug 08, 2019 at 11:02:29AM -0700, Steve Longerbeam wrote: On 8/8/19 1:53 AM, Philipp Zabel wrote: Hi

Re: [PATCH] dvb-usb-v2/gl861: fix wrong memcpy

2019-08-15 Thread Akihiro TSUKADA
> Does anyone have this hardware? This device must have been dead for about > a year, ever since commit b30cc07de8a9 was merged. I have one. (and I wrote the patch). Since I do not use it regularly and my app did not use the return value meaningfully, I have not noticed. regards, Akihiro

Re: [PATCH] dvb-usb-v2/gl861: fix wrong memcpy

2019-08-15 Thread Mauro Carvalho Chehab
Akihiro-san, Em Fri, 16 Aug 2019 10:04:59 +0900 Akihiro TSUKADA escreveu: > > Does anyone have this hardware? This device must have been dead for about > > a year, ever since commit b30cc07de8a9 was merged. > > I have one. (and I wrote the patch). > Since I do not use it regularly and > my ap

[PATCH] media: staging: imgu: make imgu work on low frequency for low input

2019-08-15 Thread bingbu . cao
From: Bingbu Cao Currently, imgu is working on 450MHz for all cases, however in some cases (input frame less than 2.3MP), the imgu did not need work in high frequency. This patch make imgu work on 200MHz if the imgu input frame is less than 2.3MP to save power. Signed-off-by: Bingbu Cao --- dr

[PATCH] media: mc-device.c: fix memleak in media_device_register_entity

2019-08-15 Thread zhengbin
In media_device_register_entity, if media_graph_walk_init fails, need to free the previously memory. Reported-by: Hulk Robot Signed-off-by: zhengbin --- drivers/media/mc/mc-device.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/mc/mc-device.c b/drivers/media/mc/mc-device.c i

cron job: media_tree daily build: ERRORS

2019-08-15 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 Aug 16 05:00:11 CEST 2019 media-tree git hash:31d5d15dfc3418a57cfab419a353d8dc5f5698b5 media_build gi

[PATCH] media: rockchip/rga: Update maintainership

2019-08-15 Thread Ezequiel Garcia
Update Jacob's address and add myself as co-maintainer. Signed-off-by: Ezequiel Garcia --- Note that I have a few minor changes in mind for this driver, but frst, I'll need to fix whatever is wrong with gstreamer not probing it anymore. MAINTAINERS | 3 ++- 1 file changed, 2 insertions(+), 1 de

Re: [PATCH] gspca: zero usb_buf on error

2019-08-15 Thread kbuild test robot
Hi Hans, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [cannot apply to v5.3-rc4 next-20190814] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commi

Re: [PATCH] gspca: zero usb_buf on error

2019-08-15 Thread kbuild test robot
Hi Hans, I love your patch! Perhaps something to improve: [auto build test WARNING on linuxtv-media/master] [cannot apply to v5.3-rc4 next-20190814] [if your patch is applied to the wrong git tree, please drop us a note to help improve the system] url: https://github.com/0day-ci/linux/commi

Re: [PATCHv2 11/12] media: docs-rst: Document m2m stateless video decoder interface

2019-08-15 Thread Alexandre Courbot
On Mon, Aug 12, 2019 at 8:07 PM Hans Verkuil wrote: > > From: Alexandre Courbot > > Documents the protocol that user-space should follow when > communicating with stateless video decoders. > > The stateless video decoding API makes use of the new request and tags > APIs. While it has been impleme

Re: [ANN] Media summit in Lisbon at September

2019-08-15 Thread Alexandre Courbot
On Wed, Aug 14, 2019 at 6:40 PM Laurent Pinchart wrote: > > On Wed, Aug 14, 2019 at 05:35:48PM +0900, Alexandre Courbot wrote: > > That could be nice. Of course something more informal is also fine. > > Anyone else planning to attend? I suspect Laurent and people living in > > France might be ther

Re: [PATCH] media: staging: imgu: make imgu work on low frequency for low input

2019-08-15 Thread Tomasz Figa
Hi Bingbu, On Fri, Aug 16, 2019 at 12:25 PM wrote: > > From: Bingbu Cao > > Currently, imgu is working on 450MHz for all cases, however > in some cases (input frame less than 2.3MP), the imgu > did not need work in high frequency. > This patch make imgu work on 200MHz if the imgu input > frame i

Re: [PATCH] cx231xx-video: fix WARN about mismatched capabilities

2019-08-15 Thread Hans Verkuil
On 8/15/19 9:53 PM, Brad Love wrote: > Since 049e684f2d ("media: v4l2-dev: fix WARN_ON(!vdev->device_caps)"), > if device_caps != capabilities a WARNING is dumped: That's not what it tests! The full check is: /* * Check that capabilities is a superset of * vfd->device_c

[PATCHv2] gspca: zero usb_buf on error

2019-08-15 Thread Hans Verkuil
If reg_r() fails, then gspca_dev->usb_buf was left uninitialized, and some drivers used the contents of that buffer in logic. This caused several syzbot errors: https://syzkaller.appspot.com/bug?extid=397fd082ce5143e2f67d https://syzkaller.appspot.com/bug?extid=1a35278dd0ebfb3a038a https://syzkal

Re: [PATCH] media: staging: imgu: make imgu work on low frequency for low input

2019-08-15 Thread Bingbu Cao
Hi, Tomasz Thanks for your review. On 8/16/19 2:10 PM, Tomasz Figa wrote: > Hi Bingbu, > > On Fri, Aug 16, 2019 at 12:25 PM wrote: >> >> From: Bingbu Cao >> >> Currently, imgu is working on 450MHz for all cases, however >> in some cases (input frame less than 2.3MP), the imgu >> did not need w

Re: [PATCHv2 11/12] media: docs-rst: Document m2m stateless video decoder interface

2019-08-15 Thread Hans Verkuil
On 8/16/19 7:49 AM, Alexandre Courbot wrote: > On Mon, Aug 12, 2019 at 8:07 PM Hans Verkuil wrote: >> >> From: Alexandre Courbot >> >> Documents the protocol that user-space should follow when >> communicating with stateless video decoders. >> >> The stateless video decoding API makes use of the