Re: [PATCH v3] media: docs-rst: Document m2m stateless video decoder interface

2019-02-25 Thread Alexandre Courbot
Hi, sorry for the delayed reply! On Wed, Feb 13, 2019 at 8:04 PM Paul Kocialkowski wrote: > > Hi, > > On Wed, 2019-02-13 at 10:57 +0100, Hans Verkuil wrote: > > On 2/13/19 10:20 AM, Paul Kocialkowski wrote: > > > Hi, > > > > > > On Wed, 2019-02-13 at 09:59 +0100, Hans Verkuil wrote: > > > > On 2/

[PATCH v4 20/21] media: vicodec: Register another node for stateless decoder

2019-02-25 Thread Dafna Hirschfeld
Add stateless decoder instance field to the dev struct and register another node for the statelsess decoder. The stateless API for the node will be implemented in further patches. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 46 +-- 1 file c

[PATCH v4 16/21] media: vicodec: add documentation to V4L2_CID_FWHT_I/P_FRAME_QP

2019-02-25 Thread Dafna Hirschfeld
add documentation to V4L2_CID_FWHT_I/P_FRAME_QP controls in ext-ctrls-codec.rst Signed-off-by: Dafna Hirschfeld --- Documentation/media/uapi/v4l/ext-ctrls-codec.rst | 12 1 file changed, 12 insertions(+) diff --git a/Documentation/media/uapi/v4l/ext-ctrls-codec.rst b/Documentation

[PATCH v4 21/21] media: vicodec: Add support for stateless decoder.

2019-02-25 Thread Dafna Hirschfeld
Implement a stateless decoder for the new node. Signed-off-by: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + drivers/media/platform/vicodec/vicodec-core.c | 285 -- 2 files changed, 262 insertions(+), 24 deletions(-) diff --git a/drivers/media/platf

[PATCH v4 17/21] media: vicodec: add documentation to V4L2_CID_MPEG_VIDEO_FWHT_PARAMS

2019-02-25 Thread Dafna Hirschfeld
add documentation to V4L2_CID_MPEG_VIDEO_FWHT_PARAMS control and it's related 'v4l2_ctrl_fwht_params' struct Signed-off-by: Dafna Hirschfeld --- .../media/uapi/v4l/ext-ctrls-codec.rst| 54 +++ 1 file changed, 54 insertions(+) diff --git a/Documentation/media/uapi/v4l/ext

[PATCH v4 18/21] media: vicodec: add documentation to V4L2_PIX_FMT_FWHT_STATELESS

2019-02-25 Thread Dafna Hirschfeld
add documentation to V4L2_PIX_FMT_FWHT_STATELESS in pixfmt-compressed.rst Signed-off-by: Dafna Hirschfeld --- Documentation/media/uapi/v4l/pixfmt-compressed.rst | 5 + 1 file changed, 5 insertions(+) diff --git a/Documentation/media/uapi/v4l/pixfmt-compressed.rst b/Documentation/media/uapi

[PATCH v4 19/21] media: vicodec: Introducing stateless fwht defs and structs

2019-02-25 Thread Dafna Hirschfeld
Add structs and definitions needed to implement stateless decoder for fwht. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 23 - drivers/media/v4l2-core/v4l2-ctrls.c | 10 ++ include/media/fwht-ctrls.h| 32

[PATCH v4 15/21] media: vicodec: add struct for encoder/decoder instance

2019-02-25 Thread Dafna Hirschfeld
Add struct 'vicodec_dev_instance' for the fields in vicodec_dev that have have both decoder and encoder versions. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 194 +- 1 file changed, 92 insertions(+), 102 deletions(-) diff --git a/drivers/m

[PATCH v4 10/21] media: vicodec: Move raw frame preparation code to a function

2019-02-25 Thread Dafna Hirschfeld
Introduce 'prepare_raw_frame' function that fills the values of a raw frame struct according to the format. Signed-off-by: Dafna Hirschfeld --- .../media/platform/vicodec/codec-v4l2-fwht.c | 143 ++ 1 file changed, 78 insertions(+), 65 deletions(-) diff --git a/drivers/media/pl

[PATCH v4 12/21] media: vicodec: keep the ref frame according to the format in decoder

2019-02-25 Thread Dafna Hirschfeld
In the decoder, save the inner reference frame in the same format as the capture buffer. The decoder writes directly to the capture buffer and then the capture buffer is copied to the reference buffer. This will simplify the stateless decoder. Signed-off-by: Dafna Hirschfeld --- drivers/media/pl

