[PATCH v5 3/5] v4l2-mem2mem: Simplify exiting the function in __v4l2_m2m_try_schedule

2018-10-18 Thread Ezequiel Garcia
From: Sakari Ailus The __v4l2_m2m_try_schedule function acquires and releases multiple spinlocks. Simplify unlocking the job lock by adding labels to unlock the lock and exit the function. Signed-off-by: Sakari Ailus Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-mem2mem.c

[PATCH v5 0/5] Make sure .device_run is always called in non-atomic context

2018-10-18 Thread Ezequiel Garcia
equest API and the Cedrus VPU driver. Tested with cedrus driver using v4l2-request-test and vicodec driver using gstreamer. Ezequiel Garcia (4): mem2mem: Require capture and output mutexes to match v4l2-ioctl.c: Simplify locking for m2m devices v4l2-mem2mem: Avoid calling .dev

[PATCH 0/2] vicodec: a couple fixes towards spec compliancy

2018-10-18 Thread Ezequiel Garcia
4l2fwhtenc ! v4l2fwhtdec ! fakevideosink Ezequiel Garcia (2): vicodec: Have decoder propagate changes to the CAPTURE queue vicodec: Implement spec-compliant stop command drivers/media/platform/vicodec/vicodec-core.c | 95 --- 1 file changed, 59 insertions(+), 36 deletions(-) -- 2.19.1

[PATCH 1/2] vicodec: Have decoder propagate changes to the CAPTURE queue

2018-10-18 Thread Ezequiel Garcia
. However, it's a relatively small change, which fixes behavior required by some applications such as gstreamer. With this change, it's possible to run a simple T(T⁻¹) pipeline: gst-launch-1.0 videotestsrc ! v4l2fwhtenc ! v4l2fwhtdec ! fakevideosink Signed-off-by: Ezequiel Garcia --- dri

[PATCH 2/2] vicodec: Implement spec-compliant stop command

2018-10-18 Thread Ezequiel Garcia
x27;s possible to run a pipeline to completion: gst-launch-1.0 videotestsrc num-buffers=10 ! v4l2fwhtenc ! v4l2fwhtdec ! fakevideosink Signed-off-by: Ezequiel Garcia --- drivers/media/platform/vicodec/vicodec-core.c | 80 ++- 1 file changed, 44 insertions(+), 36 deletions(-) diff --

Re: [PATCH v5 5/6] media: Add controls for JPEG quantization tables

2018-10-15 Thread Ezequiel Garcia
On Fri, 2018-10-12 at 22:00 +0200, Paul Kocialkowski wrote: > Hi, > > Le mercredi 19 septembre 2018 à 13:28 +0900, Tomasz Figa a écrit : > > On Thu, Sep 13, 2018 at 9:15 PM Paul Kocialkowski wrote: > > > Hi, > > > > > > On Wed, 2018-09-05 at 19:00

Re: [RFC] Informal meeting during ELCE to discuss userspace support for stateless codecs

2018-10-09 Thread Ezequiel Garcia
On Mon, 2018-10-08 at 13:53 +0200, Hans Verkuil wrote: > Hi all, > > I would like to meet up somewhere during the ELCE to discuss userspace support > for stateless (and perhaps stateful as well?) codecs. > > It is also planned as a topic during the summit, but I would prefer to prepare > for that

Re: [PATCH v6 0/6] Add Rockchip VPU JPEG encoder

2018-10-05 Thread Ezequiel Garcia
On Fri, 2018-10-05 at 13:49 -0300, Mauro Carvalho Chehab wrote: > Em Fri, 05 Oct 2018 12:37:43 -0300 > Ezequiel Garcia escreveu: > > > On Fri, 2018-10-05 at 09:10 -0300, Mauro Carvalho Chehab wrote: > > > Em Thu, 04 Oct 2018 20:39:31 -0300 > > > Ezequiel Garcia

Re: [PATCH v6 0/6] Add Rockchip VPU JPEG encoder

2018-10-05 Thread Ezequiel Garcia
On Fri, 2018-10-05 at 09:10 -0300, Mauro Carvalho Chehab wrote: > Em Thu, 04 Oct 2018 20:39:31 -0300 > Ezequiel Garcia escreveu: > > > On Mon, 2018-10-01 at 14:54 -0300, Ezequiel Garcia wrote: > > > On Fri, 2018-09-28 at 14:33 +0200, Hans Verkuil wrote: > > > &

Re: [PATCH v7 4/6] media: Add JPEG_RAW format

2018-10-05 Thread Ezequiel Garcia
On Fri, 2018-10-05 at 08:09 -0300, Mauro Carvalho Chehab wrote: > Em Thu, 4 Oct 2018 21:12:24 -0300 > Ezequiel Garcia escreveu: > > > From: Shunqian Zheng > > > > Add V4L2_PIX_FMT_JPEG_RAW format that does not contain > > JPEG header in the output frame. >

[PATCH v7 6/6] media: add Rockchip VPU JPEG encoder driver

2018-10-04 Thread Ezequiel Garcia
Add a mem2mem driver for the VPU available on Rockchip SoCs. Currently only JPEG encoding is supported, for RK3399 and RK3288 platforms. Signed-off-by: Ezequiel Garcia --- MAINTAINERS | 7 + drivers/staging/media/Kconfig | 2 + drivers

