[GIT PULL FOR v4.20 (request_api branch)] Add Allwinner cedrus decoder driver (v2)

2018-09-14 Thread Hans Verkuil
Hi Mauro,

This is the cedrus Allwinner decoder driver. It is for the request_api topic
branch.

Note that there is a COMPILE_TEST issue with sram functions, for that another 
patch
is needed:

https://lore.kernel.org/patchwork/patch/983848/

But that's going through another subsystem and is already queued up for 4.20.

The first two patches fix two trivial sparse and smatch issues.

Many, many thanks go to Paul for working on this, trying to keep up to date with
the Request API changes at the same time. It was a pleasure working with you on
this!

I'm now using a signed tag, let me know if this works or not.

Regards,

Hans

The following changes since commit d4215edbd4b170b207b0e5a1d8ae42fb49f5c470:

  media: media-request: update documentation (2018-09-11 09:58:43 -0400)

are available in the Git repository at:

  git://linuxtv.org/hverkuil/media_tree.git tags/br-cedrus

for you to fetch changes up to 615ba78ac81ce76edf5ae84981e404fd4eee3ee0:

  media: platform: Add Cedrus VPU decoder driver (2018-09-14 14:27:45 +0200)


Tag cedrus branch


Hans Verkuil (2):
  v4l2-compat-ioctl32.c: fix sparse warning
  v4l2-ctrls.c: fix smatch error

Paul Kocialkowski (5):
  media: videobuf2-core: Rework and rename helper for request buffer count
  media: v4l: Add definitions for MPEG-2 slice format and metadata
  media: v4l: Add definition for the Sunxi tiled NV12 format
  dt-bindings: media: Document bindings for the Cedrus VPU driver
  media: platform: Add Cedrus VPU decoder driver

 Documentation/devicetree/bindings/media/cedrus.txt |  54 +++
 Documentation/media/uapi/v4l/extended-controls.rst | 176 ++
 Documentation/media/uapi/v4l/pixfmt-compressed.rst |  16 ++
 Documentation/media/uapi/v4l/pixfmt-reserved.rst   |  15 +-
 Documentation/media/uapi/v4l/vidioc-queryctrl.rst  |  14 +-
 Documentation/media/videodev2.h.rst.exceptions |   2 +
 MAINTAINERS|   7 +
 drivers/media/common/videobuf2/videobuf2-core.c|  18 +--
 drivers/media/common/videobuf2/videobuf2-v4l2.c|   2 +-
 drivers/media/v4l2-core/v4l2-compat-ioctl32.c  |   1 +
 drivers/media/v4l2-core/v4l2-ctrls.c   |  65 +++-
 drivers/media/v4l2-core/v4l2-ioctl.c   |   2 +
 drivers/staging/media/Kconfig  |   2 +
 drivers/staging/media/Makefile |   1 +
 drivers/staging/media/sunxi/Kconfig|  15 ++
 drivers/staging/media/sunxi/Makefile   |   1 +
 drivers/staging/media/sunxi/cedrus/Kconfig |  14 ++
 drivers/staging/media/sunxi/cedrus/Makefile|   3 +
 drivers/staging/media/sunxi/cedrus/TODO|   7 +
 drivers/staging/media/sunxi/cedrus/cedrus.c| 431 
+
 drivers/staging/media/sunxi/cedrus/cedrus.h| 167 +
 drivers/staging/media/sunxi/cedrus/cedrus_dec.c|  70 +
 drivers/staging/media/sunxi/cedrus/cedrus_dec.h|  27 
 drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 327 

 drivers/staging/media/sunxi/cedrus/cedrus_hw.h |  30 
 drivers/staging/media/sunxi/cedrus/cedrus_mpeg2.c  | 246 
++
 drivers/staging/media/sunxi/cedrus/cedrus_regs.h   | 235 
+
 drivers/staging/media/sunxi/cedrus/cedrus_video.c  | 542 
