Re: [PATCH v2] media: cedrus: don't initialize pointers with zero

2018-12-07 Thread Paul Kocialkowski
$ git grep -E "=\s*\{\s*\}"|wc -l > 1951 > > The standard-C compliant pattern has about 2500 entries: > > $ git grep -E "=\s*\{\s*NULL\s*\}"|wc -l > 137 > $ git grep -E "=\s*\{\s*0\s*\}"|wc -l > 2323 > &

Re: [PATCH] media: cetrus: return an error if alloc fails

2018-12-07 Thread Paul Kocialkowski
alloc returns null) > > While here, remove the memset(), as kzalloc() already zeroes the > struct. Good catch, thanks for the patch! > Signed-off-by: Mauro Carvalho Chehab Acked-by: Paul Kocialkowski > --- > drivers/staging/media/sunxi/cedrus/cedrus.c | 3 ++- > 1 fi

Re: [PATCH for v4.20 0/2] cedrus: move MPEG controls out of the uAPI

2018-12-05 Thread Paul Kocialkowski
getting the MPEG-2 > (and later H264/5) state controls right. Thanks a lot for this change, I'm glad we can take time to properly stabilize these controls! For the whole series: Reviewed-by: Paul Kocialkowski Cheers, Paul > Regards, > > Hans > > Hans Verkuil (2): >

Re: [PATCHv3 9/9] cedrus: add tag support

2018-12-03 Thread Paul Kocialkowski
Hi, On Mon, 2018-12-03 at 14:51 +0100, hverkuil-ci...@xs4all.nl wrote: > From: Hans Verkuil > > Replace old reference frame indices by new tag method. > Signed-off-by: Hans Verkuil > Reviewed-by: Paul Kocialkowski I missed it earlier, but we should remember to update the

Re: [PATCHv2 0/9] vb2/cedrus: add tag support

2018-11-19 Thread Paul Kocialkowski
. That happened before as well with invalid buffer > > indices. This should be checked in the driver! > > > > The previous RFC series was tested successfully with the cedrus driver. > > > > Regards, > > > > Hans > > I'd like to get some Ack

Re: [PATCH] cedrus: add action item to the TODO

2018-11-15 Thread Paul Kocialkowski
d. > +* When queueing a request containing references to I frames, the > + refcount of the memory for those I frames needs to be incremented > + and decremented when the request is completed. This will likely > + require some help from vb2. The driver should fail the request > + if

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

2018-11-13 Thread Paul Kocialkowski
Hi, On Mon, 2018-11-12 at 18:05 -0300, Ezequiel Garcia wrote: > On Mon, 12 Nov 2018 at 13:52, Paul Kocialkowski > wrote: > > Hi, > > > > On Sun, 2018-11-11 at 18:26 -0300, Ezequiel Garcia wrote: > > > On Thu, 2018-10-18 at 15:02 -0300, Ezequiel Garcia wrote: >

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

2018-11-13 Thread Paul Kocialkowski
| 66 --- > .../staging/media/sunxi/cedrus/cedrus_hw.c| 26 ++-- > 3 files changed, 51 insertions(+), 88 deletions(-) > -- Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com signature.asc Description: This is a digitally signed message part

Re: [PATCH v5 5/5] media: cedrus: Get rid of interrupt bottom-half

2018-11-12 Thread Paul Kocialkowski
r needed and we > can get rid of it. > > Signed-off-by: Ezequiel Garcia Acked-by: Paul Kocialkowski Cheers, Paul > --- > .../staging/media/sunxi/cedrus/cedrus_hw.c| 26 --- > 1 file changed, 5 insertions(+), 21 deletions(-) > > diff --git a/drivers

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

2018-11-12 Thread Paul Kocialkowski
ions(-) > > > > Hans, Maxime: > > Any feedback for this? I just tested the whole series with the cedrus driver and everything looks good! Removing the interrupt bottom-half in favor of a workqueue in the core seems like a good way to simplify m2m driver development by avoiding per-driver workqueues or threaded irqs. Cheers, Paul -- Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com signature.asc Description: This is a digitally signed message part

Re: [RFC PATCHv2 5/5] cedrus: add tag support