[PATCH v7 4/6] media: Add JPEG_RAW format

2018-10-04 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_PIX_FMT_JPEG_RAW format that does not contain JPEG header in the output frame. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- Documentation/media/uapi/v4l/pixfmt-compressed.rst | 9 + drivers/media/v4l2-core/v4l2-ioctl.c

[PATCH v7 2/6] ARM: dts: rockchip: add VPU device node for RK3288

2018-10-04 Thread Ezequiel Garcia
Add the Video Processing Unit node for RK3288 SoC. Fix the VPU IOMMU node, which was disabled and lacking its power domain property. Signed-off-by: Ezequiel Garcia --- arch/arm/boot/dts/rk3288.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot

[PATCH v7 5/6] media: Add controls for JPEG quantization tables

2018-10-04 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_CID_JPEG_QUANTIZATION compound control to allow userspace configure the JPEG quantization tables. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- .../media/uapi/v4l/extended-controls.rst | 25 +++ .../media/videodev2

[PATCH v7 0/6] Add Rockchip VPU JPEG encoder

2018-10-04 Thread Ezequiel Garcia
f needed. [1] https://github.com/Miouyouyou/RockMyy/blob/master/patches/kernel/v4.18/DTS/0026-ARM-DTSI-rk3288-Set-the-VPU-MMU-power-domains.patch Ezequiel Garcia (4): dt-bindings: Document the Rockchip VPU bindings ARM: dts: rockchip: add VPU device node for RK3288 arm64: dts: rockchip

[PATCH v7 1/6] dt-bindings: Document the Rockchip VPU bindings

2018-10-04 Thread Ezequiel Garcia
Add devicetree binding documentation for Rockchip Video Processing Unit IP. Reviewed-by: Rob Herring Signed-off-by: Ezequiel Garcia --- .../bindings/media/rockchip-vpu.txt | 29 +++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH v7 3/6] arm64: dts: rockchip: add VPU device node for RK3399

2018-10-04 Thread Ezequiel Garcia
Add the Video Processing Unit node for the RK3399 SoC. Also, fix the VPU IOMMU node, which was disabled and lacking its power domain property. Signed-off-by: Ezequiel Garcia --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff

Re: [PATCH v6 0/6] Add Rockchip VPU JPEG encoder

2018-10-04 Thread Ezequiel Garcia
On Mon, 2018-10-01 at 14:54 -0300, Ezequiel Garcia wrote: > On Fri, 2018-09-28 at 14:33 +0200, Hans Verkuil wrote: > > On 09/17/2018 07:30 PM, Ezequiel Garcia wrote: > > > This series adds support for JPEG encoding via the VPU block > > > present in Rockchip platfo

Re: [PATCH v6 1/6] dt-bindings: Document the Rockchip VPU bindings

2018-10-04 Thread Ezequiel Garcia
On Fri, 2018-09-28 at 13:53 +0200, Hans Verkuil wrote: > On 09/17/2018 07:30 PM, Ezequiel Garcia wrote: > > Add devicetree binding documentation for Rockchip Video Processing > > Unit IP. > > > > Reviewed-by: Rob Herring > > Signed-off-by: Ezequiel Garcia

Re: [PATCH v6 0/6] Add Rockchip VPU JPEG encoder

2018-10-01 Thread Ezequiel Garcia
On Fri, 2018-09-28 at 14:33 +0200, Hans Verkuil wrote: > On 09/17/2018 07:30 PM, Ezequiel Garcia wrote: > > This series adds support for JPEG encoding via the VPU block > > present in Rockchip platforms. Currently, support for RK3288 > > and RK3399 is included. > > &

Re: [RFC] V4L2_PIX_FMT_MJPEG vs V4L2_PIX_FMT_JPEG

2018-10-01 Thread Ezequiel Garcia
Hi Hans, Thanks for looking into. I remember MJPEG vs. JPEG being a source of confusion for me a few years ago, so clarification is greatly welcome :-) On Mon, 2018-10-01 at 15:03 +0300, Laurent Pinchart wrote: > Hi Hans, > > On Monday, 1 October 2018 14:54:29 EEST Hans Verkuil wrote: > > On 10/

Re: [RFC] V4L2_PIX_FMT_MJPEG vs V4L2_PIX_FMT_JPEG

2018-10-01 Thread Ezequiel Garcia
On Mon, 2018-10-01 at 08:42 -0400, Nicolas Dufresne wrote: > Hello Hans, > > Le lundi 01 octobre 2018 à 10:43 +0200, Hans Verkuil a écrit : > > It turns out that we have both JPEG and Motion-JPEG pixel formats defined. > > > > Furthermore, some drivers support one, some the other and some both. >

[PATCH v6 6/6] media: add Rockchip VPU JPEG encoder driver

2018-09-17 Thread Ezequiel Garcia
Add a mem2mem driver for the VPU available on Rockchip SoCs. Currently only JPEG encoding is supported, for RK3399 and RK3288 platforms. Signed-off-by: Ezequiel Garcia --- MAINTAINERS | 7 + drivers/staging/media/Kconfig | 2 + drivers

[PATCH v6 5/6] media: Add controls for JPEG quantization tables

