Re: [RESEND PATCH v2 2/4] media: dt-bindings: rockchip: Document RK3399 Video Decoder bindings

2019-10-11 Thread Boris Brezillon
On Fri, 11 Oct 2019 07:50:16 -0500 Rob Herring wrote: > On Fri, Oct 11, 2019 at 4:33 AM Boris Brezillon > wrote: > > > > Document the Rockchip RK3399 Video Decoder bindings. > > You need some more headers for the example (or drop defines): > > Error: >

Re: [RESEND PATCH v2 3/4] media: rockchip: Add the rkvdec driver

2019-10-11 Thread Boris Brezillon
Hi Hans, On Fri, 11 Oct 2019 12:06:35 +0200 Hans Verkuil wrote: > > diff --git a/drivers/staging/media/rockchip/Kconfig > > b/drivers/staging/media/rockchip/Kconfig > > new file mode 100644 > > index ..8c617ae2c84f > > --- /dev/null > > +++ b/drivers/staging/media/rockchip/Kconfig >

Re: [RESEND PATCH v2 0/4] media: rockchip: Add the rkvdec driver

2019-10-11 Thread Boris Brezillon
On Fri, 11 Oct 2019 11:43:20 +0200 Hans Verkuil wrote: > On 10/11/19 11:33 AM, Boris Brezillon wrote: > > Hello, > > > > Sorry for the noise, I forgot to Cc the DT maintainers/ML on my last > > attempt. > > > > This is v2 of the rkvdec driver which was

[RESEND PATCH v2 3/4] media: rockchip: Add the rkvdec driver

2019-10-11 Thread Boris Brezillon
The rockchip vdec block is a stateless decoder that's able to decode H264, HEVC and VP9 content. This patch only adds H264 support and is making use of the m2m codec helpers. Signed-off-by: Boris Brezillon --- drivers/staging/media/Kconfig |2 + drivers/staging/

[RESEND PATCH v2 0/4] media: rockchip: Add the rkvdec driver

2019-10-11 Thread Boris Brezillon
feeback. Regards, Boris [1]https://patchwork.kernel.org/cover/11125207/ [2]https://lkml.org/lkml/2019/9/3/1033 Boris Brezillon (4): media: vb2: Add a helper to get the vb2 buffer attached to a request media: dt-bindings: rockchip: Document RK3399 Video Decoder bindings media: rockch

[RESEND PATCH v2 4/4] arm64: dts: rockchip: rk3399: Define the rockchip Video Decoder node

2019-10-11 Thread Boris Brezillon
RK3399 has a Video decoder, define the node in the dtsi. We also add the missing power-domain in mmu node and enable the block. Signed-off-by: Boris Brezillon --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch

[RESEND PATCH v2 1/4] media: vb2: Add a helper to get the vb2 buffer attached to a request

2019-10-11 Thread Boris Brezillon
vb2_request_get_buf() returns the N-th buffer attached to a media request. Signed-off-by: Boris Brezillon --- Changes in v2: * Adjust the kernel doc as suggested by Hans --- .../media/common/videobuf2/videobuf2-core.c | 23 +++ include/media/videobuf2-core.h

[RESEND PATCH v2 2/4] media: dt-bindings: rockchip: Document RK3399 Video Decoder bindings

2019-10-11 Thread Boris Brezillon
Document the Rockchip RK3399 Video Decoder bindings. Signed-off-by: Boris Brezillon --- .../bindings/media/rockchip,vdec.yaml | 71 +++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rockchip,vdec.yaml diff --git a

[PATCH v2 4/4] arm64: dts: rockchip: rk3399: Define the rockchip Video Decoder node

2019-10-11 Thread Boris Brezillon
RK3399 has a Video decoder, define the node in the dtsi. We also add the missing power-domain in mmu node and enable the block. Signed-off-by: Boris Brezillon --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch

[PATCH v2 3/4] media: rockchip: Add the rkvdec driver

2019-10-11 Thread Boris Brezillon
The rockchip vdec block is a stateless decoder that's able to decode H264, HEVC and VP9 content. This patch only adds H264 support and is making use of the m2m codec helpers. Signed-off-by: Boris Brezillon --- drivers/staging/media/Kconfig |2 + drivers/staging/

[PATCH v2 2/4] media: dt-bindings: rockchip: Document RK3399 Video Decoder bindings

2019-10-11 Thread Boris Brezillon
Document the Rockchip RK3399 Video Decoder bindings. Signed-off-by: Boris Brezillon --- .../bindings/media/rockchip,vdec.yaml | 71 +++ 1 file changed, 71 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rockchip,vdec.yaml diff --git a

[PATCH v2 0/4] media: rockchip: Add the rkvdec driver

2019-10-11 Thread Boris Brezillon
ttps://lkml.org/lkml/2019/9/3/1033 Boris Brezillon (4): media: vb2: Add a helper to get the vb2 buffer attached to a request media: dt-bindings: rockchip: Document RK3399 Video Decoder bindings media: rockchip: Add the rkvdec driver arm64: dts: rockchip: rk3399: Define the rockchip Video De

[PATCH v2 1/4] media: vb2: Add a helper to get the vb2 buffer attached to a request

2019-10-11 Thread Boris Brezillon
vb2_request_get_buf() returns the N-th buffer attached to a media request. Signed-off-by: Boris Brezillon --- Changes in v2: * Adjust the kernel doc as suggested by Hans --- .../media/common/videobuf2/videobuf2-core.c | 23 +++ include/media/videobuf2-core.h

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