[PATCH v4 13/21] media: vicodec: Validate version dependent header values in a separate function

2019-02-25 Thread Dafna Hirschfeld
Move the code that validates version dependent header values to a separate function 'validate_by_version' Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 31 --- 1 file changed, 19 insertions(+), 12 deletions(-) diff --git a/drivers/media/plat

[PATCH v4 11/21] media: vicodec: add field 'buf' to fwht_raw_frame

2019-02-25 Thread Dafna Hirschfeld
Add the field 'buf' to fwht_raw_frame to indicate the start of the raw frame buffer. This field will be used to copy the capture buffer to the reference buffer in the next patch. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/codec-fwht.h | 1 + drivers/media/platform/vicod

[PATCH v4 14/21] media: vicodec: rename v4l2_fwht_default_fmt to v4l2_fwht_find_nth_fmt

2019-02-25 Thread Dafna Hirschfeld
Rename 'v4l2_fwht_default_fmt' to 'v4l2_fwht_find_nth_fmt' and add a function 'v4l2_fwht_validate_fmt' to check if a format info matches the parameters. This function will also be used to validate the stateless params when adding support for stateless codecs. Signed-off-by: Dafna Hirschfeld ---

[PATCH v4 04/21] media: vicodec: selection api should only check single buffer types

2019-02-25 Thread Dafna Hirschfeld
The selection api should check only single buffer types because multiplanar types are converted to single in drivers/media/v4l2-core/v4l2-ioctl.c Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 20 +++ 1 file changed, 3 insertions(+), 17 deleti

[PATCH v4 03/21] cedrus: set requires_requests

2019-02-25 Thread Dafna Hirschfeld
From: Hans Verkuil The cedrus stateless decoder requires the use of request, so indicate this by setting requires_requests to 1. Signed-off-by: Hans Verkuil --- drivers/staging/media/sunxi/cedrus/cedrus_video.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/staging/media/sunxi/ced

[PATCH v4 00/21] add support to stateless decoder

2019-02-25 Thread Dafna Hirschfeld
main changes from v2: - fixes according to the review. - patch 5: new bugfix - patches 16, 17, 18: new documentation Dafna Hirschfeld (18): media: vicodec: selection api should only check single buffer types media: vicodec: upon release, call m2m release before freeing ctrl handler media

[PATCH v4 01/21] vb2: add requires_requests bit for stateless codecs

2019-02-25 Thread Dafna Hirschfeld
From: Hans Verkuil Stateless codecs require the use of the Request API as opposed of it being optional. So add a bit to indicate this and let vb2 check for this. Signed-off-by: Hans Verkuil --- drivers/media/common/videobuf2/videobuf2-core.c | 5 - drivers/media/common/videobuf2/videobuf2

[PATCH v4 07/21] media: vicodec: change variable name for the return value of v4l2_fwht_encode

2019-02-25 Thread Dafna Hirschfeld
v4l2_fwht_encode returns either an error code on failure or the size of the compressed frame on success. So change the var assigned to it from 'ret' to 'comp_sz_or_errcode' to clarify that. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 9 + 1 file ch

[PATCH v4 06/21] media: v4l2-ctrl: v4l2_ctrl_request_setup returns with error upon failure

2019-02-25 Thread Dafna Hirschfeld
If one of the controls fails to set, then 'v4l2_ctrl_request_setup' immediately returns with the error code. Signed-off-by: Dafna Hirschfeld --- drivers/media/v4l2-core/v4l2-ctrls.c | 18 +++--- include/media/v4l2-ctrls.h | 2 +- 2 files changed, 12 insertions(+), 8 deleti

[PATCH v4 08/21] media: vicodec: bugfix - call v4l2_m2m_buf_copy_metadata also if decoding fails

2019-02-25 Thread Dafna Hirschfeld
The function 'v4l2_m2m_buf_copy_metadata' should be called even if decoding/encoding ends with status VB2_BUF_STATE_ERROR, so that the metadata is copied from the source buffer to the dest buffer. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 17 +---

[PATCH v4 09/21] media: vicodec: bugfix: free compressed_frame upon device release

2019-02-25 Thread Dafna Hirschfeld
Free compressed_frame buffer upon device release. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 1 + 1 file changed, 1 insertion(+) diff --git a/drivers/media/platform/vicodec/vicodec-core.c b/drivers/media/platform/vicodec/vicodec-core.c index 8205a602bb3