2018-09-17 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_CID_JPEG_QUANTIZATION compound control to allow userspace configure the JPEG quantization tables. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- .../media/uapi/v4l/extended-controls.rst | 25 +++ .../media/videodev2

[PATCH v6 4/6] media: Add JPEG_RAW format

2018-09-17 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_PIX_FMT_JPEG_RAW format that does not contain JPEG header in the output frame. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- Documentation/media/uapi/v4l/pixfmt-compressed.rst | 9 + drivers/media/v4l2-core/v4l2-ioctl.c

[PATCH v6 3/6] arm64: dts: rockchip: add VPU device node for RK3399

2018-09-17 Thread Ezequiel Garcia
Add the Video Processing Unit node for the RK3399 SoC. Also, fix the VPU IOMMU node, which was disabled and lacking its power domain property. Signed-off-by: Ezequiel Garcia --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff

[PATCH v6 2/6] ARM: dts: rockchip: add VPU device node for RK3288

2018-09-17 Thread Ezequiel Garcia
Add the Video Processing Unit node for RK3288 SoC. Fix the VPU IOMMU node, which was disabled and lacking its power domain property. Signed-off-by: Ezequiel Garcia --- arch/arm/boot/dts/rk3288.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot

[PATCH v6 0/6] Add Rockchip VPU JPEG encoder

2018-09-17 Thread Ezequiel Garcia
selector API later, if needed. [1] https://github.com/Miouyouyou/RockMyy/blob/master/patches/kernel/v4.18/DTS/0026-ARM-DTSI-rk3288-Set-the-VPU-MMU-power-domains.patch Ezequiel Garcia (4): dt-bindings: Document the Rockchip VPU bindings ARM: dts: rockchip: add VPU device node for RK3288 arm64

[PATCH v6 1/6] dt-bindings: Document the Rockchip VPU bindings

2018-09-17 Thread Ezequiel Garcia
Add devicetree binding documentation for Rockchip Video Processing Unit IP. Reviewed-by: Rob Herring Signed-off-by: Ezequiel Garcia --- .../bindings/media/rockchip-vpu.txt | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings

Re: [PATCH 2/2] vicodec: set state->info before calling the encode/decode funcs

2018-09-10 Thread Ezequiel Garcia
On Mon, 2018-09-10 at 13:16 -0400, Nicolas Dufresne wrote: > Le lundi 10 septembre 2018 à 12:37 -0300, Ezequiel Garcia a écrit : > > On Mon, 2018-09-10 at 17:00 +0200, Hans Verkuil wrote: > > > From: Hans Verkuil > > > > > > state->info was NULL since

Re: [PATCH 1/2] vicodec: Drop unneeded symbol dependency

2018-09-10 Thread Ezequiel Garcia
On Mon, 2018-09-10 at 17:23 +0200, Hans Verkuil wrote: > On 09/10/2018 05:21 PM, Ezequiel Garcia wrote: > > The vicodec doesn't use the Subdev API, so drop the dependency. > > > > Signed-off-by: Ezequiel Garcia > > --- > > drivers/media/platform/vicodec

Re: [PATCH 2/2] vicodec: set state->info before calling the encode/decode funcs

2018-09-10 Thread Ezequiel Garcia
On Mon, 2018-09-10 at 17:00 +0200, Hans Verkuil wrote: > From: Hans Verkuil > > state->info was NULL since I completely forgot to set state->info. > Oops. > > Reported-by: Ezequiel Garcia > Signed-off-by: Hans Verkuil For both patches: Tested-by: Ezequiel Garci

[PATCH 1/2] vicodec: Drop unneeded symbol dependency

2018-09-10 Thread Ezequiel Garcia
The vicodec doesn't use the Subdev API, so drop the dependency. Signed-off-by: Ezequiel Garcia --- drivers/media/platform/vicodec/Kconfig | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/media/platform/vicodec/Kconfig b/drivers/media/platform/vicodec/Kconfig

[PATCH 2/2] vicodec: Drop unused job_abort()

2018-09-10 Thread Ezequiel Garcia
The vicodec does not use the aborting field. In fact, this driver can't really cancel any work, since it performs all the work in device_run(). Signed-off-by: Ezequiel Garcia --- drivers/media/platform/vicodec/vicodec-core.c | 11 --- 1 file changed, 11 deletions(-) diff --

Re: [PATCH v5 5/6] media: Add controls for JPEG quantization tables

2018-09-10 Thread Ezequiel Garcia
Hi Hans, Thanks for the review. On Mon, 2018-09-10 at 14:42 +0200, Hans Verkuil wrote: > On 09/06/2018 12:00 AM, Ezequiel Garcia wrote: > > From: Shunqian Zheng > > > > Add V4L2_CID_JPEG_QUANTIZATION compound control to allow userspace > > configure t

[PATCH v5 6/6] media: add Rockchip VPU JPEG encoder driver

2018-09-05 Thread Ezequiel Garcia
Add a mem2mem driver for the VPU available on Rockchip SoCs. Currently only JPEG encoding is supported, for RK3399 and RK3288 platforms. Signed-off-by: Ezequiel Garcia --- MAINTAINERS | 7 + drivers/staging/media/Kconfig | 2 + drivers

[PATCH v5 0/6] Add Rockchip VPU JPEG encoder