+++
 drivers/staging/media/sunxi/cedrus/cedrus_video.h  |  30 
 include/media/v4l2-ctrls.h |  18 ++-
 include/media/videobuf2-core.h |   4 +-
 include/uapi/linux/v4l2-controls.h |  65 
 include/uapi/linux/videodev2.h |   6 +
 33 files changed, 2589 insertions(+), 24 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/cedrus.txt
 create mode 100644 drivers/staging/media/sunxi/Kconfig
 create mode 100644 drivers/staging/media/sunxi/Makefile
 create mode 100644 drivers/staging/media/sunxi/cedrus/Kconfig
 create mode 100644 drivers/staging/media/sunxi/cedrus/Makefile
 create mode 100644 drivers/staging/media/sunxi/cedrus/TODO
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus.c
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus.h
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_dec.c
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_dec.h
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_hw.c
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_hw.h
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_mpeg2.c
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_regs.h
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_video.c
 create mode 

[GIT PULL FOR v4.20 (request_api branch)] Add Allwinner cedrus decoder driver

2018-09-11 Thread Hans Verkuil
This supersedes my previous pull request for this since I inadvertently left
in the dts patches, but those go through a separate subsystem.

Hi Mauro,

This is the cedrus Allwinner decoder driver. It is for the request_api topic
branch, but it assumes that this pull request is applied first:
https://patchwork.linuxtv.org/patch/51889/

The last two patches could optionally be squashed with the main driver patch:
they fix COMPILE_TEST issues. I decided not to squash them and leave the choice
to you.

This won't fully fix the COMPILE_TEST problems, for that another patch is 
needed:

https://lore.kernel.org/patchwork/patch/983848/

But that's going through another subsystem.

Many, many thanks go to Paul for working on this, trying to keep up to date with
the Request API changes at the same time. It was a pleasure working with you on
this!

Regards,

Hans

The following changes since commit 051dfd971de1317626d322581546257b748ebde1:

  media-request: update documentation (2018-09-04 11:34:57 +0200)

are available in the Git repository at:

  git://linuxtv.org/hverkuil/media_tree.git cedrus

for you to fetch changes up to e01a72b552b97e49f4d874fc5c48d3092475c423:

  media: cedrus: Select the sunxi SRAM driver in Kconfig (2018-09-11 09:53:39 
+0200)


Paul Kocialkowski (9):
  media: videobuf2-core: Rework and rename helper for request buffer count
  media: v4l: Add definitions for MPEG-2 slice format and metadata
  media: v4l: Add definition for the Sunxi tiled NV12 format
  dt-bindings: media: Document bindings for the Cedrus VPU driver
  media: platform: Add Cedrus VPU decoder driver
  media: cedrus: Fix error reporting in request validation
  media: cedrus: Add TODO file with tasks to complete before unstaging
  media: cedrus: Wrap PHYS_PFN_OFFSET with ifdef and add dedicated comment
  media: cedrus: Select the sunxi SRAM driver in Kconfig

 Documentation/devicetree/bindings/media/cedrus.txt |  54 ++
 Documentation/media/uapi/v4l/extended-controls.rst | 176 +++
 Documentation/media/uapi/v4l/pixfmt-compressed.rst |  16 ++
 Documentation/media/uapi/v4l/pixfmt-reserved.rst   |  15 +-
 Documentation/media/uapi/v4l/vidioc-queryctrl.rst  |  14 +-
 Documentation/media/videodev2.h.rst.exceptions |   2 +
 MAINTAINERS|   7 +
 drivers/media/common/videobuf2/videobuf2-core.c|  18 +-
 drivers/media/common/videobuf2/videobuf2-v4l2.c|   2 +-
 drivers/media/v4l2-core/v4l2-ctrls.c   |  63 +++
 drivers/media/v4l2-core/v4l2-ioctl.c   |   2 +
 drivers/staging/media/Kconfig  |   2 +
 drivers/staging/media/Makefile |   1 +
 drivers/staging/media/sunxi/Kconfig|  15 ++
 drivers/staging/media/sunxi/Makefile   |   1 +
 drivers/staging/media/sunxi/cedrus/Kconfig |  14 ++
 drivers/staging/media/sunxi/cedrus/Makefile|   3 +
 drivers/staging/media/sunxi/cedrus/TODO|   7 +
 drivers/staging/media/sunxi/cedrus/cedrus.c| 431 
