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-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-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

[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

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

2019-03-19 Thread Boris Brezillon
l.org/msg135729.html Boris Brezillon (2): media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more) Hans Verkuil (1): media: v4l2: Add extended buffer operations drivers/media/pci/intel/ipu3/ipu3

[RFC PATCH 1/3] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane

2019-03-19 Thread Boris Brezillon
ad. Signed-off-by: Boris Brezillon --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +- drivers/media/platform/exynos-gsc/gsc-m2m.c | 4 ++-- .../media/platform/exynos4-is/fimc-capture.c | 2 +- .../platform/exynos4-is/fimc-isp-video.c | 2 +- drivers/media/platform/exynos4-is/

[RFC PATCH 3/3] media: v4l2: Add extended buffer operations

2019-03-19 Thread Boris Brezillon
support the new hooks, and vice versa. Signed-off-by: Hans Verkuil Signed-off-by: Boris Brezillon --- Hans, I kept initial autorship as this patch is heavily based on your initial proposal [1]. Please let me know if you want me to change it. Regards, Boris [1]https://git.linuxtv.org/hverkuil

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

2019-03-19 Thread Boris Brezillon
-off-by: Boris Brezillon --- drivers/media/v4l2-core/v4l2-common.c | 189 ++ drivers/media/v4l2-core/v4l2-dev.c| 24 +- drivers/media/v4l2-core/v4l2-ioctl.c | 504 +- include/media/v4l2-common.h | 6 + include/media/v4l2-ioctl.h| 27

Re: [RFC PATCH 2/3] media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more)