2018-09-05 Thread Ezequiel Garcia
ormat depths - Other minor changes for v4l2-compliance - Drop .crop support, we will add support for the selector API later, if needed. [1] https://github.com/Miouyouyou/RockMyy/blob/master/patches/kernel/v4.18/DTS/0026-ARM-DTSI-rk3288-Set-the-VPU-MMU-power-domains.patch Ezequiel Garcia (

[PATCH v5 5/6] media: Add controls for JPEG quantization tables

2018-09-05 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_CID_JPEG_QUANTIZATION compound control to allow userspace configure the JPEG quantization tables. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- .../media/uapi/v4l/extended-controls.rst | 31 +++ .../media/videodev2

[PATCH v5 3/6] arm64: dts: rockchip: add VPU device node for RK3399

2018-09-05 Thread Ezequiel Garcia
Add the Video Processing Unit node for the RK3399 SoC. Also, fix the VPU IOMMU node, which was disabled and lacking its power domain property. Signed-off-by: Ezequiel Garcia --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff

[PATCH v5 4/6] media: Add JPEG_RAW format

2018-09-05 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_PIX_FMT_JPEG_RAW format that does not contain JPEG header in the output frame. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- Documentation/media/uapi/v4l/pixfmt-compressed.rst | 9 + drivers/media/v4l2-core/v4l2-ioctl.c

[PATCH v5 2/6] ARM: dts: rockchip: add VPU device node for RK3288

2018-09-05 Thread Ezequiel Garcia
Add the Video Processing Unit node for RK3288 SoC. Fix the VPU IOMMU node, which was disabled and lacking its power domain property. Signed-off-by: Ezequiel Garcia --- arch/arm/boot/dts/rk3288.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot

[PATCH v5 1/6] dt-bindings: Document the Rockchip VPU bindings

2018-09-05 Thread Ezequiel Garcia
Add devicetree binding documentation for Rockchip Video Processing Unit IP. Reviewed-by: Rob Herring Signed-off-by: Ezequiel Garcia --- .../bindings/media/rockchip-vpu.txt | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings

[RFP] Automated testing on the media subsystem

2018-09-04 Thread Ezequiel Garcia
There is a lot of discussion going on around testing, so it's a good opportunity for us to talk about our current testing infrastructure. We are already doing a good job with v4l2-compliance. Can we do more? I expect this discussion can span 30-40 minutes. Regards, Ezequiel

Re: [PATCH v4 5/6] media: Add controls for JPEG quantization tables

2018-09-03 Thread Ezequiel Garcia
On Mon, 2018-09-03 at 16:51 +0100, Ian Arkver wrote: > Hi Hans, Ezequiel, > > On 03/09/2018 16:33, Hans Verkuil wrote: > > On 09/03/2018 05:27 PM, Ezequiel Garcia wrote: > > > Hi Ian, Hans: > > > > > > On Mon, 2018-09-03 at 14:29 +0100, Ian Arkver wr

Re: [PATCH v4 5/6] media: Add controls for JPEG quantization tables

2018-09-03 Thread Ezequiel Garcia
Hi Ian, Hans: On Mon, 2018-09-03 at 14:29 +0100, Ian Arkver wrote: > Hi, > > On 03/09/2018 10:50, Hans Verkuil wrote: > > On 08/31/2018 05:52 PM, Ezequiel Garcia wrote: > > > From: Shunqian Zheng > > > > > > Add V4L2_CID_JPEG_QUANTIZATION compound cont

Re: [PATCH v4 6/6] media: add Rockchip VPU JPEG encoder driver

2018-09-03 Thread Ezequiel Garcia
Hi Hans, Thanks for the feedback. On Mon, 2018-09-03 at 12:34 +0200, Hans Verkuil wrote: > On 08/31/2018 05:52 PM, Ezequiel Garcia wrote: > > Add a mem2mem driver for the VPU available on Rockchip SoCs. > > Currently only JPEG encoding is supported, for RK3399 and RK328

[PATCH v4 6/6] media: add Rockchip VPU JPEG encoder driver

2018-08-31 Thread Ezequiel Garcia
Add a mem2mem driver for the VPU available on Rockchip SoCs. Currently only JPEG encoding is supported, for RK3399 and RK3288 platforms. Signed-off-by: Ezequiel Garcia --- MAINTAINERS | 7 + drivers/media/platform/Kconfig| 13 + drivers/media

[PATCH v4 5/6] media: Add controls for JPEG quantization tables

2018-08-31 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_CID_JPEG_QUANTIZATION compound control to allow userspace configure the JPEG quantization tables. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- .../media/uapi/v4l/extended-controls.rst | 23 +++ .../media/videodev2

[PATCH v4 4/6] media: Add JPEG_RAW format

2018-08-31 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_PIX_FMT_JPEG_RAW format that does not contain JPEG header in the output frame. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- Documentation/media/uapi/v4l/pixfmt-compressed.rst | 9 + drivers/media/v4l2-core/v4l2-ioctl.c

[PATCH v4 3/6] arm64: dts: rockchip: add VPU device node for RK3399

2018-08-31 Thread Ezequiel Garcia
Add the Video Processing Unit node for the RK3399 SoC. Also, fix the VPU IOMMU node, which was disabled and lacking its power domain property. Signed-off-by: Ezequiel Garcia --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff

[PATCH v4 2/6] ARM: dts: rockchip: add VPU device node for RK3288