[PATCH v4 02/21] videodev2.h: add V4L2_BUF_CAP_REQUIRES_REQUESTS

2019-02-25 Thread Dafna Hirschfeld
From: Hans Verkuil Add capability to indicate that requests are required instead of merely supported. Signed-off-by: Hans Verkuil --- Documentation/media/uapi/v4l/vidioc-reqbufs.rst | 4 include/uapi/linux/videodev2.h | 1 + 2 files changed, 5 insertions(+) diff --git a/

[PATCH v4 05/21] media: vicodec: upon release, call m2m release before freeing ctrl handler

2019-02-25 Thread Dafna Hirschfeld
'v4l2_m2m_ctx_release' calls request complete so it should be called before 'v4l2_ctrl_handler_free'. Signed-off-by: Dafna Hirschfeld --- drivers/media/platform/vicodec/vicodec-core.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/vicodec/vicodec

Re: [PATCH 4/4] media: v4l: ctrls: Add debug messages

2019-02-25 Thread Ezequiel Garcia
On Mon, 2019-02-18 at 17:15 -0300, Ezequiel Garcia wrote: > Currently, the v4l2 control code is a bit silent on errors. > To ease debugging of the control logic, add debug messages > on (hopefully) most of the error paths. > I'm thinking some of these could receive a struct video_device, and so u

[PATCH] Remove deductively redundant NULL pointer checks

2019-02-25 Thread Shaobo He
The fixes included in this commit essentially removes NULL pointer checks on the return values of function `get_queue_ctx` as well as `v4l2_m2m_get_vq` defined in file v4l2-mem2mem.c. Function `get_queue_ctx` is very unlikely to return a NULL pointer because its return value is an address composed

Re: [PATCH 1/5] dt-bindings: connector: analog: add tv norms property

2019-02-25 Thread Rob Herring
On Sat, 2 Feb 2019 13:10:00 +0100, Marco Felsch wrote: > 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 o

[PATCH v2] au0828: minor fix to a misleading comment in _close()

2019-02-25 Thread Shuah Khan
Fix a misleading comment in _close() and a spelling error. Reviewed-by: Niklas Söderlund Signed-off-by: Shuah Khan --- drivers/media/usb/au0828/au0828-video.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/usb/au0828/au0828-video.c b/drivers/media/usb/au0

Re: [PATCH 1/6] dt-bindings: media: cedrus: Add H6 compatible

2019-02-25 Thread Rob Herring
On Mon, 28 Jan 2019 21:54:59 +0100, Jernej Skrabec wrote: > This adds a compatible for H6. H6 VPU supports 10-bit HEVC decoding and > additional AFBC output format for HEVC. > > Signed-off-by: Jernej Skrabec > --- > Documentation/devicetree/bindings/media/cedrus.txt | 1 + > 1 file changed, 1 in

Re: [PATCH v4 05/12] media: ov5640: Compute the clock rate at runtime

2019-02-25 Thread Maxime Ripard
On Mon, Feb 25, 2019 at 10:21:51AM +0100, Jacopo Mondi wrote: > Hello Maxime, Benoit, > sorry for chiming in, but I'm a bit confused... > > On Fri, Feb 22, 2019 at 04:04:21PM +0100, Maxime Ripard wrote: > > On Fri, Feb 22, 2019 at 08:54:56AM -0600, Benoit Parrot wrote: > > > Maxime Ripard wrote

Re: [PATCH] au0828: minor fix to a misleading comment in _close()

2019-02-25 Thread shuah
On 2/22/19 6:44 PM, Niklas Söderlund wrote: Hi Shuah, Thanks for your patch. On 2019-02-22 10:45:59 -0700, Shuah Khan wrote: Fix misleading comment in _close() Signed-off-by: Shuah Khan --- drivers/media/usb/au0828/au0828-video.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff

Re: [PATCH v4 05/12] media: ov5640: Compute the clock rate at runtime

2019-02-25 Thread Jacopo Mondi
Sorry again, On Mon, Feb 25, 2019 at 10:21:51AM +0100, Jacopo Mondi wrote: > Hello Maxime, Benoit, > sorry for chiming in, but I'm a bit confused... > > On Fri, Feb 22, 2019 at 04:04:21PM +0100, Maxime Ripard wrote: > > On Fri, Feb 22, 2019 at 08:54:56AM -0600, Benoit Parrot wrote: > > > Maxime