2019-03-19 Thread Boris Brezillon
On Tue, 19 Mar 2019 14:07:32 -0400 Nicolas Dufresne wrote: > Le mardi 19 mars 2019 à 15:52 +0100, Boris Brezillon a écrit : > > +/** > > + * struct v4l2_plane_ext_pix_format - additional, per-plane format > > definition > > + * @modifier: modifier applied to

Re: [RFC PATCH 2/3] media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more)

2019-03-19 Thread Boris Brezillon
On Tue, 19 Mar 2019 17:37:59 + Brian Starkey wrote: > Hi Boris, > > On Tue, Mar 19, 2019 at 03:52:42PM +0100, Boris Brezillon wrote: > > This is part of the multiplanar and singleplanar unification process. > > v4l2_ext_pix_format is supposed to work for both cases. >

[RFC PATCH v2 4/7] media: videobuf2: Expose helpers to implement the _ext_fmt and _ext_buf hooks

2019-04-04 Thread Boris Brezillon
-by: Boris Brezillon --- 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 +- include/media/videobuf2-v4l2.h| 26 +- 4

[RFC PATCH v2 5/7] media: mediabus: Add an helper to convert a ext_pix format to an mbus_fmt

2019-04-04 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 v2: - New patch --- include/media/v4l2-mediabus.h | 22 ++ 1

[RFC PATCH v2 2/7] media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more)

2019-04-04 Thread Boris Brezillon
-off-by: Boris Brezillon --- 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-initialized objects --- drivers/media/v4l2-core/v4l2-dev.c | 24

[RFC PATCH v2 1/7] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane

2019-04-04 Thread Boris Brezillon
ad. Signed-off-by: Boris Brezillon --- Changes in v2: - None --- drivers/media/pci/intel/ipu3/ipu3-cio2.c | 2 +- drivers/media/platform/exynos-gsc/gsc-m2m.c | 4 ++-- .../media/platform/exynos4-is/fimc-capture.c | 2 +- .../platform/exynos4-is/fimc-isp-video.c | 2 +- drivers/med

[RFC PATCH v2 7/7] media: vimc: Implement the ext_fmt and ext_buf hooks

2019-04-04 Thread Boris Brezillon
Convert the driver to the _ext_fmt and _ext_buf API. Signed-off-by: Boris Brezillon --- Changes in v2: - New patch --- drivers/media/platform/vimc/vimc-capture.c | 65 +++--- drivers/media/platform/vimc/vimc-common.c | 4 +- drivers/media/platform/vimc/vimc-common.h | 2

[RFC PATCH v2 3/7] media: v4l2: Add extended buffer operations

2019-04-04 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 v2: - Add reserved space to v4l2_ext_buff

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

2019-04-04 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 v2: - New patch --- drivers/media/platform/vivid/vivid-core.c| 30 ++- drivers/media/platform/vivid/vivid-vid-cap.c | 171

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

2019-04-04 Thread Boris Brezillon
tps://github.com/bbrezillon/linux/commit/a415216c6aaab2d51f0bd62270b994c8196ddd90 *** BLURB HERE *** Boris Brezillon (6): media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more) media: videobuf2: Expos

Re: [RFC PATCH v2 2/7] media: v4l2: Extend pixel formats to unify single/multi-planar handling (and more)

2019-04-11 Thread Boris Brezillon
On Thu, 11 Apr 2019 10:24:16 +0200 Hans Verkuil wrote: > > static void v4l_print_framebuffer(const void *arg, bool write_only) > > { > > const struct v4l2_framebuffer *p = arg; > > @@ -951,11 +1027,15 @@ static int check_fmt(struct file *file, enum > > v4l2_buf_type type) > > switch (

Re: [RFC PATCH v2 1/7] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane

2019-04-11 Thread Boris Brezillon
On Thu, 11 Apr 2019 09:59:19 +0200 Hans Verkuil wrote: > On 4/4/19 10:16 AM, 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

Re: [RFC PATCH v2 1/7] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane

2019-04-12 Thread Boris Brezillon
On Thu, 11 Apr 2019 12:38:06 +0200 Hans Verkuil wrote: > >>> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c > >>> b/drivers/media/v4l2-core/v4l2-ioctl.c > >>> index f6d663934648..97ba365218fb 100644 > >>> --- a/drivers/media/v4l2-core/v4l2-ioctl.c > >>> +++ b/drivers/media/v4l2-core/v4l2-ioct

Re: [RFC PATCH v2 1/7] media: v4l2: Get rid of ->vidioc_enum_fmt_vid_{cap,out}_mplane

2019-04-12 Thread Boris Brezillon
On Fri, 12 Apr 2019 10:25:26 +0200 Boris Brezillon wrote: > On Thu, 11 Apr 2019 12:38:06 +0200 > Hans Verkuil wrote: > > > >>> diff --git a/drivers/media/v4l2-core/v4l2-ioctl.c > > >>> b/drivers/media/v4l2-core/v4l2-ioctl.c > > >>> index f

Re: [RFC PATCH v2 3/7] media: v4l2: Add extended buffer operations

2019-04-12 Thread Boris Brezillon
On Thu, 4 Apr 2019 10:16:56 +0200 Boris Brezillon wrote: > +/** > + * struct v4l2_ext_buffer - extended video buffer info > + * @index: id number of the buffer > + * @type: enum v4l2_buf_type; buffer type. _MPLANE and _OVERLAY formats are > + * invalid > + * @flags: bu

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

2019-04-12 Thread Boris Brezillon
ad. Signed-off-by: Boris Brezillon --- 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/gsc-core.c | 2 +- drivers/media/platform/exy

[PATCH v3 1/2] media: exynos4-is: Properly report _MPLANE caps

2019-04-12 Thread Boris Brezillon
The fimc-isp-video.c and fimc-lite.c were missing the V4L2_CAP_VIDEO_CAPTURE_MPLANE flag when reporting device caps. Signed-off-by: Boris Brezillon --- Changes in v3: - New patch --- drivers/media/platform/exynos4-is/fimc-isp-video.c | 4 +++- drivers/media/platform/exynos4-is/fimc-lite.c

Re: [PATCH v3 1/2] media: exynos4-is: Properly report _MPLANE caps

2019-04-12 Thread Boris Brezillon
On Fri, 12 Apr 2019 12:16:42 +0200 Sylwester Nawrocki wrote: > Hi, > > On 4/12/19 11:20, Boris Brezillon wrote: > > The fimc-isp-video.c and fimc-lite.c were missing the > > V4L2_CAP_VIDEO_CAPTURE_MPLANE flag when reporting device caps. > > Th omission was intent

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

2019-04-16 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 v4: - Add a hack in fimc-lite and fimc-isp-video ->querycap() implementation to avoid reporting _MPLANE caps as usersp

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

2019-04-16 Thread Boris Brezillon
ad. Signed-off-by: Boris Brezillon --- 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/gsc-core.c | 2 +- dr

[PATCH v3 00/15] Add MPEG-2 decoding to Rockchip VPU

2019-04-22 Thread Boris Brezillon
wrongly assigned 0 on the MPEG-2 decoder. * Addressed comments from Hans and Tomasz on the pixel format helpers. Boris Brezillon (5): rockchip/vpu: Rename rockchip_vpu_common.h into rockchip_vpu_v4l2.h rockchip/vpu: Remove a useless test rockchip/vpu: Move encoder logic to a common

[PATCH v3 02/15] rockchip/vpu: Use v4l2_m2m_buf_copy_metadata

2019-04-22 Thread Boris Brezillon
From: Ezequiel Garcia Use the recently introduced v4l2_m2m_buf_copy_metadata helper and get rid of some code. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v2: - None --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 9 + 1 file changed, 1

[PATCH v3 06/15] rockchip/vpu: Support the Request API

2019-04-22 Thread Boris Brezillon
From: Ezequiel Garcia Introduce support for the Request API. Although the JPEG encoder does not mandate using the Request API, it's perfectly possible to use it, if the application wants to. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon -- Changes from v2: * Drop unre

[PATCH v3 03/15] rockchip/vpu: Cleanup macroblock alignment

2019-04-22 Thread Boris Brezillon
From: Ezequiel Garcia We need to make the macrobock alignment generic, in order to support multiple codecs. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v2: - None --- .../media/rockchip/vpu/rockchip_vpu_enc.c | 20 --- 1 file changed, 8

[PATCH v3 01/15] rockchip/vpu: Use pixel format helpers

2019-04-22 Thread Boris Brezillon
From: Ezequiel Garcia Now that we've introduced the pixel format helpers, use them in vpu driver, and get rid of the internal helpers. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v2: - None --- .../media/rockchip/vpu/rockchip_vpu_enc.c

[PATCH v3 08/15] rockchip/vpu: Remove a useless test

2019-04-22 Thread Boris Brezillon
vdev is guaranteed to be equal to vpu->vfd_enc thanks a test done a few lines above. Remove this useless test. Signed-off-by: Boris Brezillon --- Changes from v2: * New patch --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 6 ++ 1 file changed, 2 insertions(+), 4 deleti

[PATCH v3 15/15] rockchip/vpu: Add support for MPEG-2 decoding on RK3288

2019-04-22 Thread Boris Brezillon
From: Jonas Karlman Add necessary bits to support MPEG2 decoding on RK3288. Signed-off-by: Jonas Karlman Signed-off-by: Boris Brezillon --- Changes from v2: * New patch --- drivers/staging/media/rockchip/vpu/Makefile | 3 +- .../media/rockchip/vpu/rk3288_vpu_hw.c| 59

[PATCH v3 13/15] rockchip/vpu: Add support for non-standard controls

2019-04-22 Thread Boris Brezillon
From: Ezequiel Garcia Rework the way controls are registered by the driver, so it can support non-standard controls, such as those used by stateless codecs. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon -- Changes from v2: * Got rid of unused ctrls related fields. * Removed

[PATCH v3 05/15] rockchip/vpu: Open-code media controller register

2019-04-22 Thread Boris Brezillon
From: Ezequiel Garcia In preparation to support decoders, using a single memory-to-memory device, we need to roll our own media controller entities registration. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon -- Changes from v2: * Use kvasprintf instead of kmalloc and snprintf

[PATCH v3 04/15] rockchip/vpu: Cleanup JPEG bounce buffer management

2019-04-22 Thread Boris Brezillon
From: Ezequiel Garcia In order to make the code more generic, introduce a pair of start/stop codec operations, and use them to allocate and release the JPEG bounce buffer. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v2: * Reword bounce buffer comment, so

[PATCH v3 12/15] rockchip/vpu: Add decoder boilerplate

2019-04-22 Thread Boris Brezillon
-off-by: Boris Brezillon -- Changes from v2: * Use the common vb2/v4l2 implementation * Use strscpy instead of strlcpy. * Abstract vidioc v4l2 api implementations into generic code, creating helpers that can be used by the encoder and the decoder. * Only prevent S_FMT on the coded format queue

[PATCH v3 10/15] rockchip/vpu: Provide a helper to reset both src and dst formats

2019-04-22 Thread Boris Brezillon
right order: first the coded-format side, then the other, such that width and height on the raw format side can be taken from the coded format. Let's provide a helper that will reset both formats and make sure this is done in the right order. Signed-off-by: Boris Brezillon --- Changes from

[PATCH v3 09/15] rockchip/vpu: Move encoder logic to a common place

2019-04-22 Thread Boris Brezillon
drv.c) queue_init() since it will be used to initialize both type of queues. The implementation itself will be patched to support the decoding case when decoder support is added. Suggested-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v2: * New patch --- drivers/staging/media/roc

[PATCH v3 14/15] rockchip/vpu: Add support for MPEG-2 decoding

2019-04-22 Thread Boris Brezillon
From: Ezequiel Garcia Add MPEG-2 decoding, only on RK3399. Other SoCs and support for other codecs will be added in the future. Signed-off-by: Jonas Karlman Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon -- Changes from v2: * Remove uneeded check from rockchip_vpu_get_ctrl

[PATCH v3 11/15] rockchip/vpu: Prepare things to support decoders

2019-04-22 Thread Boris Brezillon
The code in rockchip_vpu_v4l2 was hardcoded for encoder support. Modify it more generic to support the decoder case so that we can re-use the same vb2/v4l2 ops for both devices. Co-developed-by: Ezequiel Garcia Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v2

[PATCH v3 07/15] rockchip/vpu: Rename rockchip_vpu_common.h into rockchip_vpu_v4l2.h

2019-04-22 Thread Boris Brezillon
We're about to add prototypes for the vb2/v4l2 helpers shared by the encoder/decoder logic in this file, so let's pick a name that reflects that (rockchip_vpu_common.h was a bit to generic). Suggested-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v2: *

Re: [PATCH v3 14/15] rockchip/vpu: Add support for MPEG-2 decoding

2019-04-22 Thread Boris Brezillon
On Mon, 22 Apr 2019 14:59:17 + Jonas Karlman wrote: > On 2019-04-22 10:08, Boris Brezillon wrote: > > From: Ezequiel Garcia > > Please restore my commit authorship, it seems to have changed in v3. Oops, sorry about that, it was not intentional. > > I would appre

[PATCH v4 00/21] Add MPEG-2 decoding to Rockchip VPU

2019-04-25 Thread Boris Brezillon
assigned 0 on the MPEG-2 decoder. * Addressed comments from Hans and Tomasz on the pixel format helpers. Boris Brezillon (7): rockchip/vpu: Remove a useless test rockchip/vpu: Get vdev from the file arg in vidioc_querycap() rockchip/vpu: Initialize mdev->bus_info rockchip/vpu: Ren

[PATCH v4 05/21] rockchip/vpu: Remove a useless test

2019-04-25 Thread Boris Brezillon
vdev is guaranteed to be equal to vpu->vfd_enc thanks a test done a few lines above. Remove this useless test. Signed-off-by: Boris Brezillon --- Changes from v3: * Move earlier in the series Changes from v2: * New patch --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 6 ++

[PATCH v4 02/21] rockchip/vpu: Use v4l2_m2m_buf_copy_metadata

2019-04-25 Thread Boris Brezillon
From: Ezequiel Garcia Use the recently introduced v4l2_m2m_buf_copy_metadata helper and get rid of some code. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v3: * None Changes from v2: * None --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 9

[PATCH v4 06/21] rockchip/vpu: Do not request id 0 for our video device

2019-04-25 Thread Boris Brezillon
assed in argument, and passing -1 has the same effect as passing 0. But let's comply with the API doc and pass -1 here. Signed-off-by: Jonas Karlman Signed-off-by: Boris Brezillon --- Changes from v3: * New patch --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 2 +- 1 file

[PATCH v4 17/21] rockchip/vpu: Add decoder boilerplate

2019-04-25 Thread Boris Brezillon
-off-by: Boris Brezillon -- Changes from v3: * Update things according to changes done in the patch introducing custom media controller support (Boris) * Move the rk3399 vdpu irq definition in the commit introducing MPGEG2 support on rk3399 * Fix media controller deregistration code (Jonas

[PATCH v4 20/21] rockchip/vpu: Add MPEG2 decoding support to RK3399

2019-04-25 Thread Boris Brezillon
From: Jonas Karlman Add the necessary bits to support MPEG2 decoding on RK3399. Signed-off-by: Jonas Karlman Signed-off-by: Boris Brezillon --- Changes from v3: * New patch (was part of another patch before) --- drivers/staging/media/rockchip/vpu/Makefile | 1 + .../media/rockchip/vpu

[PATCH v4 03/21] rockchip/vpu: Cleanup macroblock alignment

2019-04-25 Thread Boris Brezillon
From: Ezequiel Garcia We need to make the macrobock alignment generic, in order to support multiple codecs. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v3: * None Changes from v2: * None --- .../media/rockchip/vpu/rockchip_vpu_enc.c | 20

[PATCH v4 04/21] rockchip/vpu: Cleanup JPEG bounce buffer management

2019-04-25 Thread Boris Brezillon
From: Ezequiel Garcia In order to make the code more generic, introduce a pair of start/stop codec operations, and use them to allocate and release the JPEG bounce buffer. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v3: * None Changes from v2: * Reword

[PATCH v4 10/21] rockchip/vpu: Fix/re-order probe-error/remove path

2019-04-25 Thread Boris Brezillon
-by: Boris Brezillon --- Changes from v3: * New patch --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 8 +--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c

[PATCH v4 18/21] rockchip/vpu: Add support for non-standard controls

2019-04-25 Thread Boris Brezillon
From: Ezequiel Garcia Rework the way controls are registered by the driver, so it can support non-standard controls, such as those used by stateless codecs. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon -- Changes from v3: * None Changes from v2: * Got rid of unused ctrls

[PATCH v4 19/21] rockchip/vpu: Add infra to support MPEG-2 decoding

2019-04-25 Thread Boris Brezillon
From: Jonas Karlman Only adds structs and helpers to allow supporting MPEG-2 decoding on rockchip SoCs. Support for RK3399 and RK3288 will be added in separate commits Signed-off-by: Jonas Karlman Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon -- Changes from v3: * Coding

[PATCH v4 01/21] rockchip/vpu: Use pixel format helpers

2019-04-25 Thread Boris Brezillon
From: Ezequiel Garcia Now that we've introduced the pixel format helpers, use them in vpu driver, and get rid of the internal helpers. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v3: * None Changes from v2: * None --- .../media/rockchi

[PATCH v4 07/21] rockchip/vpu: Add missing dont_use_autosuspend() calls

2019-04-25 Thread Boris Brezillon
From: Jonas Karlman Those calls are needed to restore a clean PM state when the probe fails or when the driver is unloaded such that future ->probe() calls can initialize runtime PM again. Signed-off-by: Jonas Karlman Signed-off-by: Boris Brezillon --- Changes from v3: * New pa

[PATCH v4 08/21] rockchip/vpu: Get vdev from the file arg in vidioc_querycap()

2019-04-25 Thread Boris Brezillon
This makes the function more generic so it can easily be re-used when adding support for the decoding functionality. Signed-off-by: Boris Brezillon --- Changes from v3: * New patch --- drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion

[PATCH v4 11/21] rockchip/vpu: Open-code media controller register

2019-04-25 Thread Boris Brezillon
this vdev to the media device. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon -- Changes from v3: * Rework the media controller registration logic (Boris) * Fix media controller deregistration (Jonas) Changes from v2: * Use kvasprintf instead of kmalloc and snprintf. * Fix missing

[PATCH v4 12/21] rockchip/vpu: Support the Request API

2019-04-25 Thread Boris Brezillon
From: Ezequiel Garcia Introduce support for the Request API. Although the JPEG encoder does not mandate using the Request API, it's perfectly possible to use it, if the application wants to. Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon -- Changes from v3: * None Changes

[PATCH v4 09/21] rockchip/vpu: Initialize mdev->bus_info

2019-04-25 Thread Boris Brezillon
v4l2-compliance complains that ->bus_info is empty. Signed-off-by: Boris Brezillon --- Changes from v3: * New patch --- drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c b/driv

[PATCH v4 14/21] rockchip/vpu: Move encoder logic to a common place

2019-04-25 Thread Boris Brezillon
drv.c) queue_init() since it will be used to initialize both type of queues. The implementation itself will be patched to support the decoding case when decoder support is added. Suggested-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v3: * None Changes from v2: * New

[PATCH v4 13/21] rockchip/vpu: Rename rockchip_vpu_common.h into rockchip_vpu_v4l2.h

2019-04-25 Thread Boris Brezillon
We're about to add prototypes for the vb2/v4l2 helpers shared by the encoder/decoder logic in this file, so let's pick a name that reflects that (rockchip_vpu_common.h was a bit to generic). Suggested-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v3: * None Ch

[PATCH v4 21/21] rockchip/vpu: Add support for MPEG-2 decoding on RK3288

2019-04-25 Thread Boris Brezillon
From: Jonas Karlman Add necessary bits to support MPEG2 decoding on RK3288. Signed-off-by: Jonas Karlman Signed-off-by: Boris Brezillon --- Changes from v3: * Coding style improvements (Jonas) * Use ALIGN() instead of div+shift (Jonas) Changes from v2: * New patch --- drivers/staging/media

[PATCH v4 15/21] rockchip/vpu: Provide a helper to reset both src and dst formats

2019-04-25 Thread Boris Brezillon
right order: first the coded-format side, then the other, such that width and height on the raw format side can be taken from the coded format. Let's provide a helper that will reset both formats and make sure this is done in the right order. Signed-off-by: Boris Brezillon --- Changes from

[PATCH v4 16/21] rockchip/vpu: Prepare things to support decoders

2019-04-25 Thread Boris Brezillon
The code in rockchip_vpu_v4l2 was hardcoded for encoder support. Modify it more generic to support the decoder case so that we can re-use the same vb2/v4l2 ops for both devices. Co-developed-by: Ezequiel Garcia Signed-off-by: Ezequiel Garcia Signed-off-by: Boris Brezillon --- Changes from v3

Re: [PATCH v4 00/21] Add MPEG-2 decoding to Rockchip VPU

2019-04-25 Thread Boris Brezillon
On Thu, 25 Apr 2019 09:12:21 +0200 Boris Brezillon wrote: > This series introduces the decoding infrastructure that will be > used to add support for other codecs such as VP8, VP9 and H.264. > > As explained in the cover letter for the v1 patchset, > the driver is now exposing t

Re: [PATCH v4 00/21] Add MPEG-2 decoding to Rockchip VPU

2019-04-25 Thread Boris Brezillon
On Thu, 25 Apr 2019 10:06:28 +0200 Boris Brezillon wrote: > On Thu, 25 Apr 2019 09:12:21 +0200 > Boris Brezillon wrote: > > > This series introduces the decoding infrastructure that will be > > used to add support for other codecs such as VP8, VP9 and H.264. > > &g

Re: [PATCH v4 00/21] Add MPEG-2 decoding to Rockchip VPU

2019-04-25 Thread Boris Brezillon
On Thu, 25 Apr 2019 10:21:16 +0200 Hans Verkuil wrote: > On 4/25/19 10:06 AM, Boris Brezillon wrote: > > On Thu, 25 Apr 2019 09:12:21 +0200 > > Boris Brezillon wrote: > > > >> This series introduces the decoding infrastructure that will be > >> used

Re: [PATCH 00/15] ARM: pxa: switch to DMA slave maps

2018-04-04 Thread Boris Brezillon
On Wed, 04 Apr 2018 21:49:26 +0200 Robert Jarzmik wrote: > Ulf Hansson writes: > > > On 2 April 2018 at 16:26, Robert Jarzmik wrote: > >> Hi, > >> > >> This serie is aimed at removing the dmaengine slave compat use, and > >> transfer > >> knowledge of the DMA requestors into architecture co

[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 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 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 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

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

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

[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

[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 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

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:

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: [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

[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

[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 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

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

[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

[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 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

[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

[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

<    1   2   3   4   >