2018-11-12 Thread Paul Kocialkowski
frame; > - __u8pad; > + __u16 progressive_frame; > }; > > struct v4l2_ctrl_mpeg2_slice_params { > __u32 bit_size; > __u32 data_bit_offset; > + __u64 backward_ref_tag; > + __u64 forward_ref_tag; > > struct v4l2_mpeg2_sequence sequence; > struct v4l2_mpeg2_picture picture; > > /* ISO/IEC 13818-2, ITU-T Rec. H.262: Slice */ > - __u8quantiser_scale_code; > - > - __u8backward_ref_index; > - __u8forward_ref_index; > - __u8pad; > + __u32 quantiser_scale_code; > }; > > struct v4l2_ctrl_mpeg2_quantization { -- Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com signature.asc Description: This is a digitally signed message part

Re: [RFC PATCHv2 0/5] vb2/cedrus: add tag support

2018-11-12 Thread Paul Kocialkowski
.../staging/media/sunxi/cedrus/cedrus_dec.c | 10 + > .../staging/media/sunxi/cedrus/cedrus_mpeg2.c | 21 - > include/media/videobuf2-v4l2.h| 18 > include/uapi/linux/v4l2-controls.h| 14 +++--- > include/uapi/linux/videodev2.h

Re: [RFC PATCHv2 1/5] videodev2.h: add tag support

2018-11-12 Thread Paul Kocialkowski
; 32) | (__u64)buf->tag.low; > +} > + > +static inline void *v4l2_buffer_get_tag_ptr(const struct v4l2_buffer *buf) > +{ > + return (void *)v4l2_buffer_get_tag(buf); > +} > + > /** > * struct v4l2_exportbuffer - export of video buffer as DMABUF file > descriptor > * -- Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com signature.asc Description: This is a digitally signed message part

Re: [PATCH] media: v4l: v4l2-controls.h must include types.h

2018-11-12 Thread Paul Kocialkowski
commit/?h=request_api=dafb7f9aef2fd44991ff1691721ff765a23be27b So it looks like we won't be needing this one! Cheers, Paul > Signed-off-by: Jean Delvare > Fixes: c27bb30e7b6d ("media: v4l: Add definitions for MPEG-2 slice format and > metadata") > Cc: Paul Kocialkows

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

2018-10-12 Thread Paul Kocialkowski
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 -0300, Ezequiel Garcia wrote: > > > From: Shunqian Zheng > > > > > >

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

2018-09-15 Thread Paul Kocialkowski
Hi, On Mon, 2018-09-10 at 10:25 -0300, Ezequiel Garcia wrote: > 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

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

2018-09-13 Thread Paul Kocialkowski
Hi, On Thu, 2018-09-13 at 14:14 +0200, Paul Kocialkowski wrote: > Hi, > > On Wed, 2018-09-05 at 19:00 -0300, Ezequiel Garcia wrote: > > From: Shunqian Zheng > > > > Add V4L2_CID_JPEG_QUANTIZATION compound control to allow userspace > > configure the JPEG qua

Re: [PATCH v2] staging: cedrus: Fix checkpatch issues

2018-09-13 Thread Paul Kocialkowski
Hi, On Thu, 2018-09-13 at 11:53 -0300, Mauro Carvalho Chehab wrote: > Em Thu, 13 Sep 2018 16:40:47 +0200 > Maxime Ripard escreveu: > > > > --- a/drivers/staging/media/sunxi/cedrus/cedrus_video.c > > +++ b/drivers/staging/media/sunxi/cedrus/cedrus_video.c > > @@ -82,10 +82,7 @@ static struct

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

2018-09-13 Thread Paul Kocialkowski
Hi, On Wed, 2018-09-05 at 19:00 -0300, Ezequiel Garcia wrote: > 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 > --- >

[PATCH 0/2] HEVC/H.265 stateless support for V4L2 and Cedrus

2018-08-28 Thread Paul Kocialkowski
support Cheers! Paul Kocialkowski (2): media: v4l: Add definitions for the HEVC slice format and controls media: cedrus: Add HEVC/H.265 decoding support .../media/uapi/v4l/extended-controls.rst | 416 ++ .../media/uapi/v4l/pixfmt-compressed.rst | 15 + .../media/uapi

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

2018-08-27 Thread Paul Kocialkowski
6 +987,9 @@ enum v4l2_jpeg_chroma_subsampling { > #define V4L2_JPEG_ACTIVE_MARKER_DQT (1 << 17) > #define V4L2_JPEG_ACTIVE_MARKER_DHT (1 << 18) > > +#define V4L2_CID_JPEG_LUMA_QUANTIZATION > (V4L2_CID_JPEG_CLASS_BASE + 5) > +#defi

Re: [RFC] Request API and V4L2 capabilities

2018-08-24 Thread Paul Kocialkowski
starting to fill the next request before the current one was completed (fences would probably help implement that). > In any case, I think we can do without this proposed capability since it is > simply a requirement when implementing the pixelformat for the stateless > codec that the Reque

Re: [RFC] Request API and V4L2 capabilities

2018-08-23 Thread Paul Kocialkowski
Hi, On Wed, 2018-08-22 at 14:33 -0300, Ezequiel Garcia wrote: > 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

Re: [RFC] Request API and V4L2 capabilities

2018-08-22 Thread Paul Kocialkowski
Hi, On Wed, 2018-08-15 at 09:57 -0400, Nicolas Dufresne wrote: > Le lundi 06 août 2018 à 10:16 +0200, Paul Kocialkowski a écrit : > > Hi Hans and all, > > > > On Sat, 2018-08-04 at 15:50 +0200, Hans Verkuil wrote: > > > Hi all, > > > > > >

Re: [RFC] Request API and V4L2 capabilities

2018-08-22 Thread Paul Kocialkowski
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/2018 11:13 AM, Paul Kocialkowski wrote: &g

Re: [RFC] Request API and V4L2 capabilities

2018-08-22 Thread Paul Kocialkowski
ssue with that. Only that userspace has to be aware of the format and how to deal with it. Cheers, Paul > > Cheers, > > > > Paul > > > > -- > > Paul Kocialkowski, Bootlin (formerly Free Electrons) > > Embedded Linux and kernel engineering > > http

Re: [RFC] Request API and V4L2 capabilities

2018-08-06 Thread Paul Kocialkowski
On Mon, 2018-08-06 at 11:23 +0200, Hans Verkuil wrote: > On 08/06/2018 11:13 AM, Paul Kocialkowski wrote: > > Hi, > > > > On Mon, 2018-08-06 at 10:32 +0200, Hans Verkuil wrote: > > > On 08/06/2018 10:16 AM, Paul Kocialkowski wrote: > > > > On Sat, 201

Re: [RFC] Request API and V4L2 capabilities

2018-08-06 Thread Paul Kocialkowski
Hi, On Mon, 2018-08-06 at 10:32 +0200, Hans Verkuil wrote: > On 08/06/2018 10:16 AM, Paul Kocialkowski wrote: > > On Sat, 2018-08-04 at 15:50 +0200, Hans Verkuil wrote: > > > Regarding point 3: I think this should be documented next to the pixel > > > format. I.e. &g

Re: [RFC] Request API and V4L2 capabilities

2018-08-06 Thread Paul Kocialkowski
trols used for encoding for this purpose. For decoders, they would be used to expose the (read-only) maximum profile/level that is supported by the hardware and keep using them as a settable value in a range (matching the level of support) for encoders. This is necessary for userspace to determine whether a giv

[PATCH v6 8/8] ARM: dts: sun8i-h3: Add Video Engine and reserved memory nodes

2018-07-25 Thread Paul Kocialkowski
This adds nodes for the Video Engine and the associated reserved memory for the H3. Up to 96 MiB of memory are dedicated to the CMA pool. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun8i-h3.dtsi | 25 + 1 file changed, 25 insertions(+) diff --git a/arch/arm

[PATCH v6 7/8] ARM: dts: sun8i-a33: Add Video Engine and reserved memory nodes

2018-07-25 Thread Paul Kocialkowski
software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun8i-a33.dtsi | 26 ++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/sun8i-a33.dtsi b/arch/arm/boot/dts/sun8i-a33.dtsi

[PATCH v6 3/8] dt-bindings: media: Document bindings for the Cedrus VPU driver

2018-07-25 Thread Paul Kocialkowski
This adds a device-tree binding document that specifies the properties used by the Cedurs VPU driver, as well as examples. Signed-off-by: Paul Kocialkowski Reviewed-by: Rob Herring --- .../devicetree/bindings/media/cedrus.txt | 54 +++ 1 file changed, 54 insertions

[PATCH v6 6/8] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes

2018-07-25 Thread Paul Kocialkowski
software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun7i-a20.dtsi | 26 ++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/sun7i-a20.dtsi b/arch/arm/boot/dts/sun7i-a20.dtsi

[PATCH v6 1/8] media: v4l: Add definitions for MPEG2 slice format and metadata

2018-07-25 Thread Paul Kocialkowski
to drivers. This is based on work from both Florent Revest and Hugues Fruchet. Signed-off-by: Paul Kocialkowski --- .../media/uapi/v4l/extended-controls.rst | 122 ++ .../media/uapi/v4l/pixfmt-compressed.rst | 5 + drivers/media/v4l2-core/v4l2-ctrls.c | 54

[PATCH v6 4/8] media: platform: Add Cedrus VPU decoder driver

2018-07-25 Thread Paul Kocialkowski
in the interest of reverse engineering, documenting and implementing support for Allwinner VPU. Signed-off-by: Paul Kocialkowski --- MAINTAINERS | 7 + drivers/staging/media/Kconfig | 2 + drivers/staging/media/Makefile| 1

[PATCH v6 0/8] Cedrus driver for the Allwinner Video Engine, using media requests

2018-07-25 Thread Paul Kocialkowski
as reference frames for motion vectors; * lots of small cosmetic and consistency changes, including naming harmonization and headers text rework. Cheers! [0]: https://patchwork.kernel.org/patch/9299073/ [1]: https://git.linuxtv.org/hverkuil/media_tree.git/log/?h=reqv16 Paul Kocialkowski (8

[PATCH v6 2/8] media: v4l: Add definition for Allwinner's MB32-tiled NV12 format

2018-07-25 Thread Paul Kocialkowski
line. The MB32-tiled NV12 format is used by the video engine on Allwinner platforms: it is the default format for decoded frames (and the only one available in the oldest supported platforms). Signed-off-by: Paul Kocialkowski --- Documentation/media/uapi/v4l/pixfmt-reserved.rst | 15

[PATCH v6 5/8] ARM: dts: sun5i: Add Video Engine and reserved memory nodes

2018-07-25 Thread Paul Kocialkowski
in downstream software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski --- arch/arm/boot/dts/sun5i.dtsi | 26 ++ 1 file changed, 26 insertions(+) diff --git a/arch/arm/boot/dts/sun5i.dtsi b/arch/arm/boot/dts

Re: [PATCH] v4l2-ctrls: add v4l2_ctrl_request_hdl_find/put/ctrl_find functions

2018-07-09 Thread Paul Kocialkowski
> +{ > + struct v4l2_ctrl_ref *ref = find_ref_lock(hdl, id); > + > + return (ref && ref->req == ref) ? ref : NULL; When req && ref->req == ref, ref->ctrl should be returned instead of ref. Cheers, Paul -- Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com signature.asc Description: This is a digitally signed message part

Re: [PATCH v3 02/14] drivers: soc: sunxi: Add dedicated compatibles for the A13, A20 and A33

2018-06-14 Thread Paul Kocialkowski
Hi, On Fri, 2018-05-11 at 12:20 +0200, Maxime Ripard wrote: > On Thu, May 10, 2018 at 10:05:33PM -0700, Chen-Yu Tsai wrote: > > On Mon, May 7, 2018 at 5:44 AM, Paul Kocialkowski > > wrote: > > > This introduces platform-specific compatibles for the A13, A20 a

Re: [PATCH v3 00/14] Sunxi-Cedrus driver for the Allwinner Video Engine, using media requests

2018-05-07 Thread Paul Kocialkowski
[...] On Mon, 2018-05-07 at 14:44 +0200, Paul Kocialkowski wrote: > Remaining tasks: > * cleaning up registers description and documenting the fields used; > * removing the assigned-clocks property and setting the clock rate > in the driver directly; > * checking the series

Re: [PATCH v3 08/14] media: v4l: Add definitions for MPEG2 frame format and header metadata

2018-05-07 Thread Paul Kocialkowski
Hi Hans, On Mon, 2018-05-07 at 15:49 +0200, Hans Verkuil wrote: > On 07/05/18 14:44, Paul Kocialkowski wrote: > > From: Florent Revest <florent.rev...@free-electrons.com> > > > > Stateless video decoding engines require both the MPEG slices and > > associat

[PATCH v3 04/14] ARM: dts: sun7i-a20: Use dedicated SRAM controller compatible

2018-05-07 Thread Paul Kocialkowski
Use the newly-introduced SRAM controller compatible for the A20 instead of its A10 fashion. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- arch/arm/boot/dts/sun7i-a20.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/sun7i-a20.

[PATCH v3 00/14] Sunxi-Cedrus driver for the Allwinner Video Engine, using media requests

2018-05-07 Thread Paul Kocialkowski
region ARM: sun5i: Add support for the C1 SRAM region with the SRAM controller ARM: sun7i-a20: Add support for the C1 SRAM region with the SRAM controller ARM: sun8i-a33: Add SRAM controller node and C1 SRAM region Paul Kocialkowski (9): drivers: soc: sunxi: Add dedicated compatibles

[PATCH v3 12/14] ARM: dts: sun5i: Add Video Engine and reserved memory nodes

2018-05-07 Thread Paul Kocialkowski
in downstream software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- arch/arm/boot/dts/sun5i.dtsi | 31 +++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/bo

[PATCH v3 01/14] drivers: soc: sunxi: Add support for the C1 SRAM region

2018-05-07 Thread Paul Kocialkowski
tables). This only supports devices with the same layout as the A10 (which also includes the A13, A20, A33 and other SoCs). Signed-off-by: Maxime Ripard <maxime.rip...@bootlin.com> Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- drivers/soc/sunxi/sunxi_sram.c | 10

[PATCH v3 11/14] media: platform: Add Sunxi-Cedrus VPU decoder driver

2018-05-07 Thread Paul Kocialkowski
community in the interest of reverse engineering, documenting and implementing support for Allwinner VPU. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- MAINTAINERS| 7 + drivers/media/platform/Kconfig | 15 + d

[PATCH v3 13/14] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes

2018-05-07 Thread Paul Kocialkowski
software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- arch/arm/boot/dts/sun7i-a20.dtsi | 31 +++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts/sun

[PATCH v3 02/14] drivers: soc: sunxi: Add dedicated compatibles for the A13, A20 and A33

2018-05-07 Thread Paul Kocialkowski
This introduces platform-specific compatibles for the A13, A20 and A33 SRAM driver. No particular adaptation for these platforms is required at this point, although this might become the case in the future. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- drivers/soc

[PATCH v3 14/14] ARM: dts: sun8i-a33: Add Video Engine and reserved memory nodes

2018-05-07 Thread Paul Kocialkowski
software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- arch/arm/boot/dts/sun8i-a33.dtsi | 32 1 file changed, 32 insertions(+) diff --git a/arch/arm/boot/dts/sun

[PATCH v3 03/14] ARM: dts: sun5i: Use dedicated SRAM controller compatible

2018-05-07 Thread Paul Kocialkowski
Use the newly-introduced SRAM controller compatible for the A13 and other sun5i platforms instead of its A10 fashion. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- arch/arm/boot/dts/sun5i.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ar

[PATCH v3 05/14] ARM: sun5i: Add support for the C1 SRAM region with the SRAM controller

2018-05-07 Thread Paul Kocialkowski
From: Maxime Ripard <maxime.rip...@bootlin.com> This adds support for the C1 SRAM region (to be used with the SRAM controller driver) for sun5i-based platforms. The region is shared between the Video Engine and the CPU. Signed-off-by: Maxime Ripard <maxime.rip...@bootlin.com> Signed-

[PATCH v3 09/14] media: v4l: Add definition for Allwinner's MB32-tiled NV12 format

2018-05-07 Thread Paul Kocialkowski
line. The MB32-tiled NV12 format is used by the video engine on Allwinner platforms: it is the default format for decoded frames (and the only one available in the oldest supported platforms). Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- include/uapi/linux/videodev2

[PATCH v3 07/14] ARM: sun8i-a33: Add SRAM controller node and C1 SRAM region

2018-05-07 Thread Paul Kocialkowski
From: Maxime Ripard <maxime.rip...@bootlin.com> This adds a SRAM controller node for the A33, with support for the C1 SRAM region that is shared between the Video Engine and the CPU. Signed-off-by: Maxime Ripard <maxime.rip...@bootlin.com> Signed-off-by: Paul Kocialkowski <

[PATCH v3 10/14] dt-bindings: media: Document bindings for the Sunxi-Cedrus VPU driver

2018-05-07 Thread Paul Kocialkowski
This adds a device-tree binding document that specifies the properties used by the Sunxi-Cedurs VPU driver, as well as examples. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- .../devicetree/bindings/media/sunxi-cedrus.txt | 58 ++ 1 file chang

[PATCH v3 06/14] ARM: sun7i-a20: Add support for the C1 SRAM region with the SRAM controller

2018-05-07 Thread Paul Kocialkowski
From: Maxime Ripard <maxime.rip...@bootlin.com> This adds support for the C1 SRAM region (to be used with the SRAM controller driver) for the A20 platform. The region is shared between the Video Engine and the CPU. Signed-off-by: Maxime Ripard <maxime.rip...@bootlin.com> Signed-

[PATCH v3 08/14] media: v4l: Add definitions for MPEG2 frame format and header metadata

2018-05-07 Thread Paul Kocialkowski
s well as a control structure for passing the frame header (metadata) to drivers. Signed-off-by: Florent Revest <florent.rev...@free-electrons.com> Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- drivers/media/v4l2-core/v4l2-ctrls.c | 10 ++ drivers/media/v4l2

Re: [PATCH v2 09/10] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes

2018-05-04 Thread Paul Kocialkowski
On Fri, 2018-05-04 at 15:40 +0200, Maxime Ripard wrote: > On Fri, May 04, 2018 at 02:04:38PM +0200, Paul Kocialkowski wrote: > > On Fri, 2018-05-04 at 11:15 +0200, Maxime Ripard wrote: > > > On Fri, May 04, 2018 at 10:47:44AM +0200, Paul

Re: [PATCH v2 09/10] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes

2018-05-04 Thread Paul Kocialkowski
Hi, On Fri, 2018-05-04 at 11:15 +0200, Maxime Ripard wrote: > On Fri, May 04, 2018 at 10:47:44AM +0200, Paul Kocialkowski wrote: > > > > > > + reg = <0x01c0e000 0x1000>; > > > > > > + memory-region = <_memory>;

Re: [PATCH v2 09/10] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes

2018-05-04 Thread Paul Kocialkowski
On Fri, 2018-05-04 at 10:47 +0200, Paul Kocialkowski wrote: > > > > Don't you also need to map the SRAM on the A20? > > > > > > That's a good point, there is currently no syscon handle for A20 > > > (and > > > also A13). Maybe SRAM is muxed to the

Re: [PATCH v2 05/10] media: v4l: Add definitions for MPEG2 frame format and header metadata

2018-05-04 Thread Paul Kocialkowski
On Thu, 2018-04-19 at 17:45 +0200, Paul Kocialkowski wrote: > Stateless video decoding engines require both the MPEG slices and > associated metadata from the video stream in order to decode frames. > > This introduces definitions for a new pixel format, describing buffers > with M

Re: [PATCH v2 09/10] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes

2018-05-04 Thread Paul Kocialkowski
Hi, On Fri, 2018-05-04 at 10:40 +0200, Maxime Ripard wrote: > On Fri, May 04, 2018 at 09:49:16AM +0200, Paul Kocialkowski wrote: > > > > + reserved-memory { > > > > + #address-cells = <1>; > > > > + #siz

Re: [PATCH v2 05/10] media: v4l: Add definitions for MPEG2 frame format and header metadata

2018-05-04 Thread Paul Kocialkowski
Hi, On Fri, 2018-04-20 at 09:51 +, Tomasz Figa wrote: > Hi Paul, > > On Fri, Apr 20, 2018 at 12:46 AM Paul Kocialkowski < > paul.kocialkow...@bootlin.com> wrote: > [snip] > > +struct v4l2_ctrl_mpeg2_frame_hdr { > > + __u32 slice_len; > > +

Re: [PATCH v2 05/10] media: v4l: Add definitions for MPEG2 frame format and header metadata

2018-05-04 Thread Paul Kocialkowski
Hi, On Fri, 2018-04-20 at 15:57 +0200, Hans Verkuil wrote: > On 04/19/18 17:45, Paul Kocialkowski wrote: > > Stateless video decoding engines require both the MPEG slices and > > associated metadata from the video stream in order to decode frames. > > > > This intro

Re: [PATCH v2 05/10] media: v4l: Add definitions for MPEG2 frame format and header metadata

2018-05-04 Thread Paul Kocialkowski
Hi, On Tue, 2018-04-24 at 12:01 +0300, Sakari Ailus wrote: > Hi Paul, > > On Thu, Apr 19, 2018 at 05:45:31PM +0200, Paul Kocialkowski wrote: > > Stateless video decoding engines require both the MPEG slices and > > associated metadata from the video stream in o

Re: [PATCH v2 03/10] videobuf2-core: Add helper to get buffer private data from media request

2018-05-04 Thread Paul Kocialkowski
Hi, On Thu, 2018-04-19 at 17:41 +0200, Paul Kocialkowski wrote: > When calling media operation driver callbacks related to media > requests, > only a pointer to the request itself is provided, which is > insufficient > to retrieve the driver's context. Since the driver context i

Re: [PATCH v2 02/10] media-request: Add a request complete operation to allow m2m scheduling

2018-05-04 Thread Paul Kocialkowski
Hi, On Thu, 2018-04-19 at 17:41 +0200, Paul Kocialkowski wrote: > When using the request API in the context of a m2m driver, the > operations that come with a m2m run scheduling call in their > (m2m-specific) ioctl handler are delayed until the request is queued > (for instance, t

Re: [PATCH v2 06/10] media: v4l: Add definition for Allwinner's MB32-tiled NV12 format

2018-05-04 Thread Paul Kocialkowski
Hi, On Fri, 2018-04-20 at 15:59 +0200, Hans Verkuil wrote: > On 04/19/18 17:45, Paul Kocialkowski wrote: > > This introduces support for Allwinner's MB32-tiled NV12 format, > > where > > each plane is divided into macroblocks of 32x32 pixels. Hence, the > >

Re: [PATCH v2 07/10] media: platform: Add Sunxi-Cedrus VPU decoder driver

2018-05-04 Thread Paul Kocialkowski
Hi, On Tue, 2018-04-24 at 12:13 +0300, Sakari Ailus wrote: > Hi Paul > > On Thu, Apr 19, 2018 at 05:45:33PM +0200, Paul Kocialkowski wrote: > > This introduces the Sunxi-Cedrus VPU driver that supports the VPU > > found > > in Allwinner SoCs, also known as Vide

Re: [PATCH v2 08/10] dt-bindings: media: Document bindings for the Sunxi-Cedrus VPU driver

2018-05-04 Thread Paul Kocialkowski
Hi, On Thu, 2018-04-26 at 22:04 -0500, Rob Herring wrote: > On Fri, Apr 20, 2018 at 09:22:20AM +0200, Paul Kocialkowski wrote: > > Hi and thanks for the review, > > > > On Fri, 2018-04-20 at 01:31 +, Tomasz Figa wrote: > > > Hi Paul, Philipp, > > >

Re: [PATCH v2 09/10] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes

2018-05-04 Thread Paul Kocialkowski
Hi, On Fri, 2018-04-20 at 09:39 +0200, Maxime Ripard wrote: > On Thu, Apr 19, 2018 at 05:45:35PM +0200, Paul Kocialkowski wrote: > > This adds nodes for the Video Engine and the associated reserved > > memory > > for the Allwinner A20. Up to 96 MiB of memory are ded

Re: [PATCH v2 08/10] dt-bindings: media: Document bindings for the Sunxi-Cedrus VPU driver

2018-04-20 Thread Paul Kocialkowski
Hi and thanks for the review, On Fri, 2018-04-20 at 01:31 +, Tomasz Figa wrote: > Hi Paul, Philipp, > > On Fri, Apr 20, 2018 at 1:04 AM Philipp Zabel <p.za...@pengutronix.de> > wrote: > > > Hi Paul, > > On Thu, 2018-04-19 at 17:45 +0200, Paul Kocialkowsk

[PATCH v2 05/10] media: v4l: Add definitions for MPEG2 frame format and header metadata

2018-04-19 Thread Paul Kocialkowski
(metadata) to drivers. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> Signed-off-by: Florent Revest <florent.rev...@free-electrons.com> --- drivers/media/v4l2-core/v4l2-ctrls.c | 10 ++ drivers/media/v4l2-core/v4l2-ioctl.c | 1 + include/uapi/linux/v4l2-contr

[PATCH v2 06/10] media: v4l: Add definition for Allwinner's MB32-tiled NV12 format

2018-04-19 Thread Paul Kocialkowski
line. The MB32-tiled NV12 format is used by the video engine on Allwinner platforms: it is the default format for decoded frames (and the only one available in the oldest supported platforms). Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- include/uapi/linux/videodev2

[PATCH v2 09/10] ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes

2018-04-19 Thread Paul Kocialkowski
software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- arch/arm/boot/dts/sun7i-a20.dtsi | 31 +++ 1 file changed, 31 insertions(+) diff --git a/arch/arm/boot/dts

[PATCH v2 10/10] ARM: dts: sun8i-a33: Add Video Engine and reserved memory nodes

2018-04-19 Thread Paul Kocialkowski
software, the last 96 MiB of the first 256 MiB of RAM are reserved for this purpose. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- arch/arm/boot/dts/sun8i-a33.dtsi | 38 ++ 1 file changed, 38 insertions(+) diff --git a/arch/arm/bo

[PATCH v2 07/10] media: platform: Add Sunxi-Cedrus VPU decoder driver

2018-04-19 Thread Paul Kocialkowski
community in the interest of reverse engineering, documenting and implementing support for Allwinner VPU. Signed-off-by: Florent Revest <florent.rev...@free-electrons.com> Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- drivers/media/platform/Kconfig

[PATCH v2 08/10] dt-bindings: media: Document bindings for the Sunxi-Cedrus VPU driver

2018-04-19 Thread Paul Kocialkowski
This adds a device-tree binding document that specifies the properties used by the Sunxi-Cedurs VPU driver, as well as examples. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- .../devicetree/bindings/media/sunxi-cedrus.txt | 50 ++ 1 file chang

[PATCH v2 04/10] media: vim2m: Implement media request complete op to schedule m2m run

2018-04-19 Thread Paul Kocialkowski
This adds an implementation of the media request complete operation for the vim2m driver, that ensures that the driver will try to schedule a m2m run whenever a request was completed. Without this operation, no m2m device run will be scheduled in many scenarios. Signed-off-by: Paul Kocialkowski

[PATCH v2 01/10] media: v4l2-ctrls: Add missing v4l2 ctrl unlock

2018-04-19 Thread Paul Kocialkowski
This adds a missing v4l2_ctrl_unlock call that is required to avoid deadlocks. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- drivers/media/v4l2-core/v4l2-ctrls.c | 7 ++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/drivers/media/v4l2-core/v4l2-c

[PATCH v2 02/10] media-request: Add a request complete operation to allow m2m scheduling

2018-04-19 Thread Paul Kocialkowski
, that is eventually needed in the device_run call to apply relevant controls. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- drivers/media/media-request.c | 3 +++ include/media/media-device.h | 2 ++ 2 files changed, 5 insertions(+) diff --git a/drivers/media/media-reque

[PATCH v2 00/10] Sunxi-Cedrus driver for the Allwinner Video Engine, using media requests

2018-04-19 Thread Paul Kocialkowski
text rework. Remaining tasks: * using the dedicated SRAM controller driver; * cleaning up registers description and documenting the fields used; * removing the assigned-clocks property and setting the clock rate in the driver directly; * testing on more platforms. Cheers! Paul Kocialkowski (10

[PATCH v2 03/10] videobuf2-core: Add helper to get buffer private data from media request

2018-04-19 Thread Paul Kocialkowski
scheduling m2m device runs from the newly-introduced request complete operation. Signed-off-by: Paul Kocialkowski <paul.kocialkow...@bootlin.com> --- drivers/media/common/videobuf2/videobuf2-core.c | 15 +++ include/media/videobuf2-core.h | 1 + 2 files chang

Re: [PATCH 5/9] media: platform: Add Sunxi Cedrus decoder driver

2018-04-19 Thread Paul Kocialkowski
Hi and thanks for the review, On Fri, 2018-03-09 at 14:57 +0100, Maxime Ripard wrote: > On Fri, Mar 09, 2018 at 11:14:41AM +0100, Paul Kocialkowski wrote: > > +/* > > + * mem2mem callbacks > > + */ > > + > > +void job_abort(void *priv) > > +{} > >