2019-10-08 Thread Boris Brezillon
On Tue, 8 Oct 2019 11:11:13 +0200 Boris Brezillon wrote: Oops, forgot to update the subject. Should be: "[RFC PATCH v3 0/6] media: v4l2: Add extended fmt and buffer ioctls" > Hello, > > This RFC follows the discussion started by Hans [1] a few months back. > It does

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

2019-10-08 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 v3: - Rebased on top of media/master (post 5.4-rc1) Changes in v2: - New patch --- drivers/media/platform/vivid/vivid-core.c

[RFC PATCH v3 3/6] media: videobuf2: Expose helpers to implement the _ext_fmt and _ext_buf hooks

2019-10-08 Thread Boris Brezillon
-by: Boris Brezillon --- Changes in v3: - Rebased on top of media/master (post 5.4-rc1) Changes in v2: - New patch --- .../media/common/videobuf2/videobuf2-core.c | 2 + .../media/common/videobuf2/videobuf2-v4l2.c | 534 +++--- include/media/videobuf2-core.h| 6

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

2019-10-08 Thread Boris Brezillon
bbrezillon/v4l-utils/commits/master [3]https://github.com/bbrezillon/linux/commit/4882435f80b05a61827649d55cc0f0cee79680a7 [4]https://github.com/bbrezillon/linux/commit/a415216c6aaab2d51f0bd62270b994c8196ddd90 Boris Brezillon (5): media: v4l2: Extend pixel formats to unify single/multi-planar handling (and mo

[RFC PATCH v3 1/6] media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more)

2019-10-08 Thread Boris Brezillon
-off-by: Boris Brezillon --- Changes in v3: - Rebased on top of media/master (post 5.4-rc1) Changes in v2: - Move the modifier in v4l2_ext_format (was formerly placed in v4l2_ext_plane) - Fix a few bugs in the converters and add a strict parameter to allow conversion of uninitialized/mis

[RFC PATCH v3 2/6] media: v4l2: Add extended buffer operations

2019-10-08 Thread Boris Brezillon
support the new hooks, and vice versa. Note that the timecode field is gone, since there doesn't seem to be in-kernel users, but can be added back in the reserved area if needed. Signed-off-by: Hans Verkuil Signed-off-by: Boris Brezillon --- Changes in v3: - Rebased on top of media/master (pos

[RFC PATCH v3 6/6] media: vimc: Implement the ext_fmt and ext_buf hooks

2019-10-08 Thread Boris Brezillon
Convert the driver to the _ext_fmt and _ext_buf API. Signed-off-by: Boris Brezillon --- Changes in v3: - Rebased on top of media/master (post 5.4-rc1) Changes in v2: - New patch --- drivers/media/platform/vimc/vimc-capture.c | 65 +++--- drivers/media/platform/vimc/vimc

[RFC PATCH v3 4/6] media: mediabus: Add an helper to convert a ext_pix format to an mbus_fmt

2019-10-08 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 v3: - Rebased on top of media/master (post 5.4-rc1) Changes in v2: - New patch

Re: [ANN] Media sessions in Lyon in October: libcamera

2019-09-24 Thread Boris Brezillon
t; > All sessions are in room Terreaux VIP Lounge - Level 0. > There is a maximum of 15 people. > > The second session deals with libcamera and is on Wednesday morning > from 9:00 to 13:00. > > Attendees for this session: > > Kieran Bingham > Boris Brezillon I ha

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

2019-09-23 Thread Boris Brezillon
On Mon, 23 Sep 2019 13:41:07 +0200 Hans Verkuil wrote: > Hi Boris, > > On 4/4/19 10:16 AM, Boris Brezillon wrote: > > Hello, > > > > This RFC follows the discussion started by Hans [1] a few months back. > > It does not try to address all the problem report