+
 drivers/staging/media/sunxi/cedrus/cedrus.h| 165 +
 drivers/staging/media/sunxi/cedrus/cedrus_dec.c|  70 
 drivers/staging/media/sunxi/cedrus/cedrus_dec.h|  27 +++
 drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 327 
++
 drivers/staging/media/sunxi/cedrus/cedrus_hw.h |  30 
 drivers/staging/media/sunxi/cedrus/cedrus_mpeg2.c  | 237 
+
 drivers/staging/media/sunxi/cedrus/cedrus_regs.h   | 233 

 drivers/staging/media/sunxi/cedrus/cedrus_video.c  | 544 
+
 drivers/staging/media/sunxi/cedrus/cedrus_video.h  |  30 
 include/media/v4l2-ctrls.h |  18 +-
 include/media/videobuf2-core.h |   4 +-
 include/uapi/linux/v4l2-controls.h |  65 +++
 include/uapi/linux/videodev2.h |   6 +
 32 files changed, 2576 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/cedrus.txt
 create mode 100644 drivers/staging/media/sunxi/Kconfig
 create mode 100644 drivers/staging/media/sunxi/Makefile
 create mode 100644 drivers/staging/media/sunxi/cedrus/Kconfig
 create mode 100644 drivers/staging/media/sunxi/cedrus/Makefile
 create mode 100644 drivers/staging/media/sunxi/cedrus/TODO
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus.c
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus.h
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_dec.c
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_dec.h
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_hw.c
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus_hw.h
 create mode 

Re: [GIT PULL FOR v4.20 (request_api branch)] Add Allwinner cedrus decoder driver

