Skip to content

Commit

Permalink
media: rkvdec: Add the rkvdec driver
Browse files Browse the repository at this point in the history
The rockchip vdec block is a stateless decoder that's able to decode
H264, HEVC and VP9 content. This commit adds the core infrastructure
and the H264 backend. Support for VP9 and HEVS will be added later on.

[[email protected]: select MEDIA_CONTROLLER and REQUEST_API]
Signed-off-by: Boris Brezillon <[email protected]>
Signed-off-by: Ezequiel Garcia <[email protected]>
Tested-by: Nicolas Dufresne <[email protected]>
Signed-off-by: Hans Verkuil <[email protected]>
Signed-off-by: Mauro Carvalho Chehab <[email protected]>
  • Loading branch information
bbrezillon authored and mchehab committed Apr 21, 2020
1 parent d6b50a9 commit cd33c83
Show file tree
Hide file tree
Showing 10 changed files with 2,643 additions and 0 deletions.
7 changes: 7 additions & 0 deletions MAINTAINERS
Original file line number Diff line number Diff line change
Expand Up @@ -14465,6 +14465,13 @@ F: Documentation/ABI/*/sysfs-driver-hid-roccat*
F: drivers/hid/hid-roccat*
F: include/linux/hid-roccat*

ROCKCHIP VIDEO DECODER DRIVER
M: Ezequiel Garcia <[email protected]>
L: [email protected]
S: Maintained
F: drivers/staging/media/rkvdec/
F: Documentation/devicetree/bindings/media/rockchip,vdec.yaml

ROCKCHIP ISP V1 DRIVER
M: Helen Koike <[email protected]>
L: [email protected]
Expand Down
2 changes: 2 additions & 0 deletions drivers/staging/media/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,8 @@ source "drivers/staging/media/meson/vdec/Kconfig"

source "drivers/staging/media/omap4iss/Kconfig"

source "drivers/staging/media/rkvdec/Kconfig"

source "drivers/staging/media/sunxi/Kconfig"

source "drivers/staging/media/tegra-vde/Kconfig"
Expand Down
1 change: 1 addition & 0 deletions drivers/staging/media/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ obj-$(CONFIG_VIDEO_ALLEGRO_DVT) += allegro-dvt/
obj-$(CONFIG_VIDEO_IMX_MEDIA) += imx/
obj-$(CONFIG_VIDEO_MESON_VDEC) += meson/vdec/
obj-$(CONFIG_VIDEO_OMAP4) += omap4iss/
obj-$(CONFIG_VIDEO_ROCKCHIP_VDEC) += rkvdec/
obj-$(CONFIG_VIDEO_SUNXI) += sunxi/
obj-$(CONFIG_TEGRA_VDE) += tegra-vde/
obj-$(CONFIG_VIDEO_HANTRO) += hantro/
Expand Down
16 changes: 16 additions & 0 deletions drivers/staging/media/rkvdec/Kconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
# SPDX-License-Identifier: GPL-2.0
config VIDEO_ROCKCHIP_VDEC
tristate "Rockchip Video Decoder driver"
depends on ARCH_ROCKCHIP || COMPILE_TEST
depends on VIDEO_DEV && VIDEO_V4L2
select MEDIA_CONTROLLER
select MEDIA_CONTROLLER_REQUEST_API
select VIDEOBUF2_DMA_CONTIG
select VIDEOBUF2_VMALLOC
select V4L2_MEM2MEM_DEV
select V4L2_H264
help
Support for the Rockchip Video Decoder IP present on Rockchip SoCs,
which accelerates video decoding.
To compile this driver as a module, choose M here: the module
will be called rockchip-vdec.
3 changes: 3 additions & 0 deletions drivers/staging/media/rkvdec/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
obj-$(CONFIG_VIDEO_ROCKCHIP_VDEC) += rockchip-vdec.o

rockchip-vdec-y += rkvdec.o rkvdec-h264.o
11 changes: 11 additions & 0 deletions drivers/staging/media/rkvdec/TODO
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
* Support for VP9 is planned for this driver.

Given the V4L controls for those CODECs will be part of
the uABI, it will be required to have the driver in staging.

For this reason, we are keeping this driver in staging for now.

* Evaluate introducing a helper to consolidate duplicated
code in rkvdec_request_validate and cedrus_request_validate.
The helper needs to the driver private data associated with
the videobuf2 queue, from a media request.
Loading

0 comments on commit cd33c83

Please sign in to comment.