Re: [PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case

2019-09-09 Thread Boris Brezillon
On Mon, 9 Sep 2019 09:28:15 +0200 Boris Brezillon wrote: > Step '8.2.4.1 Decoding process for picture numbers' was missing in the > reflist creation logic, leading to invalid P reflists when a > ->frame_num wraparound happens. > > Fixes: a9471e25629b ("media:

[PATCH 2/3] media: hantro: h264: Rename POC_CMP() into HANTRO_CMP()

2019-09-09 Thread Boris Brezillon
And use it for all native type comparisons, even if it's not strictly required. By doing that we make the code more consistent and prevent from potential incorrect results in case of overflow or when the the values being compared are both negative. Signed-off-by: Boris Brezillon --- dr

[PATCH 1/3] media: hantro: h264: Fix a comment in b1_ref_list_cmp()

2019-09-09 Thread Boris Brezillon
So it matches the code and the spec. Signed-off-by: Boris Brezillon --- drivers/staging/media/hantro/hantro_h264.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/staging/media/hantro/hantro_h264.c b/drivers/staging/media/hantro/hantro_h264.c index 0d758e0c0f99

[PATCH 3/3] media: hantro: h264: Fix the frame_num wraparound case

2019-09-09 Thread Boris Brezillon
Step '8.2.4.1 Decoding process for picture numbers' was missing in the reflist creation logic, leading to invalid P reflists when a ->frame_num wraparound happens. Fixes: a9471e25629b ("media: hantro: Add core bits to support H264 decoding") Reported-by: Francois Buergisse

Re: [RFC PATCH 3/5] media: v4l2: Add m2m codec helpers

2019-08-05 Thread Boris Brezillon
On Mon, 5 Aug 2019 13:53:20 -0300 Hans Verkuil wrote: > > +/** > > + * struct v4l2_m2m_codec_ctx - Codec context > > + * @fh: file handle > > + * @coded_fmt: current coded format > > + * @decoded_fmt: current decoded format > > + * @coded_fmt_desc: current coded format desc > > + * @decoded_fmt_d

Re: [RFC PATCH 1/5] media: vb2: Add a helper to get the vb2 buffer attached to a request

2019-08-05 Thread Boris Brezillon
On Mon, 5 Aug 2019 10:12:53 -0300 Hans Verkuil wrote: > On 8/5/19 6:48 AM, Boris Brezillon wrote: > > vb2_request_get_buf() returns the N-th buffer attached to a media > > request. > > > > Signed-off-by: Boris Brezillon > > --- > > .../media/c

[RFC PATCH 4/5] media: v4l2: Provide helpers for H264 codecs

2019-08-05 Thread Boris Brezillon
Signed-off-by: Boris Brezillon --- drivers/media/v4l2-core/Kconfig | 5 + drivers/media/v4l2-core/Makefile | 1 + .../media/v4l2-core/v4l2-mem2mem-h264-codec.c | 47 include/media/v4l2-mem2mem-h264-codec.h | 100 ++ 4 files changed

[RFC PATCH 2/5] media: v4l2: Prepare things for addition of m2m codec helpers

2019-08-05 Thread Boris Brezillon
objects to the v4l2-mem2mem.o object. Signed-off-by: Boris Brezillon --- drivers/media/v4l2-core/Makefile| 1 + drivers/media/v4l2-core/{v4l2-mem2mem.c => v4l2-mem2mem-core.c} | 0 2 files changed, 1 insertion(+) rename drivers/media/v4l2-core/{v4l2-mem2me

[RFC PATCH 3/5] media: v4l2: Add m2m codec helpers

2019-08-05 Thread Boris Brezillon
Most codec drivers do the same thing, let's extract those generic bits and provide them as m2m_codec helpers. Each compressed-format will have its own set of sub-helpers. Signed-off-by: Boris Brezillon --- drivers/media/v4l2-core/Kconfig |4 + drivers/media/v4l2-core/Mak

[RFC PATCH 1/5] media: vb2: Add a helper to get the vb2 buffer attached to a request

2019-08-05 Thread Boris Brezillon
vb2_request_get_buf() returns the N-th buffer attached to a media request. Signed-off-by: Boris Brezillon --- .../media/common/videobuf2/videobuf2-core.c | 23 +++ include/media/videobuf2-core.h| 11 + 2 files changed, 34 insertions(+) diff --git a

[RFC PATCH 0/5] media: v4l2: Add m2m codec helpers

2019-08-05 Thread Boris Brezillon
04013/ [2]https://patchwork.kernel.org/project/linux-media/list/?series=129567 Boris Brezillon (5): media: vb2: Add a helper to get the vb2 buffer attached to a request media: v4l2: Prepare things for addition of m2m codec helpers media: v4l2: Add m2m codec helpers media: v4l2: Provide h

[RFC PATCH 5/5] media: rockchip: Add the rkvdec driver

2019-08-05 Thread Boris Brezillon
The rockchip vdec block is a stateless decoder that's able to decode H264, HEVC and VP9 content. This patch only adds H264 support and is making use of the m2m codec helpers. Signed-off-by: Boris Brezillon --- drivers/staging/media/Kconfig | 2 + drivers/staging/media/Mak

Re: [PATCH v3 1/3] media: uapi: h264: Clarify our expectations regarding NAL header format

2019-07-29 Thread Boris Brezillon
On Mon, 29 Jul 2019 15:25:21 +0200 Paul Kocialkowski wrote: > Hi, > > On Sat 27 Jul 19, 11:46, Boris Brezillon wrote: > > On Sat, 27 Jul 2019 11:27:43 +0200 > > Paul Kocialkowski wrote: > > > > > Hi, > > > > > > On Fri 26 Jul 19, 1

Re: [PATCH v3 1/3] media: uapi: h264: Clarify our expectations regarding NAL header format

2019-07-27 Thread Boris Brezillon
On Sat, 27 Jul 2019 09:52:24 -0300 Ezequiel Garcia wrote: > > > > > > That's not my understanding of the Annex B section (quoting the spec > > > for reference): > > > > > > " > > > The byte stream format consists of a sequence of byte stream NAL unit > > > syntax structures. Each byte stream N

Re: [PATCH v3 1/3] media: uapi: h264: Clarify our expectations regarding NAL header format

2019-07-27 Thread Boris Brezillon
On Sat, 27 Jul 2019 11:27:43 +0200 Paul Kocialkowski wrote: > Hi, > > On Fri 26 Jul 19, 10:53, Hans Verkuil wrote: > > On 7/26/19 9:30 AM, Boris Brezillon wrote: > > > On Fri, 26 Jul 2019 08:28:28 +0200 > > > Boris Brezillon wrote: > > >

Re: [PATCH v3 1/3] media: uapi: h264: Clarify our expectations regarding NAL header format

2019-07-26 Thread Boris Brezillon
On Fri, 26 Jul 2019 08:28:28 +0200 Boris Brezillon wrote: > On Thu, 25 Jul 2019 23:39:11 -0300 > Ezequiel Garcia wrote: > > > On Thu, 2019-07-25 at 21:36 +0200, Paul Kocialkowski wrote: > > > Hi, > > > > > > On Thu 25 Jul 19, 08:42, Boris Brezillo

Re: [PATCH v3 1/3] media: uapi: h264: Clarify our expectations regarding NAL header format

2019-07-25 Thread Boris Brezillon
On Thu, 25 Jul 2019 23:39:11 -0300 Ezequiel Garcia wrote: > On Thu, 2019-07-25 at 21:36 +0200, Paul Kocialkowski wrote: > > Hi, > > > > On Thu 25 Jul 19, 08:42, Boris Brezillon wrote: > > > On Fri, 5 Jul 2019 19:16:18 +0200 > > > Boris Brezillon wrote:

Re: [PATCH v3 1/3] media: uapi: h264: Clarify our expectations regarding NAL header format

2019-07-24 Thread Boris Brezillon
On Fri, 5 Jul 2019 19:16:18 +0200 Boris Brezillon wrote: > On Fri, 05 Jul 2019 13:40:03 -0300 > Ezequiel Garcia wrote: > > > Hi Boris, Paul, > > > > On Wed, 2019-07-03 at 14:28 +0200, Boris Brezillon wrote: > > > Looks like some stateless decode

Re: [PATCH v3 3/3] media: uapi: h264: Get rid of the p0/b0/b1 ref-lists

2019-07-23 Thread Boris Brezillon
On Wed, 24 Jul 2019 12:39:55 +0900 Tomasz Figa wrote: > Hi Boris, > > On Wed, Jul 3, 2019 at 9:28 PM Boris Brezillon > wrote: > > > > Those lists can be extracted from the dpb, let's simplify userspace > > life and build that list kernel-side (generic helpe

Re: [PATCH v3 2/3] media: uapi: h264: Add the concept of decoding mode

2019-07-22 Thread Boris Brezillon
Hi Hans, On Mon, 22 Jul 2019 17:29:21 +0200 Hans Verkuil wrote: > On 7/3/19 2:28 PM, Boris Brezillon wrote: > > Some stateless decoders don't support per-slice decoding (or at least > > not in a way that would make them efficient or easy to use). > > Let's expo

Re: [PATCH v3 1/3] media: uapi: h264: Clarify our expectations regarding NAL header format

2019-07-05 Thread Boris Brezillon
On Fri, 05 Jul 2019 13:40:03 -0300 Ezequiel Garcia wrote: > Hi Boris, Paul, > > On Wed, 2019-07-03 at 14:28 +0200, Boris Brezillon wrote: > > Looks like some stateless decoders expect slices to be prefixed with > > ANNEX B start codes (they most likely do some kind of bits

[PATCH v3 2/3] media: uapi: h264: Add the concept of decoding mode

2019-07-03 Thread Boris Brezillon
ned-off-by: Boris Brezillon Reviewed-by: Paul Kocialkowski --- Changes in v3: * s/per-{slice,frame} decoding/{slice,frame}-based decoding/ * Add Paul's R-b Changes in v2: * Allow decoding multiple slices in per-slice decoding mode * Minor doc improvement/fixes --- .../media/uapi/v4l/ext-

[PATCH v3 3/3] media: uapi: h264: Get rid of the p0/b0/b1 ref-lists

2019-07-03 Thread Boris Brezillon
Those lists can be extracted from the dpb, let's simplify userspace life and build that list kernel-side (generic helpers will be provided for drivers that need this list). Signed-off-by: Boris Brezillon --- Changes in v3: * None Changes in v2: * None --- Documentation/media/uapi/v4l/ext-

[PATCH v3 1/3] media: uapi: h264: Clarify our expectations regarding NAL header format

2019-07-03 Thread Boris Brezillon
to be passed through controls) should be pretty easy, let's mandate that all slices be prepended with ANNEX B start codes. If we ever need to support AVC headers, we can add a new menu control to select the type of NAL header to use. Signed-off-by: Boris Brezillon Reviewed-by: Paul Kocialk

[PATCH v3 0/3] media: uapi: h264: First batch of adjusments

2019-07-03 Thread Boris Brezillon
R-b on patch 1 and 2 Changes in v2: * Allow decoding multiple slices in per-slice decoding mode * Minor doc improvements/fixes Boris Brezillon (3): media: uapi: h264: Clarify our expectations regarding NAL header format media: uapi: h264: Add the concept of decoding mode media: u

Re: [PATCH v2 2/3] media: uapi: h264: Add the concept of decoding mode

2019-06-26 Thread Boris Brezillon
On Wed, 26 Jun 2019 13:30:38 +0200 Paul Kocialkowski wrote: > Hi, > > On Mon, 2019-06-10 at 10:52 +0200, Boris Brezillon wrote: > > Some stateless decoders don't support per-slice decoding (or at least > > not in a way that would make them efficient or easy to use).

Re: [PATCH v2 3/3] media: uapi: h264: Get rid of the p0/b0/b1 ref-lists

2019-06-26 Thread Boris Brezillon
On Wed, 26 Jun 2019 13:33:41 +0200 Paul Kocialkowski wrote: > Hi, > > On Mon, 2019-06-10 at 10:52 +0200, Boris Brezillon wrote: > > Those lists can be extracted from the dpb, let's simplify userspace > > life and build that list kernel-side (generic helpers will be pro

[PATCH] media: v4l2: Test type instead of cfg->type in v4l2_ctrl_new_custom()

2019-06-19 Thread Boris Brezillon
cfg->type can be overridden by v4l2_ctrl_fill() and the new value is stored in the local type var. Fix the tests to use this local var. Fixes: 0996517cf8ea ("V4L/DVB: v4l2: Add new control handling framework") Cc: Signed-off-by: Boris Brezillon --- drivers/media/v4l2-core/v4l

Re: [PATCH 2/2] media: hantro: Add support for VP8 decoding on rk3288

2019-06-17 Thread Boris Brezillon
On Thu, 13 Jun 2019 12:10:40 -0300 Ezequiel Garcia wrote: > +static void cfg_parts(struct hantro_ctx *ctx, > + const struct v4l2_ctrl_vp8_frame_header *hdr) > +{ > + struct hantro_dev *vpu = ctx->dev; > + struct vb2_v4l2_buffer *vb2_src; > + u32 first_part_offset =

Re: [PATCH 1/2] media: uapi: Add VP8 stateless decoder API

2019-06-17 Thread Boris Brezillon
On Thu, 13 Jun 2019 12:10:39 -0300 Ezequiel Garcia wrote: > From: Pawel Osciak > > Add the parsed VP8 frame pixel format and controls, to be used > with the new stateless decoder API for VP8 to provide parameters > for accelerator (aka stateless) codecs. > > Signed-off-by: Pawel Osciak > Sign

Re: [PATCH v4 00/10] Rename Rockchip VPU driver to Hantro, add initial i.MX8M support

2019-06-12 Thread Boris Brezillon
On Wed, 12 Jun 2019 10:00:45 +0200 Hans Verkuil wrote: > On 6/12/19 9:55 AM, Hans Verkuil wrote: > > On 6/11/19 2:50 PM, Philipp Zabel wrote: > >> There are several other SoCs that contain Hantro IP based VPUs, such as > >> NXP i.MX8MQ (Hantro G1 and G2) and i.MX8MM (Hantro G1, G2, and H1). To

Re: [PATCH v4 01/10] rockchip/vpu: rename from rockchip to hantro

2019-06-12 Thread Boris Brezillon
On Wed, 12 Jun 2019 08:14:35 + Jonas Karlman wrote: > On 2019-06-11 14:50, Philipp Zabel wrote: > > Rename the driver and all relevant identifiers from Rockchip to Hantro, > > as other Hantro IP based VPU implementations can be supported by the > > same driver. > > The RK3288 decoder is Hantr

Re: [PATCH v2 0/3] media: uapi: h264: First batch of adjusments

2019-06-10 Thread Boris Brezillon
On Mon, 10 Jun 2019 10:52:47 +0200 Boris Brezillon wrote: > Hello, > > This is a first batch of adjustments to the stateless H264 decoder > uAPI. The first one is about adding support for per-frame decoding, > which is the only mode supported on some codecs (the hantro G1 block

[PATCH v2 3/3] media: uapi: h264: Get rid of the p0/b0/b1 ref-lists

2019-06-10 Thread Boris Brezillon
Those lists can be extracted from the dpb, let's simplify userspace life and build that list kernel-side (generic helpers will be provided for drivers that need this list). Signed-off-by: Boris Brezillon --- Changes in v2: * None --- Documentation/media/uapi/v4l/ext-ctrls-codec.rs

[PATCH v2 2/3] media: uapi: h264: Add the concept of decoding mode

2019-06-10 Thread Boris Brezillon
ned-off-by: Boris Brezillon --- Changes in v2: * Allow decoding multiple slices in per-slice decoding mode * Minor doc improvement/fixes --- .../media/uapi/v4l/ext-ctrls-codec.rst| 46 ++- drivers/media/v4l2-core/v4l2-ctrls.c | 9 include/media/h2

[PATCH v2 1/3] media: uapi: h264: Clarify our expectations regarding NAL header format

2019-06-10 Thread Boris Brezillon
to be passed through controls) should be pretty easy, let's mandate that all slices be prepended with ANNEX B start codes. If we ever need to support AVC headers, we can add a new menu control to select the type of NAL header to use. Signed-off-by: Boris Brezillon --- Changes in v2: * None

[PATCH v2 0/3] media: uapi: h264: First batch of adjusments

2019-06-10 Thread Boris Brezillon
n specific. What's provided by the bitstream is a list of references that will be used to decode a frame * ... (add your own) Feel free to comment on these changes and/or propose alternatives. Regards, Boris Changes in v2: * Allow decoding multiple slices in per-slice decoding mode * Minor doc

Re: [PATCH] media: rockchip/vpu: remove an unnecessary NULL check

2019-06-07 Thread Boris Brezillon
On Fri, 7 Jun 2019 16:56:09 +0300 Dan Carpenter wrote: > Thus the address of "&ctx->dev->variant->codec_ops[codec_mode]" > can't possibly be NULL. > > Signed-off-by: Dan Carpenter Reviewed-by: Boris Brezillon > --- > drivers/staging/media/roc

Re: [PATCH 0/5] media: Access videobuf2 buffers via an accessor

2019-06-06 Thread Boris Brezillon
On Thu, 06 Jun 2019 15:13:00 -0300 Ezequiel Garcia wrote: > On Thu, 2019-06-06 at 19:43 +0200, Boris Brezillon wrote: > > On Thu, 6 Jun 2019 12:44:21 -0300 > > Ezequiel Garcia wrote: > > > > > Hi, > > > > > > This patchset introduces a new v

Re: [PATCH 0/5] media: Access videobuf2 buffers via an accessor

2019-06-06 Thread Boris Brezillon
On Thu, 6 Jun 2019 12:44:21 -0300 Ezequiel Garcia wrote: > Hi, > > This patchset introduces a new vb2_get_buffer accessor and then > uses it on all the drivers that are accessing videobuf2 > private buffer array directly. Just curious, how did you find all occurrences of direct q->bufs[] acces

Re: [PATCH 1/5] media: vb2: Introduce a vb2_get_buffer accessor

2019-06-06 Thread Boris Brezillon
ideration. > + */ > +static inline struct vb2_buffer *vb2_get_buffer(struct vb2_queue *q, > + unsigned int index) > +{ > + if (q->num_buffers > 0 && index < q->num_buffers) No need to check q->num_buffers > 0 because in that case i

Re: [PATCH v3 2/2] media: v4l2-ctrl: Move compound control initialization

2019-06-06 Thread Boris Brezillon
f-by: Ezequiel Garcia Reviewed-by: Boris Brezillon > --- > Changes from v2: > * Align parameters to parenthesis > * Drop unneeded zero initialization > > Changes from v1: > * Drop the s/break/return replacements > * Drop unneeded default cases > * Fix memset to take account of

Re: [PATCH v3 1/2] media: v4l2-ctrl: Initialize _BUTTON and _CTRL_CLASS

2019-06-06 Thread Boris Brezillon
default. > > Signed-off-by: Ezequiel Garcia Reviewed-by: Boris Brezillon > --- > Changes from v2: > * Initialize the controls to zero, instead of default. > > Changes from v1: > * No change. > --- > drivers/media/v4l2-core/v4l2-ctrls.c | 4 > 1 file cha

Re: [PATCH v3 01/10] rockchip/vpu: rename from rockchip to hantro

2019-06-06 Thread Boris Brezillon
On Wed, 5 Jun 2019 13:22:42 +0200 Boris Brezillon wrote: > On Fri, 31 May 2019 10:55:14 +0200 > Philipp Zabel wrote: > > > Rename the driver and all relevant identifiers from Rockchip to Hantro, > > as other Hantro IP based VPU implementations can be supported by the >

Re: [PATCH] media: v4l2: Fix the _MPLANE format check in v4l_enum_fmt()

2019-06-06 Thread Boris Brezillon
On Thu, 6 Jun 2019 08:51:59 +0200 Boris Brezillon wrote: > On Thu, 6 Jun 2019 12:53:57 +0900 > Tomasz Figa wrote: > > > On Thu, Jun 6, 2019 at 1:46 AM Boris Brezillon > > wrote: > > > > > > CAP_M2M_MPLANE means the device supports _MPLANE formats fo

Re: [PATCH RFC 5/6] media: cedrus: Make the slice_params array size limitation more explicit

2019-06-05 Thread Boris Brezillon
e: > > > > Le lundi 03 juin 2019 à 23:48 +0200, Jernej Škrabec a écrit : > > > > > Dne ponedeljek, 03. junij 2019 ob 13:09:45 CEST je Boris Brezillon > > > > > napisal(a): > > > > > > The driver only supports per-slice decod

Re: [PATCH RFC 4/6] media: cedrus: Prepare things to support !compound controls

2019-06-05 Thread Boris Brezillon
On Wed, 05 Jun 2019 22:57:21 +0200 Paul Kocialkowski wrote: > Hi, > > Le lundi 03 juin 2019 à 13:09 +0200, Boris Brezillon a écrit : > > We are about to add a menu control, so let's make the code more generic > > to support other control types. > > Did y

Re: [PATCH RFC 2/6] media: uapi: h264: Add the concept of decoding mode

2019-06-05 Thread Boris Brezillon
On Wed, 05 Jun 2019 22:48:08 +0200 Paul Kocialkowski wrote: > Hi, > > Le mardi 04 juin 2019 à 10:16 +0200, Thierry Reding a écrit : > > On Mon, Jun 03, 2019 at 05:37:11PM +0200, Boris Brezillon wrote: > > > On Mon, 3 Jun 2019 16:05:26 +0200 > > > Thierry Redin

Re: [PATCH] media: v4l2: Fix the _MPLANE format check in v4l_enum_fmt()

2019-06-05 Thread Boris Brezillon
On Thu, 6 Jun 2019 12:53:57 +0900 Tomasz Figa wrote: > On Thu, Jun 6, 2019 at 1:46 AM Boris Brezillon > wrote: > > > > CAP_M2M_MPLANE means the device supports _MPLANE formats for both > > capture and output. Adjust the check to avoid EINVAL errors on > &g

[PATCH] media: v4l2: Fix the _MPLANE format check in v4l_enum_fmt()

2019-06-05 Thread Boris Brezillon
CAP_M2M_MPLANE means the device supports _MPLANE formats for both capture and output. Adjust the check to avoid EINVAL errors on such devices. Fixes: 366c719d6479 ("media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane") Reported-by: Maxime Jourdan Signed-off-by: Bo

Re: [PATCH v3 01/10] rockchip/vpu: rename from rockchip to hantro

2019-06-05 Thread Boris Brezillon
1. > > This patch just renames, no functional changes. > > Signed-off-by: Philipp Zabel > Reviewed-by: Boris Brezillon > --- > MAINTAINERS | 4 +- > drivers/staging/media/Kconfig | 2 +- > drivers/staging/media/Makefi

Re: [PATCH v6 2/2] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane

2019-06-04 Thread Boris Brezillon
On Tue, 4 Jun 2019 09:06:25 +0200 Boris Brezillon wrote: > Support for multiplanar and singleplanar formats is mutually exclusive, > at least in practice. In our attempt to unify support for support for s/support for support for/support for/ > m

Re: Proposed updates and guidelines for MPEG-2, H.264 and H.265 stateless support

2019-06-04 Thread Boris Brezillon
On Tue, 4 Jun 2019 09:15:28 + Jonas Karlman wrote: > On 2019-06-04 11:06, Thierry Reding wrote: > > On Tue, Jun 04, 2019 at 10:49:21AM +0200, Boris Brezillon wrote: > >> On Tue, 4 Jun 2019 10:31:57 +0200 > >> Thierry Reding wrote: > >> > >&g

Re: Proposed updates and guidelines for MPEG-2, H.264 and H.265 stateless support

2019-06-04 Thread Boris Brezillon
On Tue, 4 Jun 2019 10:55:03 +0200 Thierry Reding wrote: > On Mon, Jun 03, 2019 at 02:52:44PM -0400, Nicolas Dufresne wrote: > [...] > > There is one thing that come up though, if we enable per-frame decoding > > on top of per-slice decoder (like Cedrus), won't we force userspace to > > always com

Re: Proposed updates and guidelines for MPEG-2, H.264 and H.265 stateless support

2019-06-04 Thread Boris Brezillon
On Tue, 4 Jun 2019 10:31:57 +0200 Thierry Reding wrote: > > > > > - Using flags > > > > > > > > > > The current MPEG-2 controls have lots of u8 values that can be > > > > > represented as flags. Using flags also helps with padding. > > > > > It's unlikely that we'll get more than 64 flags, so us

Re: [PATCH RFC 5/6] media: cedrus: Make the slice_params array size limitation more explicit

2019-06-04 Thread Boris Brezillon
On Tue, 4 Jun 2019 10:12:10 +0200 Thierry Reding wrote: > On Mon, Jun 03, 2019 at 07:55:48PM -0400, Nicolas Dufresne wrote: > > Le lundi 03 juin 2019 à 23:48 +0200, Jernej Škrabec a écrit : > > > Dne ponedeljek, 03. junij 2019 ob 13:09:45 CEST je Boris Brezillo

Re: [PATCH v5 2/2] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane

2019-06-04 Thread Boris Brezillon
On Tue, 4 Jun 2019 09:02:56 +0200 Hans Verkuil wrote: > On 6/3/19 3:58 PM, Boris Brezillon wrote: > > 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

[PATCH v6 2/2] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane

2019-06-04 Thread Boris Brezillon
ad. Signed-off-by: Boris Brezillon --- Changes in v6: - Add missing parens in a test Changes in v5: - None Changes in v4: - None Changes in v3: - Send this patch separately (was previously part of the EXT_BUF/FMT rework) Changes in v2: - None --- drivers/media/pci/intel/ipu3/ipu3-cio2.

[PATCH v6 1/2] media: v4l2: Make sure all drivers set _MPLANE caps in vdev->device_caps

2019-06-04 Thread Boris Brezillon
This is needed if we want the core to be able to check _MPLANE support without having to call the ->vdioc_querycap() hook. Signed-off-by: Boris Brezillon --- Changes in v6: - None Changes in v5: - Drop the fimc-lite and fimc-isp-video hack Changes in v4: - Add a hack in fimc-lite and fimc-

Re: [PATCH v5 2/2] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane

2019-06-04 Thread Boris Brezillon
On Tue, 4 Jun 2019 09:02:56 +0200 Hans Verkuil wrote: > On 6/3/19 3:58 PM, Boris Brezillon wrote: > > 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

Re: [PATCH v3 08/10] media: hantro: add initial i.MX8MQ support

2019-06-03 Thread Boris Brezillon
On Mon, 3 Jun 2019 14:45:37 +0200 Hans Verkuil wrote: > On 5/31/19 10:55 AM, Philipp Zabel wrote: > > For now this just enables MPEG-2 decoding on the Hantro G1 on i.MX8MQ. > > > > Signed-off-by: Philipp Zabel > > --- > > Changes since v2 [1]: > > - Adapted to changes in patches 4 and 5 > > >

Re: Proposed updates and guidelines for MPEG-2, H.264 and H.265 stateless support

2019-06-03 Thread Boris Brezillon
On Mon, 03 Jun 2019 14:52:44 -0400 Nicolas Dufresne wrote: > > > - Dropping the DPB concept in H.264/H.265 > > > > > > As far as I could understand, the decoded picture buffer (DPB) is a > > > concept that only makes sense relative to a decoder implementation. The > > > spec mentions how to mana

Re: [PATCH RFC 2/6] media: uapi: h264: Add the concept of decoding mode

2019-06-03 Thread Boris Brezillon
On Mon, 3 Jun 2019 16:05:26 +0200 Thierry Reding wrote: > On Mon, Jun 03, 2019 at 02:51:13PM +0200, Boris Brezillon wrote: > > +Maxime > > > > Oops, just realized Maxime was not Cc-ed on this series. > > > > On Mon, 3 Jun 2019 14:30:20 +0200 > > Thierry

[PATCH v5 1/2] media: v4l2: Make sure all drivers set _MPLANE caps in vdev->device_caps

2019-06-03 Thread Boris Brezillon
This is needed if we want the core to be able to check _MPLANE support without having to call the ->vdioc_querycap() hook. Signed-off-by: Boris Brezillon --- Changes in v5: - Drop the fimc-lite and fimc-isp-video hack Changes in v4: - Add a hack in fimc-lite and fimc-isp-video ->qu

[PATCH v5 2/2] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane

2019-06-03 Thread Boris Brezillon
ad. Signed-off-by: Boris Brezillon --- Changes in v5: - None Changes in v4: - None Changes in v3: - Send this patch separately (was previously part of the EXT_BUF/FMT rework) Changes in v2: - None --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +- drivers/media/platform/exynos-gsc

Re: [PATCH RFC 2/6] media: uapi: h264: Add the concept of decoding mode

2019-06-03 Thread Boris Brezillon
+Maxime Oops, just realized Maxime was not Cc-ed on this series. On Mon, 3 Jun 2019 14:30:20 +0200 Thierry Reding wrote: > On Mon, Jun 03, 2019 at 01:09:42PM +0200, Boris Brezillon wrote: > > Some stateless decoders don't support per-slice decoding (or at least > > not in a

[PATCH RFC 2/6] media: uapi: h264: Add the concept of decoding mode

2019-06-03 Thread Boris Brezillon
ned-off-by: Boris Brezillon --- .../media/uapi/v4l/ext-ctrls-codec.rst| 42 ++- drivers/media/v4l2-core/v4l2-ctrls.c | 9 include/media/h264-ctrls.h| 13 ++ 3 files changed, 63 insertions(+), 1 deletion(-) diff --git a/Documentation/

[PATCH RFC 0/6] media: uapi: h264: First batch of adjusments

2019-06-03 Thread Boris Brezillon
n specific. What's provided by the bitstream is a list of references that will be used to decode a frame * ... (add your own) Feel free to comment on these changes and/or propose alternatives. Regards, Boris Boris Brezillon (6): media: uapi: h264: Clarify our expectations regarding NAL hea

[PATCH RFC 6/6] media: cedrus: Add the H264_DECODING_MODE control

2019-06-03 Thread Boris Brezillon
The H264 uAPI has been modified to expose 2 operation modes: per slice and per frame decoding. The cedrus driver only supports per-slice decoding for now. Signed-off-by: Boris Brezillon --- drivers/staging/media/sunxi/cedrus/cedrus.c | 13 + 1 file changed, 13 insertions(+) diff

[PATCH RFC 3/6] media: uapi: h264: Get rid of the p0/b0/b1 ref-lists

2019-06-03 Thread Boris Brezillon
Those lists can be extracted from the dpb, let's simplify userspace life and build that list kernel-side (generic helpers will be provided for drivers that need this list). Signed-off-by: Boris Brezillon --- Documentation/media/uapi/v4l/ext-ctrls-codec.rst | 9 - 1 file chang

[PATCH RFC 5/6] media: cedrus: Make the slice_params array size limitation more explicit

2019-06-03 Thread Boris Brezillon
ing to the spec, it's actually an array. Make it more explicit by setting dims[0] and adding a comment explaining why we have this limitation. Signed-off-by: Boris Brezillon --- drivers/staging/media/sunxi/cedrus/cedrus.c | 6 ++ 1 file changed, 6 insertions(+) diff --git a/drivers/stagi

[PATCH RFC 1/6] media: uapi: h264: Clarify our expectations regarding NAL header format

2019-06-03 Thread Boris Brezillon
to be passed through controls) should be pretty easy, let's mandate that all slices be prepended with ANNEX B start codes. If we ever need to support AVC headers, we can add a new menu control to select the type of NAL header to use. Signed-off-by: Boris Brezillon --- Note: we might want to

[PATCH RFC 4/6] media: cedrus: Prepare things to support !compound controls

2019-06-03 Thread Boris Brezillon
We are about to add a menu control, so let's make the code more generic to support other control types. Signed-off-by: Boris Brezillon --- drivers/staging/media/sunxi/cedrus/cedrus.c | 47 - drivers/staging/media/sunxi/cedrus/cedrus.h | 3 +- 2 files changed, 29 inser

Re: [PATCH v3 10/10] media: hantro: allow arbitrary number of clocks

2019-06-01 Thread Boris Brezillon
: Philipp Zabel Reviewed-by: Boris Brezillon > --- > New in v3. > --- > drivers/staging/media/hantro/hantro.h| 6 ++ > drivers/staging/media/hantro/hantro_drv.c| 5 + > drivers/staging/media/hantro/imx8m_vpu_hw.c | 10 ++ > drivers/stagi

Re: [PATCH v3 07/10] media: dt-bindings: Document i.MX8MQ and i.MX8MM VPU bindings

2019-06-01 Thread Boris Brezillon
On Fri, 31 May 2019 10:55:20 +0200 Philipp Zabel wrote: > Add devicetree binding documentation for the Hantro G1/G2 VPU on i.MX8MQ > and for the Hantro G1/G2/H1 VPU on i.MX8MM. > > Signed-off-by: Philipp Zabel > --- > .../devicetree/bindings/media/imx8m-vpu.txt | 56 +++ Hm,

Re: [PATCH v3 06/10] media: hantro: add support for separate control block

2019-06-01 Thread Boris Brezillon
On Fri, 31 May 2019 10:55:19 +0200 Philipp Zabel wrote: > On i.MX8MQ/MM a separate control block contains registers for per-core > resets, clock gating, and fuse register control. > > Signed-off-by: Philipp Zabel Reviewed-by: Boris Brezillon > --- > drivers/staging/med

Re: [PATCH v3 05/10] media: hantro: add support for named register ranges

2019-06-01 Thread Boris Brezillon
ev: Pointer to device for convenient logging using > * dev_ macros. > * @clocks: Array of clock handles. > - * @base:Mapped address of VPU registers. > + * @bases: Mapped addresses of VPU registers. I find the name &#

  1   2   3   4   >