2018-08-31 Thread Ezequiel Garcia
Add the Video Processing Unit node for RK3288 SoC. Fix the VPU IOMMU node, which was disabled and lacking its power domain property. Signed-off-by: Ezequiel Garcia --- arch/arm/boot/dts/rk3288.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot

[PATCH v4 1/6] dt-bindings: Document the Rockchip VPU bindings

2018-08-31 Thread Ezequiel Garcia
Add devicetree binding documentation for Rockchip Video Processing Unit IP. Reviewed-by: Rob Herring Signed-off-by: Ezequiel Garcia --- .../bindings/media/rockchip-vpu.txt | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH v4 0/6] Add Rockchip VPU JPEG encoder

2018-08-31 Thread Ezequiel Garcia
op support, we will add support for the selector API later, if needed. [1] https://github.com/Miouyouyou/RockMyy/blob/master/patches/kernel/v4.18/DTS/0026-ARM-DTSI-rk3288-Set-the-VPU-MMU-power-domains.patch Ezequiel Garcia (4): dt-bindings: Document the Rockchip VPU bindings ARM: dts

Re: [PATCH v4 0/6] Make sure .device_run is always called in non-atomic context

2018-08-31 Thread Ezequiel Garcia
Hi Hans, On 2 August 2018 at 17:48, Ezequiel Garcia wrote: > v4: > * Add patches and 1 and 2, to make q_lock mandatory, > in other words, require output and capture locks to match. > * Add WARN_ON if the lock is not held in v4l2_m2m_try_schedule, > and also document

Re: [PATCH v3 6/7] media: Add controls for JPEG quantization tables

2018-08-28 Thread Ezequiel Garcia
On Mon, 2018-08-27 at 09:47 +0200, Paul Kocialkowski wrote: > Hi, > > On Wed, 2018-08-22 at 13:59 -0300, Ezequiel Garcia wrote: > > From: Shunqian Zheng > > > > Add V4L2_CID_JPEG_LUMA/CHROMA_QUANTIZATION controls to allow userspace > > configure the JPEG qu

Re: [RFC] Request API and V4L2 capabilities

2018-08-22 Thread Ezequiel Garcia
On Wed, 2018-08-22 at 16:10 +0200, Paul Kocialkowski wrote: > Hi, > > On Tue, 2018-08-21 at 17:52 +0900, Tomasz Figa wrote: > > Hi Hans, Paul, > > > > On Mon, Aug 6, 2018 at 6:29 PM Paul Kocialkowski > > wrote: > > > > > > On Mon, 2018-08-06 at 11:23 +0200, Hans Verkuil wrote: > > > > On 08/06/

[PATCH v3 7/7] media: add Rockchip VPU JPEG encoder driver

2018-08-22 Thread Ezequiel Garcia
Add a mem2mem driver for the VPU available on Rockchip SoCs. Currently only JPEG encoding is supported, for RK3399 and RK3288 platforms. Signed-off-by: Ezequiel Garcia --- MAINTAINERS | 7 + drivers/media/platform/Kconfig| 13 + drivers/media

[PATCH v3 4/7] v4l2-ctrls: Support dimensions override for standard controls

2018-08-22 Thread Ezequiel Garcia
Pass the v4l2_ctrl_config->dims array to v4l2_ctrl_fill, so the dimensions can be overridden for standard controls. This will be used to fill V4L2_CID_JPEG_LUMA_QUANTIZATION and V4L2_CID_JPEG_CHROMA_QUANTIZATION. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-common.c |

[PATCH v3 5/7] media: Add JPEG_RAW format

2018-08-22 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_PIX_FMT_JPEG_RAW format that does not contain JPEG header in the output frame. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- Documentation/media/uapi/v4l/pixfmt-compressed.rst | 9 + drivers/media/v4l2-core/v4l2-ioctl.c

[PATCH v3 6/7] media: Add controls for JPEG quantization tables

2018-08-22 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_CID_JPEG_LUMA/CHROMA_QUANTIZATION controls to allow userspace configure the JPEG quantization tables. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- Documentation/media/uapi/v4l/extended-controls.rst | 13 + drivers/media/v4l2-core

[PATCH v3 3/7] arm64: dts: rockchip: add VPU device node for RK3399

2018-08-22 Thread Ezequiel Garcia
Add the Video Processing Unit node for the RK3399 SoC. Also, fix the VPU IOMMU node, which was disabled and lacking its power domain property. Signed-off-by: Ezequiel Garcia --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff

[PATCH v3 2/7] ARM: dts: rockchip: add VPU device node for RK3288

2018-08-22 Thread Ezequiel Garcia
Add the Video Processing Unit node for RK3288 SoC. Fix the VPU IOMMU node, which was disabled and lacking its power domain property. Signed-off-by: Ezequiel Garcia --- arch/arm/boot/dts/rk3288.dtsi | 14 +- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot

[PATCH v3 1/7] dt-bindings: Document the Rockchip VPU bindings

2018-08-22 Thread Ezequiel Garcia
Add devicetree binding documentation for Rockchip Video Processing Unit IP. Reviewed-by: Rob Herring Signed-off-by: Ezequiel Garcia --- .../bindings/media/rockchip-vpu.txt | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings

[PATCH v3 0/7] Add Rockchip VPU JPEG encoder

2018-08-22 Thread Ezequiel Garcia
selector API later, if needed. [1] https://github.com/Miouyouyou/RockMyy/blob/master/patches/kernel/v4.18/DTS/0026-ARM-DTSI-rk3288-Set-the-VPU-MMU-power-domains.patch Ezequiel Garcia (5): dt-bindings: Document the Rockchip VPU bindings ARM: dts: rockchip: add VPU device node for RK3288 arm6

Re: [PATCH v2 0/6] Add Rockchip VPU JPEG encoder

2018-08-18 Thread Ezequiel Garcia
On Thu, 2018-08-02 at 17:00 -0300, Ezequiel Garcia wrote: > This series adds support for JPEG encoding via the VPU block > present in Rockchip platforms. Currently, support for RK3288 > and RK3399 is included. > > The hardware produces a Raw JPEG format (i.e. works as a > JPE

Re: [PATCH v2 5/6] media: Add controls for jpeg quantization tables

2018-08-18 Thread Ezequiel Garcia
On Fri, 2018-08-17 at 11:10 +0900, Tomasz Figa wrote: > Hi Ezequiel, > > On Fri, Aug 3, 2018 at 5:00 AM Ezequiel Garcia wrote: > > > > From: Shunqian Zheng > > > > Add V4L2_CID_JPEG_LUMA/CHROMA_QUANTIZATION controls to allow userspace > >

Re: [RFC] Request API and V4L2 capabilities

2018-08-06 Thread Ezequiel Garcia
On 4 August 2018 at 10:50, Hans Verkuil wrote: > Hi all, > > While the Request API patch series addresses all the core API issues, there > are some high-level considerations as well: > > 1) How can the application tell that the Request API is supported and for >which buffer types (capture/outp

Re: [PATCHv17 31/34] vim2m: support requests

2018-08-06 Thread Ezequiel Garcia
Hey Hans, Just a small nit. On Sat, 2018-08-04 at 14:45 +0200, Hans Verkuil wrote: > From: Hans Verkuil > > Add support for requests to vim2m. > > Signed-off-by: Hans Verkuil > --- > drivers/media/platform/vim2m.c | 26 ++ > 1 file changed, 26 insertions(+) > > diff

[PATCH v4 3/6] v4l2-mem2mem: Avoid v4l2_m2m_prepare_buf from scheduling a job

2018-08-02 Thread Ezequiel Garcia
There is no need for v4l2_m2m_prepare_buf to try to schedule a job, as it only prepares a buffer, but does not queue or changes the state of the queue. Remove the call to v4l2_m2m_try_schedule from v4l2_m2m_prepare_buf. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-mem2mem.c

[PATCH v4 5/6] v4l2-mem2mem: Avoid calling .device_run in v4l2_m2m_job_finish

2018-08-02 Thread Ezequiel Garcia
calls v4l2_m2m_try_run, and gets scheduled by v4l2_m2m_job_finish(). Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-mem2mem.c | 46 +++--- 1 file changed, 42 insertions(+), 4 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2

[PATCH v4 6/6] selftests: media_tests: Add a memory-to-memory concurrent stress test

2018-08-02 Thread Ezequiel Garcia
. Those tests that need human intervention are now separated from those that can run automatically, needing only virtual drivers to work. Signed-off-by: Ezequiel Garcia --- .../testing/selftests/media_tests/.gitignore | 1 + tools/testing/selftests/media_tests/Makefile | 5 +- .../selftests

[PATCH v4 4/6] v4l2-mem2mem: Simplify exiting the function in __v4l2_m2m_try_schedule

2018-08-02 Thread Ezequiel Garcia
From: Sakari Ailus The __v4l2_m2m_try_schedule function acquires and releases multiple spinlocks. Simplify unlocking the job lock by adding labels to unlock the lock and exit the function. Signed-off-by: Sakari Ailus Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-mem2mem.c

[PATCH v4 2/6] v4l2-ioctl.c: simplify locking for m2m devices

2018-08-02 Thread Ezequiel Garcia
Now that the mutexes for output and capture vb2 queues match, it is possible to refer to the context q_lock as the m2m lock for a given m2m context. Remove the output/capture lock selection. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-ioctl.c | 47

[PATCH v4 1/6] mem2mem: Require capture and output mutexes to match

2018-08-02 Thread Ezequiel Garcia
same capture and output mutex, or not set any mutex at all. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-mem2mem.c | 12 +++- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2-core/v4l2-mem2mem.c

[PATCH v4 0/6] Make sure .device_run is always called in non-atomic context

2018-08-02 Thread Ezequiel Garcia
dia tests --- media_device : no video4linux drivers loaded, vim2m is needed not ok 1..1 selftests: media_tests: m2m_job_test.sh [SKIP] make[1]: Leaving directory '/home/zeta/repos/builds/virtme-x86_64' Ezequiel Garcia (5): mem2mem: Require capture and outp

[PATCH v2 2/6] ARM: dts: rockchip: add VPU device node for RK3288

2018-08-02 Thread Ezequiel Garcia
Add the Video Processing Unit node for RK3288 SoC. Also, enable the VPU IOMMU node, as it's needed for any user that wants to use the VPU with the IOMMU. Signed-off-by: Ezequiel Garcia --- arch/arm/boot/dts/rk3288.dtsi | 13 - 1 file changed, 12 insertions(+), 1 deletion(-)

[PATCH v2 1/6] dt-bindings: Document the Rockchip VPU bindings

2018-08-02 Thread Ezequiel Garcia
Add devicetree binding documentation for Rockchip Video Processing Unit IP. Signed-off-by: Ezequiel Garcia --- .../bindings/media/rockchip-vpu.txt | 30 +++ 1 file changed, 30 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rockchip-vpu.txt

[PATCH v2 6/6] media: add Rockchip VPU driver

2018-08-02 Thread Ezequiel Garcia
Add a mem2mem driver for the VPU available on Rockchip SoCs. Currently only JPEG encoding is supported, for RK3399 and RK3288 platforms. Signed-off-by: Ezequiel Garcia --- MAINTAINERS | 7 + drivers/media/platform/Kconfig| 13 + drivers/media

[PATCH v2 5/6] media: Add controls for jpeg quantization tables

2018-08-02 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_CID_JPEG_LUMA/CHROMA_QUANTIZATION controls to allow userspace configure the JPEG quantization tables. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- Documentation/media/uapi/v4l/extended-controls.rst | 9 + drivers/media/v4l2-core/v4l2

[PATCH v2 3/6] arm64: dts: rockchip: add VPU device node for RK3399

2018-08-02 Thread Ezequiel Garcia
Add the Video Processing Unit node for the RK3399 SoC. Signed-off-by: Ezequiel Garcia --- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm64/boot/dts/rockchip/rk3399.dtsi b/arch/arm64/boot/dts/rockchip/rk3399.dtsi index

[PATCH v2 4/6] media: Add JPEG_RAW format

2018-08-02 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_PIX_FMT_JPEG_RAW format that does not contain JPEG header in the output frame. Signed-off-by: Shunqian Zheng Signed-off-by: Ezequiel Garcia --- Documentation/media/uapi/v4l/pixfmt-compressed.rst | 9 + drivers/media/v4l2-core/v4l2-ioctl.c

[PATCH v2 0/6] Add Rockchip VPU JPEG encoder

2018-08-02 Thread Ezequiel Garcia
Hans' review comments - Get rid of unused running_ctx field - Fix wrong planar pixel format depths - Other minor changes for v4l2-compliance - Drop .crop support, we will add support for the selector API later, if needed. Ezequiel Garcia (4): dt-bindings: Document the Rockchi

Re: [PATCH 3/3] media: add Rockchip VPU driver

2018-08-02 Thread Ezequiel Garcia
On Thu, 2018-08-02 at 09:30 +0200, Hans Verkuil wrote: > On 07/27/2018 07:13 PM, Ezequiel Garcia wrote: > > Hi Hans, > > > > Thanks a lot for the review. > > > > On Wed, 2018-07-18 at 11:58 +0200, Hans Verkuil wrote: > > > > > > > > + &

Re: [PATCH v3 3/4] v4l2-mem2mem: Avoid calling .device_run in v4l2_m2m_job_finish

2018-08-02 Thread Ezequiel Garcia
On Thu, 2018-08-02 at 10:02 +0200, Hans Verkuil wrote: > On 08/01/2018 11:50 PM, Ezequiel Garcia wrote: > > v4l2_m2m_job_finish() is typically called in interrupt context. > > > > Some implementation of .device_run might sleep, and so it's > > desirable t

Re: [PATCH 3/3] media: add Rockchip VPU driver

2018-08-02 Thread Ezequiel Garcia
On 2 August 2018 at 05:54, Hans Verkuil wrote: > On 08/01/18 23:07, Ezequiel Garcia wrote: >> Add a mem2mem driver for the VPU available on Rockchip SoCs. >> Currently only JPEG encoding is supported, for RK3399 and RK3288 >> platforms. >> >> Signed-off-by:

[PATCH v3 4/4] selftests: media_tests: Add a memory-to-memory concurrent stress test

2018-08-01 Thread Ezequiel Garcia
. Those tests that need human intervention are now separated from those that can run automatically, needing only virtual drivers to work. Signed-off-by: Ezequiel Garcia --- .../testing/selftests/media_tests/.gitignore | 1 + tools/testing/selftests/media_tests/Makefile | 5 +- .../selftests

[PATCH v3 2/4] v4l2-mem2mem: Simplify exiting the function in __v4l2_m2m_try_schedule

2018-08-01 Thread Ezequiel Garcia
From: Sakari Ailus The __v4l2_m2m_try_schedule function acquires and releases multiple spinlocks. Simplify unlocking the job lock by adding labels to unlock the lock and exit the function. Signed-off-by: Sakari Ailus Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-mem2mem.c

[PATCH v3 1/4] v4l2-mem2mem: Avoid v4l2_m2m_prepare_buf from scheduling a job

2018-08-01 Thread Ezequiel Garcia
There is no need for v4l2_m2m_prepare_buf to try to schedule a job, as it only prepares a buffer, but does not queue or changes the state of the queue. Remove the call to v4l2_m2m_try_schedule from v4l2_m2m_prepare_buf. Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-mem2mem.c

[PATCH v3 0/4] Make sure .device_run is always called in non-atomic context

2018-08-01 Thread Ezequiel Garcia
== --- running media tests --- media_device : no video4linux drivers loaded, vim2m is needed not ok 1..1 selftests: media_tests: m2m_job_test.sh [SKIP] make[1]: Leaving directory '/home/zeta/repos/builds/virtme-x86_64' Ezequiel Garcia (3): v4l2-mem2

[PATCH v3 3/4] v4l2-mem2mem: Avoid calling .device_run in v4l2_m2m_job_finish

2018-08-01 Thread Ezequiel Garcia
calls v4l2_m2m_try_run, and gets scheduled by v4l2_m2m_job_finish(). Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-mem2mem.c | 36 +++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2

[PATCH 3/3] media: add Rockchip VPU driver

2018-08-01 Thread Ezequiel Garcia
Add a mem2mem driver for the VPU available on Rockchip SoCs. Currently only JPEG encoding is supported, for RK3399 and RK3288 platforms. Signed-off-by: Ezequiel Garcia --- drivers/media/platform/Kconfig| 12 + drivers/media/platform/Makefile | 1 + drivers/media

[PATCH 2/3] media: Add controls for jpeg quantization tables

2018-08-01 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_CID_JPEG_LUMA/CHROMA_QUANTIZATION controls to allow userspace configure the JPEG quantization tables. Signed-off-by: Shunqian Zheng --- drivers/media/v4l2-core/v4l2-ctrls.c | 4 include/uapi/linux/v4l2-controls.h | 3 +++ 2 files changed, 7 insertions(+) d

[PATCH v2 0/3] Add Rockchip VPU JPEG encoder

2018-08-01 Thread Ezequiel Garcia
required headers and tables to the produced raw payload, to produce a JPEG image. Compliance == # v4l2-compliance -d 0 -s Ezequiel Garcia (1): media: add Rockchip VPU driver Shunqian Zheng (2): media: Add JPEG_RAW format media: Add controls for jpeg quantization tables .../media

[PATCH 1/3] media: Add JPEG_RAW format

2018-08-01 Thread Ezequiel Garcia
From: Shunqian Zheng Add V4L2_PIX_FMT_JPEG_RAW format that does not contain JPEG header in the output frame. Signed-off-by: Shunqian Zheng --- Documentation/media/uapi/v4l/pixfmt-compressed.rst | 5 + drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/videodev2.h

Re: [PATCH 3/3] media: add Rockchip VPU driver

2018-07-27 Thread Ezequiel Garcia
Hi Hans, Thanks a lot for the review. On Wed, 2018-07-18 at 11:58 +0200, Hans Verkuil wrote: > > > > + > > +static int > > +queue_init(void *priv, struct vb2_queue *src_vq, struct vb2_queue *dst_vq) > > +{ > > + struct rockchip_vpu_ctx *ctx = priv; > > + int ret; > > + > > + src_vq->type =

Re: [PATCH v2 1/5] v4l2-mem2mem: Fix missing v4l2_m2m_try_run call

2018-07-27 Thread Ezequiel Garcia
On Fri, 2018-07-27 at 15:41 +0200, Hans Verkuil wrote: > On 27/07/18 15:35, Hans Verkuil wrote: > > On 25/07/18 19:15, Ezequiel Garcia wrote: > > > Commit 34dbb848d5e4 ("media: mem2mem: Remove excessive try_run call") > > > removed a redundant call to v4

Re: [PATCH] mem2mem: Remove excessive try_run call

2018-07-27 Thread Ezequiel Garcia
On 12 June 2018 at 10:22, Ezequiel Garcia wrote: > If there is a schedulable job, v4l2_m2m_try_schedule() calls > v4l2_m2m_try_run(). This makes the unconditional v4l2_m2m_try_run() > called by v4l2_m2m_job_finish superfluous. Remove it. > > Fixes: 7f98639def42 ("V4L/DVB:

[PATCH] rockchip/rga: Fix bad dma_free_attrs() parameter

2018-07-25 Thread Ezequiel Garcia
In rga_remove(), dma_free_attrs is being passed the wrong cpu address, which triggers an exception if the driver is removed. Fix it. Tested on a RK3399 platform, with a bind/unbind cycle. Signed-off-by: Ezequiel Garcia --- drivers/media/platform/rockchip/rga/rga.c | 2 +- 1 file changed, 1

[PATCH v2 4/5] v4l2-mem2mem: Avoid calling .device_run in v4l2_m2m_job_finish

2018-07-25 Thread Ezequiel Garcia
calls v4l2_m2m_try_run, and gets scheduled by v4l2_m2m_job_finish(). Signed-off-by: Ezequiel Garcia --- drivers/media/v4l2-core/v4l2-mem2mem.c | 36 +++--- 1 file changed, 33 insertions(+), 3 deletions(-) diff --git a/drivers/media/v4l2-core/v4l2-mem2mem.c b/drivers/media/v4l2

[PATCH v2 5/5] selftests: media_tests: Add a memory-to-memory concurrent stress test

2018-07-25 Thread Ezequiel Garcia
Add a test for the memory-to-memory framework, to exercise the scheduling of concurrent jobs, using multiple contexts. This test needs to be run using the vim2m virtual driver, and so needs no hardware. Signed-off-by: Ezequiel Garcia --- tools/testing/selftests/media_tests/Makefile | 4

<    1   2   3   4   5   6   7   8   9   10   >