Re: [linux-sunxi] [PATCH 5/9] media: platform: Add Sunxi Cedrus decoder driver

2018-04-19 Thread Paul Kocialkowski
Hi, On Mon, 2018-03-12 at 17:15 +, Joonas Kylmälä wrote: > Paul Kocialkowski: > > diff --git a/drivers/media/platform/sunxi-cedrus/sunxi_cedrus_regs.h > > b/drivers/media/platform/sunxi-cedrus/sunxi_cedrus_regs.h > > new file mode 100644 > > index ..738

Re: [linux-sunxi] [PATCH 5/9] media: platform: Add Sunxi Cedrus decoder driver

2018-04-19 Thread Paul Kocialkowski
Hi, On Mon, 2018-03-12 at 20:29 +, Joonas Kylmälä wrote: > Paul Kocialkowski: > > diff --git a/drivers/media/platform/sunxi-cedrus/sunxi_cedrus.c > > b/drivers/media/platform/sunxi-cedrus/sunxi_cedrus.c > > new file mode 100644 > > index ..88624035e0e3

Re: [PATCH 6/9] sunxi-cedrus: Add device tree binding document

2018-04-19 Thread Paul Kocialkowski
Hi, On Sun, 2018-03-18 at 07:48 -0500, Rob Herring wrote: > On Fri, Mar 09, 2018 at 11:14:42AM +0100, Paul Kocialkowski wrote: > > From: Florent Revest <florent.rev...@free-electrons.com> > > "device tree binding document" can all be summarized with the subjec