2018-09-11 Thread Hans Verkuil
On 09/11/18 09:47, Maxime Ripard wrote:
> Hi Hans,
> 
> On Mon, Sep 10, 2018 at 10:34:53AM +0200, Hans Verkuil wrote:
>> This is the cedrus Allwinner decoder driver. It is for the request_api topic
>> branch, but it assumes that this pull request is applied first:
>> https://patchwork.linuxtv.org/patch/51889/
>>
>> The last two patches could optionally be squashed with the main driver patch:
>> they fix COMPILE_TEST issues. I decided not to squash them and leave the 
>> choice
>> to you.
>>
>> This won't fully fix the COMPILE_TEST problems, for that another patch is 
>> needed:
>>
>> https://lore.kernel.org/patchwork/patch/983848/
>>
>> But that's going through another subsystem.
>>
>> Many, many thanks go to Paul for working on this, trying to keep up to date 
>> with
>> the Request API changes at the same time. It was a pleasure working with you 
>> on
>> this!
>>
>> Regards,
>>
>>  Hans
>>
>> The following changes since commit 051dfd971de1317626d322581546257b748ebde1:
>>
>>   media-request: update documentation (2018-09-04 11:34:57 +0200)
>>
>> are available in the Git repository at:
>>
>>   git://linuxtv.org/hverkuil/media_tree.git cedrus
>>
>> for you to fetch changes up to e035b190fac3735e5f9d3c96cee5afc82aa1a94d:
>>
>>   media: cedrus: Select the sunxi SRAM driver in Kconfig (2018-09-10 
>> 10:22:07 +0200)
>>
>> 
>> Paul Kocialkowski (13):
>>   media: videobuf2-core: Rework and rename helper for request buffer 
>> count
>>   media: v4l: Add definitions for MPEG-2 slice format and metadata
>>   media: v4l: Add definition for the Sunxi tiled NV12 format
>>   dt-bindings: media: Document bindings for the Cedrus VPU driver
>>   media: platform: Add Cedrus VPU decoder driver
>>   ARM: dts: sun5i: Add Video Engine and reserved memory nodes
>>   ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes
>>   ARM: dts: sun8i-a33: Add Video Engine and reserved memory nodes
>>   ARM: dts: sun8i-h3: Add Video Engine and reserved memory nodes
>>   media: cedrus: Fix error reporting in request validation
>>   media: cedrus: Add TODO file with tasks to complete before unstaging
>>   media: cedrus: Wrap PHYS_PFN_OFFSET with ifdef and add dedicated 
>> comment
>>   media: cedrus: Select the sunxi SRAM driver in Kconfig
>>
>>  Documentation/devicetree/bindings/media/cedrus.txt |  54 +
>>  Documentation/media/uapi/v4l/extended-controls.rst | 176 
>>  Documentation/media/uapi/v4l/pixfmt-compressed.rst |  16 ++
>>  Documentation/media/uapi/v4l/pixfmt-reserved.rst   |  15 +-
>>  Documentation/media/uapi/v4l/vidioc-queryctrl.rst  |  14 +-
>>  Documentation/media/videodev2.h.rst.exceptions |   2 +
>>  MAINTAINERS|   7 +
>>  arch/arm/boot/dts/sun5i.dtsi   |  26 +++
>>  arch/arm/boot/dts/sun7i-a20.dtsi   |  26 +++
>>  arch/arm/boot/dts/sun8i-a33.dtsi   |  26 +++
>>  arch/arm/boot/dts/sun8i-h3.dtsi|  25 +++
> 
> Sorry for not noticing it earlier, but we'll want to merge the
> arch/arm/boot/dts/* changes through arm-soc, to reduce the merge
> conflicts.
> 
> I guess we can do it through several ways, depending on what's the
> most convenient for you:
> 
>   - Drop the patches in your PR,

I'll do this.

Apologies, completely my mistake.

Regards,

Hans

>   - Send a revert patch as an additional patch on top of your current PR
>   - Or just merge the same patches in our tree and let git figure it out.
> 
> Maxime
> 



Re: [GIT PULL FOR v4.20 (request_api branch)] Add Allwinner cedrus decoder driver

2018-09-11 Thread Maxime Ripard
Hi Hans,

On Mon, Sep 10, 2018 at 10:34:53AM +0200, Hans Verkuil wrote:
> This is the cedrus Allwinner decoder driver. It is for the request_api topic
> branch, but it assumes that this pull request is applied first:
> https://patchwork.linuxtv.org/patch/51889/
> 
> The last two patches could optionally be squashed with the main driver patch:
> they fix COMPILE_TEST issues. I decided not to squash them and leave the 
> choice
> to you.
> 
> This won't fully fix the COMPILE_TEST problems, for that another patch is 
> needed:
> 
> https://lore.kernel.org/patchwork/patch/983848/
> 
> But that's going through another subsystem.
> 
> Many, many thanks go to Paul for working on this, trying to keep up to date 
> with
> the Request API changes at the same time. It was a pleasure working with you 
> on
> this!
>
> Regards,
> 
>   Hans
> 
> The following changes since commit 051dfd971de1317626d322581546257b748ebde1:
> 
>   media-request: update documentation (2018-09-04 11:34:57 +0200)
> 
> are available in the Git repository at:
> 
>   git://linuxtv.org/hverkuil/media_tree.git cedrus
> 
> for you to fetch changes up to e035b190fac3735e5f9d3c96cee5afc82aa1a94d:
> 
>   media: cedrus: Select the sunxi SRAM driver in Kconfig (2018-09-10 10:22:07 
> +0200)
> 
> 
> Paul Kocialkowski (13):
>   media: videobuf2-core: Rework and rename helper for request buffer count
>   media: v4l: Add definitions for MPEG-2 slice format and metadata
>   media: v4l: Add definition for the Sunxi tiled NV12 format
>   dt-bindings: media: Document bindings for the Cedrus VPU driver
>   media: platform: Add Cedrus VPU decoder driver
>   ARM: dts: sun5i: Add Video Engine and reserved memory nodes
>   ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes
>   ARM: dts: sun8i-a33: Add Video Engine and reserved memory nodes
>   ARM: dts: sun8i-h3: Add Video Engine and reserved memory nodes
>   media: cedrus: Fix error reporting in request validation
>   media: cedrus: Add TODO file with tasks to complete before unstaging
>   media: cedrus: Wrap PHYS_PFN_OFFSET with ifdef and add dedicated comment
>   media: cedrus: Select the sunxi SRAM driver in Kconfig
> 
>  Documentation/devicetree/bindings/media/cedrus.txt |  54 +
>  Documentation/media/uapi/v4l/extended-controls.rst | 176 
>  Documentation/media/uapi/v4l/pixfmt-compressed.rst |  16 ++
>  Documentation/media/uapi/v4l/pixfmt-reserved.rst   |  15 +-
>  Documentation/media/uapi/v4l/vidioc-queryctrl.rst  |  14 +-
>  Documentation/media/videodev2.h.rst.exceptions |   2 +
>  MAINTAINERS|   7 +
>  arch/arm/boot/dts/sun5i.dtsi   |  26 +++
>  arch/arm/boot/dts/sun7i-a20.dtsi   |  26 +++
>  arch/arm/boot/dts/sun8i-a33.dtsi   |  26 +++
>  arch/arm/boot/dts/sun8i-h3.dtsi|  25 +++

Sorry for not noticing it earlier, but we'll want to merge the
arch/arm/boot/dts/* changes through arm-soc, to reduce the merge
conflicts.

I guess we can do it through several ways, depending on what's the
most convenient for you:

  - Drop the patches in your PR,
  - Send a revert patch as an additional patch on top of your current PR
  - Or just merge the same patches in our tree and let git figure it out.

Maxime

-- 
Maxime Ripard, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com


signature.asc
Description: PGP signature


[GIT PULL FOR v4.20 (request_api branch)] Add Allwinner cedrus decoder driver

2018-09-10 Thread Hans Verkuil
Hi Mauro,

This is the cedrus Allwinner decoder driver. It is for the request_api topic
branch, but it assumes that this pull request is applied first:
https://patchwork.linuxtv.org/patch/51889/

The last two patches could optionally be squashed with the main driver patch:
they fix COMPILE_TEST issues. I decided not to squash them and leave the choice
to you.

This won't fully fix the COMPILE_TEST problems, for that another patch is 
needed:

https://lore.kernel.org/patchwork/patch/983848/

But that's going through another subsystem.

Many, many thanks go to Paul for working on this, trying to keep up to date with
the Request API changes at the same time. It was a pleasure working with you on
this!

Regards,

Hans

The following changes since commit 051dfd971de1317626d322581546257b748ebde1:

  media-request: update documentation (2018-09-04 11:34:57 +0200)

are available in the Git repository at:

  git://linuxtv.org/hverkuil/media_tree.git cedrus

for you to fetch changes up to e035b190fac3735e5f9d3c96cee5afc82aa1a94d:

  media: cedrus: Select the sunxi SRAM driver in Kconfig (2018-09-10 10:22:07 
+0200)


Paul Kocialkowski (13):
  media: videobuf2-core: Rework and rename helper for request buffer count
  media: v4l: Add definitions for MPEG-2 slice format and metadata
  media: v4l: Add definition for the Sunxi tiled NV12 format
  dt-bindings: media: Document bindings for the Cedrus VPU driver
  media: platform: Add Cedrus VPU decoder driver
  ARM: dts: sun5i: Add Video Engine and reserved memory nodes
  ARM: dts: sun7i-a20: Add Video Engine and reserved memory nodes
  ARM: dts: sun8i-a33: Add Video Engine and reserved memory nodes
  ARM: dts: sun8i-h3: Add Video Engine and reserved memory nodes
  media: cedrus: Fix error reporting in request validation
  media: cedrus: Add TODO file with tasks to complete before unstaging
  media: cedrus: Wrap PHYS_PFN_OFFSET with ifdef and add dedicated comment
  media: cedrus: Select the sunxi SRAM driver in Kconfig

 Documentation/devicetree/bindings/media/cedrus.txt |  54 +
 Documentation/media/uapi/v4l/extended-controls.rst | 176 
 Documentation/media/uapi/v4l/pixfmt-compressed.rst |  16 ++
 Documentation/media/uapi/v4l/pixfmt-reserved.rst   |  15 +-
 Documentation/media/uapi/v4l/vidioc-queryctrl.rst  |  14 +-
 Documentation/media/videodev2.h.rst.exceptions |   2 +
 MAINTAINERS|   7 +
 arch/arm/boot/dts/sun5i.dtsi   |  26 +++
 arch/arm/boot/dts/sun7i-a20.dtsi   |  26 +++
 arch/arm/boot/dts/sun8i-a33.dtsi   |  26 +++
 arch/arm/boot/dts/sun8i-h3.dtsi|  25 +++
 drivers/media/common/videobuf2/videobuf2-core.c|  18 +-
 drivers/media/common/videobuf2/videobuf2-v4l2.c|   2 +-
 drivers/media/v4l2-core/v4l2-ctrls.c   |  63 ++
 drivers/media/v4l2-core/v4l2-ioctl.c   |   2 +
 drivers/staging/media/Kconfig  |   2 +
 drivers/staging/media/Makefile |   1 +
 drivers/staging/media/sunxi/Kconfig|  15 ++
 drivers/staging/media/sunxi/Makefile   |   1 +
 drivers/staging/media/sunxi/cedrus/Kconfig |  14 ++
 drivers/staging/media/sunxi/cedrus/Makefile|   3 +
 drivers/staging/media/sunxi/cedrus/TODO|   7 +
 drivers/staging/media/sunxi/cedrus/cedrus.c| 431 
+++
 drivers/staging/media/sunxi/cedrus/cedrus.h| 165 +++
 drivers/staging/media/sunxi/cedrus/cedrus_dec.c|  70 +++
 drivers/staging/media/sunxi/cedrus/cedrus_dec.h|  27 +++
 drivers/staging/media/sunxi/cedrus/cedrus_hw.c | 327 
+
 drivers/staging/media/sunxi/cedrus/cedrus_hw.h |  30 +++
 drivers/staging/media/sunxi/cedrus/cedrus_mpeg2.c  | 237 +
 drivers/staging/media/sunxi/cedrus/cedrus_regs.h   | 233 +
 drivers/staging/media/sunxi/cedrus/cedrus_video.c  | 544 
+
 drivers/staging/media/sunxi/cedrus/cedrus_video.h  |  30 +++
 include/media/v4l2-ctrls.h |  18 +-
 include/media/videobuf2-core.h |   4 +-
 include/uapi/linux/v4l2-controls.h |  65 ++
 include/uapi/linux/videodev2.h |   6 +
 36 files changed, 2679 insertions(+), 23 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/media/cedrus.txt
 create mode 100644 drivers/staging/media/sunxi/Kconfig
 create mode 100644 drivers/staging/media/sunxi/Makefile
 create mode 100644 drivers/staging/media/sunxi/cedrus/Kconfig
 create mode 100644 drivers/staging/media/sunxi/cedrus/Makefile
 create mode 100644 drivers/staging/media/sunxi/cedrus/TODO
 create mode 100644 drivers/staging/media/sunxi/cedrus/cedrus.c