Re: [PATCH 5/7] vim2m: replace devm_kzalloc by kzalloc

2019-02-25 Thread Hans Verkuil
On 2/22/19 12:20 PM, Laurent Pinchart wrote: > Hi Hans, > > Thank you for the patch. > > On Thu, Feb 21, 2019 at 03:21:46PM +0100, Hans Verkuil wrote: >> It is not possible to use devm_kzalloc since that memory is >> freed immediately when the device instance is unbound. >> >> Various objects lik

Re: [PATCH 4/7] media-entity: set ent_enum->bmap to NULL after freeing it

2019-02-25 Thread Hans Verkuil
On 2/22/19 12:17 PM, Laurent Pinchart wrote: > Hi Hans, > > Thank you for the patch. > > On Thu, Feb 21, 2019 at 03:21:45PM +0100, Hans Verkuil wrote: >> Ensure that this pointer is set to NULL after it is freed. >> The vimc driver has a static media_entity and after >> unbinding and rebinding th

Re: [PATCH v3 3/3] [media] allegro: add SPS/PPS nal unit writer

2019-02-25 Thread Hans Verkuil
On 2/13/19 6:51 PM, Michael Tretter wrote: > The allegro hardware encoder does not write SPS/PPS nal units into the > encoded video stream. Therefore, we need to write the units in software. > > The implementation follows Rec. ITU-T H.264 (04/2017) to allow to > convert between a C struct and the

Re: [PATCH v3 2/3] [media] allegro: add Allegro DVT video IP core driver

2019-02-25 Thread Hans Verkuil
On 2/13/19 6:51 PM, Michael Tretter wrote: > Add a V4L2 mem-to-mem driver for Allegro DVT video IP cores as found in > the EV family of the Xilinx ZynqMP SoC. The Zynq UltraScale+ Device > Technical Reference Manual uses the term VCU (Video Codec Unit) for the > encoder, decoder and system integrat

Re: [v4l-utils PATCH v3 5/8] (c)v4l-helpers.h: Add support for the request api

2019-02-25 Thread Hans Verkuil
On 2/24/19 9:41 AM, Dafna Hirschfeld wrote: > Add an array of request file descriptors to v4l_queue > and add methods to allocate and get them. > > Signed-off-by: Dafna Hirschfeld This patch isn't right, just drop it altogether. These helpers are for v4l2 devices, not for a media device. Just

Re: [PATCH v3 17/18] media: vicodec: Add support for stateless decoder.

2019-02-25 Thread Hans Verkuil
On 2/24/19 10:02 AM, Dafna Hirschfeld wrote: > Implement a stateless decoder for the new node. > > Signed-off-by: Dafna Hirschfeld > --- > .../media/platform/vicodec/codec-v4l2-fwht.h | 1 + > drivers/media/platform/vicodec/vicodec-core.c | 286 -- > 2 files changed, 263 inser

Re: [PATCH v3 15/18] media: vicodec: Introducing stateless fwht defs and structs

2019-02-25 Thread Hans Verkuil
On 2/24/19 10:02 AM, Dafna Hirschfeld wrote: > Add structs and definitions needed to implement stateless > decoder for fwht. > > Signed-off-by: Dafna Hirschfeld > --- > drivers/media/platform/vicodec/vicodec-core.c | 15 +--- > drivers/media/v4l2-core/v4l2-ctrls.c | 10 ++ > inc

Re: [PATCH v4 05/12] media: ov5640: Compute the clock rate at runtime

2019-02-25 Thread Jacopo Mondi
Hello Maxime, Benoit, sorry for chiming in, but I'm a bit confused... On Fri, Feb 22, 2019 at 04:04:21PM +0100, Maxime Ripard wrote: > On Fri, Feb 22, 2019 at 08:54:56AM -0600, Benoit Parrot wrote: > > Maxime Ripard wrote on Fri [2019-Feb-22 > > 15:39:59 +0100]: > > > On Thu, Feb 21, 2019 at 1

Re: [PATCH v3 04/18] media: vicodec: selection api should only check signal buffer types

2019-02-25 Thread Hans Verkuil
On 2/24/19 10:02 AM, Dafna Hirschfeld wrote: > The selection api should check only signal buffer types > because multiplanar types are converted to > signal in drivers/media/v4l2-core/v4l2-ioctl.c signal -> single (also in the subject of this patch) Regards, Hans > > Signed-off-by: Daf