Re: [RFCv11 PATCH 00/29] Request API

2018-04-19 Thread Paul Kocialkowski
Hi, On Wed, 2018-04-18 at 02:06 +, Alexandre Courbot wrote: > On Tue, Apr 17, 2018 at 8:41 PM Paul Kocialkowski < > paul.kocialkow...@bootlin.com> wrote: > On Tue, 2018-04-17 at 06:17 +, Alexandre Courbot wrote: > > > On Tue, Apr 17, 2018 at 3:12 PM Hans Ver

Re: [RFCv11 PATCH 27/29] vim2m: support requests

2018-04-17 Thread Paul Kocialkowski
equest_queue, > +}; > + > static int vim2m_probe(struct platform_device *pdev) > { > struct vim2m_dev *dev; > @@ -1027,6 +1051,7 @@ static int vim2m_probe(struct platform_device > *pdev) > dev->mdev.dev = >dev; > strlcpy(dev->mdev.model, "vim2m&

Re: [RFCv11 PATCH 00/29] Request API

2018-04-17 Thread Paul Kocialkowski
> requests are queued in my example program, but it then hanged there. > So there is probably something more intricate taking place. I figured out the issue (but forgot to report back to the list): Hans' version of the request API doesn't set the POLLIN bit but POLLPRI instead, so you need to select for expect_fds instead of read_fds in the select call. That's pretty much all there is to it. Hope this helps, -- Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com signature.asc Description: This is a digitally signed message part

Re: [RFCv11 PATCH 26/29] vim2m: use workqueue

2018-04-11 Thread Paul Kocialkowski
ork(); > for (;;) { > if (V4L2_TYPE_IS_OUTPUT(q->type)) > vbuf = v4l2_m2m_src_buf_remove(ctx- > >fh.m2m_ctx); > @@ -1011,6 +1021,7 @@ static int vim2m_probe(struct platform_device > *pdev) > vfd = >vfd; > vfd-&g

Re: [RFCv11 PATCH 27/29] vim2m: support requests

2018-04-11 Thread Paul Kocialkowski
ev) > { > struct vim2m_dev *dev; > @@ -1027,6 +1051,7 @@ static int vim2m_probe(struct platform_device > *pdev) > dev->mdev.dev = >dev; > strlcpy(dev->mdev.model, "vim2m", sizeof(dev->mdev.model)); > media_device_init(>mdev); > + dev->mdev.ops = _media_ops; > dev->v4l2_dev.mdev = >mdev; > dev->pad[0].flags = MEDIA_PAD_FL_SINK; > dev->pad[1].flags = MEDIA_PAD_FL_SOURCE; -- Paul Kocialkowski, Bootlin (formerly Free Electrons) Embedded Linux and kernel engineering https://bootlin.com signature.asc Description: This is a digitally signed message part

Re: [RFCv11 PATCH 14/29] v4l2-ctrls: add core request support

2018-04-11 Thread Paul Kocialkowski
he controls in this media request object. > + * @req: If set, this refers to another request that sets this > control. > * @p_req: The request value. Only used if the control handler > * is bound to a media request. > * > @@ -263,6 +267,8 @@ struct v4l2_ctrl_ref { &

Re: [RFCv4,19/21] media: vim2m: add request support

2018-03-14 Thread Paul Kocialkowski
Hi, On Tue, 2018-03-13 at 19:24 +0900, Alexandre Courbot wrote: > On Fri, Mar 9, 2018 at 11:35 PM, Paul Kocialkowski > <paul.kocialkow...@bootlin.com> wrote: > > Hi, > > > > On Thu, 2018-03-08 at 22:48 +0900, Alexandre Courbot wrote: > > > Hi Paul! > &

Re: [RFCv4,19/21] media: vim2m: add request support

2018-03-12 Thread Paul Kocialkowski
Hi, On Mon, 2018-03-12 at 17:15 +0900, Tomasz Figa wrote: > Hi Paul, Dmitry, > > On Mon, Mar 12, 2018 at 5:10 PM, Paul Kocialkowski > <paul.kocialkow...@bootlin.com> wrote: > > Hi, > > > > On Sun, 2018-03-11 at 22:42 +0300, Dmitry Osipenko wrote: > >

Re: [RFCv4,19/21] media: vim2m: add request support

2018-03-12 Thread Paul Kocialkowski
Hi, On Sun, 2018-03-11 at 22:42 +0300, Dmitry Osipenko wrote: > Hello, > > On 07.03.2018 19:37, Paul Kocialkowski wrote: > > Hi, > > > > First off, I'd like to take the occasion to say thank-you for your > > work. > > This is a major piece of plumbing tha

Re: [RFCv4,19/21] media: vim2m: add request support

2018-03-09 Thread Paul Kocialkowski
trans_time_msec, > > > NULL); > > > @@ -999,6 +1069,9 @@ static int vim2m_probe(struct platform_device > > > *pdev) > > > if (!dev) > > > return -ENOMEM; > > > > > > + v4l2_request_mgr_init(>req_mgr, >vfd

Re: [PATCH 5/9] media: platform: Add Sunxi Cedrus decoder driver

2018-03-09 Thread Paul Kocialkowski
Hi, On Fri, 2018-03-09 at 14:57 +0100, Maxime Ripard wrote: > Hi, > > On Fri, Mar 09, 2018 at 11:14:41AM +0100, Paul Kocialkowski wrote: > > +/* > > + * mem2mem callbacks > > + */ > > + > > +void job_abort(void *priv) > > +{} > > Is that st

Re: [linux-sunxi] [PATCH 6/9] sunxi-cedrus: Add device tree binding document

2018-03-09 Thread Paul Kocialkowski
Hi, Thanks for the review! On Fri, 2018-03-09 at 15:38 +0200, Priit Laes wrote: > On Fri, Mar 09, 2018 at 11:14:42AM +0100, Paul Kocialkowski wrote: > > From: Florent Revest <florent.rev...@free-electrons.com> > > > > Device Tree bindings for the Allwinner's video

Re: [PATCH 0/9] Sunxi-Cedrus driver for the Allwinner Video Engine, using the V4L2 request API

2018-03-09 Thread Paul Kocialkowski
On Fri, 2018-03-09 at 11:09 +0100, Paul Kocialkowski wrote: > This presents a newer version of the Sunxi-Cedrus driver, that > supports > the Video Engine found in most Allwinner SoCs, starting with the A10. I had to send this series in two parts (and tried to keep them under the origin

  1   2   >