Add Rockchip VPU JPEG encoder
Subsystems (4)
v9 cover Add Rockchip VPU JPEG encoder
Hi everyone,
This is a quick respin addressing Hans' feedback
on the v8 version (see previous series for more details [1]).
Long story short:
This new version supports V4L2_PIX_FMT_JPEG capture format, which means standard userspace can be used, such as gstreamer:
gst-launch-1.0 videotestsrc ! v4l2jpegenc extra-controls="c,compression_quality=95" ! ...
The hardware produces a JPEG scan (i.e. without the start JPEG headers), so the driver has to add the needed headers. Note that the hardware produces a EOI marker at the end of the JPEG scan.
[1] https://www.mail-archive.com/[email protected]/msg136539.html
Future work
-----------
* factorization of default JPEG tables, with other JPEG drivers such as CODA.
* factorization of the fill_fmt functions.
* removal of bounce buffer via APPn marker padding.
I'd like to pospone such factorization until after this driver is merged, to avoid delaying this work any further.
In addition to this, it would be interesting to add user controls to specify the quantization tables. It's not yet clear how this control would interact with the JPEG compression quality control, and so it needs some discussion.
Compliance output
-----------------
root@ficus:~# v4l2-compliance -d /dev/video3 -s v4l2-compliance SHA: d0f4ea7ddab6d0244c4fe1e960bb2aaeefb911b9, 64 bits
Compliance test for device /dev/video3:
Driver Info:
Driver name : rockchip-vpu Card type : rockchip,rk3399-vpu-enc Bus info : platform: rockchip-vpu Driver version : 4.20.0 Capabilities : 0x84204000
Video Memory-to-Memory Multiplanar Streaming
Extended Pix Format
Device Capabilities
Device Caps : 0x04204000
Video Memory-to-Memory Multiplanar Streaming
Extended Pix Format
Media Driver Info:
Driver name : rockchip-vpu Model : rockchip-vpu Serial : Bus info : Media version : 4.20.0 Hardware revision: 0x00000000 (0) Driver version : 4.20.0 Interface Info: ID : 0x0300000c Type : V4L Video Entity Info: ID : 0x00000001 (1) Name : rockchip,rk3399-vpu-enc-source Function : V4L2 I/O Pad 0x01000002 : 0: Source Link 0x02000008: to remote pad 0x1000005 of entity 'rockchip,rk3399-vpu-enc-proc': Data, Enabled, Immutable
Required ioctls:
test MC information (see 'Media Driver Info' above): OK test VIDIOC_QUERYCAP: OK
Allow for multiple opens:
test second /dev/video3 open: OK
test VIDIOC_QUERYCAP: OK
test VIDIOC_G/S_PRIORITY: OK
test for unlimited opens: OK
Debug ioctls:
test VIDIOC_DBG_G/S_REGISTER: OK (Not Supported) test VIDIOC_LOG_STATUS: OK (Not Supported)
Input ioctls:
test VIDIOC_G/S_TUNER/ENUM_FREQ_BANDS: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_S_HW_FREQ_SEEK: OK (Not Supported) test VIDIOC_ENUMAUDIO: OK (Not Supported)
test VIDIOC_G/S/ENUMINPUT: OK (Not Supported) test VIDIOC_G/S_AUDIO: OK (Not Supported)
Inputs: 0 Audio Inputs: 0 Tuners: 0
Output ioctls:
test VIDIOC_G/S_MODULATOR: OK (Not Supported) test VIDIOC_G/S_FREQUENCY: OK (Not Supported) test VIDIOC_ENUMAUDOUT: OK (Not Supported) test VIDIOC_G/S/ENUMOUTPUT: OK (Not Supported) test VIDIOC_G/S_AUDOUT: OK (Not Supported)
Outputs: 0 Audio Outputs: 0 Modulators: 0
Input/Output configuration ioctls:
test VIDIOC_ENUM/G/S/QUERY_STD: OK (Not Supported) test VIDIOC_ENUM/G/S/QUERY_DV_TIMINGS: OK (Not Supported) test VIDIOC_DV_TIMINGS_CAP: OK (Not Supported) test VIDIOC_G/S_EDID: OK (Not Supported)
Control ioctls:
test VIDIOC_QUERY_EXT_CTRL/QUERYMENU: OK test VIDIOC_QUERYCTRL: OK
test VIDIOC_G/S_CTRL: OK
test VIDIOC_G/S/TRY_EXT_CTRLS: OK test VIDIOC_(UN)SUBSCRIBE_EVENT/DQEVENT: OK test VIDIOC_G/S_JPEGCOMP: OK (Not Supported) Standard Controls: 2 Private Controls: 0
Format ioctls:
test VIDIOC_ENUM_FMT/FRAMESIZES/FRAMEINTERVALS: OK test VIDIOC_G/S_PARM: OK (Not Supported) test VIDIOC_G_FBUF: OK (Not Supported) test VIDIOC_G_FMT: OK
test VIDIOC_TRY_FMT: OK
test VIDIOC_S_FMT: OK
test VIDIOC_G_SLICED_VBI_CAP: OK (Not Supported) test Cropping: OK (Not Supported)
test Composing: OK (Not Supported)
test Scaling: OK
Codec ioctls:
test VIDIOC_(TRY_)ENCODER_CMD: OK (Not Supported) test VIDIOC_G_ENC_INDEX: OK (Not Supported) test VIDIOC_(TRY_)DECODER_CMD: OK (Not Supported)
Buffer ioctls:
test VIDIOC_REQBUFS/CREATE_BUFS/QUERYBUF: OK test VIDIOC_EXPBUF: OK
Test input 0:
Streaming ioctls:
test read/write: OK (Not Supported)
test blocking wait: OK
Video Capture Multiplanar: Captured 57 buffers test MMAP: OK
test USERPTR: OK (Not Supported)
test DMABUF: Cannot test, specify --expbuf-device
Total: 48, Succeeded: 48, Failed: 0, Warnings: 0
Ezequiel Garcia (3):
ARM: dts: rockchip: add VPU device node for RK3288
arm64: dts: rockchip: add VPU device node for RK3399
media: add Rockchip VPU JPEG encoder driver
MAINTAINERS | 7 + arch/arm/boot/dts/rk3288.dtsi | 14 +- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +- drivers/staging/media/Kconfig | 2 + drivers/staging/media/Makefile | 1 + drivers/staging/media/rockchip/vpu/Kconfig | 14 + drivers/staging/media/rockchip/vpu/Makefile | 10 + drivers/staging/media/rockchip/vpu/TODO | 6 + .../media/rockchip/vpu/rk3288_vpu_hw.c | 118 +++ .../rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c | 133 ++++ .../media/rockchip/vpu/rk3288_vpu_regs.h | 442 +++++++++++ .../media/rockchip/vpu/rk3399_vpu_hw.c | 118 +++ .../rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c | 160 ++++ .../media/rockchip/vpu/rk3399_vpu_regs.h | 600 +++++++++++++++ .../staging/media/rockchip/vpu/rockchip_vpu.h | 237 ++++++ .../media/rockchip/vpu/rockchip_vpu_common.h | 29 + .../media/rockchip/vpu/rockchip_vpu_drv.c | 535 +++++++++++++ .../media/rockchip/vpu/rockchip_vpu_enc.c | 702 ++++++++++++++++++ .../media/rockchip/vpu/rockchip_vpu_hw.h | 58 ++ .../media/rockchip/vpu/rockchip_vpu_jpeg.c | 289 +++++++ .../media/rockchip/vpu/rockchip_vpu_jpeg.h | 12 + 21 files changed, 3499 insertions(+), 2 deletions(-) create mode 100644 drivers/staging/media/rockchip/vpu/Kconfig create mode 100644 drivers/staging/media/rockchip/vpu/Makefile create mode 100644 drivers/staging/media/rockchip/vpu/TODO create mode 100644 drivers/staging/media/rockchip/vpu/rk3288_vpu_hw.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3288_vpu_regs.h create mode 100644 drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3399_vpu_regs.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_common.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_hw.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.c create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.h
Signature · 1 line
2.19.1
A message that is not in the archive (sent off-list or not yet received): 20181120212059.29244-1-ezequiel-ZGY8ohtN/[email protected]
PATCH v9 1/3 ARM: dts: rockchip: add VPU device node for RK3288
Add the Video Processing Unit node for RK3288 SoC.
Fix the VPU IOMMU node, which was disabled and lacking its power domain property.
--- arch/arm/boot/dts/rk3288.dtsi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
arch/arm/boot/dts/rk3288.dtsi +13 -1
@@ -1223,6 +1223,18 @@ }; }; + vpu: video-codec@ff9a0000 { + compatible = "rockchip,rk3288-vpu"; + reg = <0x0 0xff9a0000 0x0 0x800>; + interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>, + <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>; + interrupt-names = "vepu", "vdpu"; + clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>; + clock-names = "aclk", "hclk"; + power-domains = <&power RK3288_PD_VIDEO>; + iommus = <&vpu_mmu>; + }; + vpu_mmu: iommu@ff9a0800 { compatible = "rockchip,iommu"; reg = <0x0 0xff9a0800 0x0 0x100>;
@@ -1230,8 +1242,8 @@ interrupt-names = "vpu_mmu"; clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>; clock-names = "aclk", "iface"; + power-domains = <&power RK3288_PD_VIDEO>; #iommu-cells = <0>; - status = "disabled"; }; hevc_mmu: iommu@ff9c0440 {
Signature · 1 line
2.19.1
PATCH v9 2/3 arm64: dts: rockchip: add VPU device node for RK3399
In reply to a message not in the archiveAdd the Video Processing Unit node for the RK3399 SoC.
Also, fix the VPU IOMMU node, which was disabled and lacking its power domain property.
--- arch/arm64/boot/dts/rockchip/rk3399.dtsi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)
arch/arm64/boot/dts/rockchip/rk3399.dtsi +13 -1
@@ -1226,6 +1226,18 @@ status = "disabled"; }; + vpu: video-codec@ff650000 { + compatible = "rockchip,rk3399-vpu"; + reg = <0x0 0xff650000 0x0 0x800>; + interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH 0>, + <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH 0>; + interrupt-names = "vepu", "vdpu"; + clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>; + clock-names = "aclk", "hclk"; + power-domains = <&power RK3399_PD_VCODEC>; + iommus = <&vpu_mmu>; + }; + vpu_mmu: iommu@ff650800 { compatible = "rockchip,iommu"; reg = <0x0 0xff650800 0x0 0x40>;
@@ -1233,8 +1245,8 @@ interrupt-names = "vpu_mmu"; clocks = <&cru ACLK_VCODEC>, <&cru HCLK_VCODEC>; clock-names = "aclk", "iface"; + power-domains = <&power RK3399_PD_VCODEC>; #iommu-cells = <0>; - status = "disabled"; }; vdec_mmu: iommu@ff660480 {
Signature · 1 line
2.19.1
PATCH v9 3/3 media: add Rockchip VPU JPEG encoder driver
In reply to a message not in the archiveAdd a mem2mem driver for the VPU available on Rockchip SoCs. Currently only JPEG encoding is supported, for RK3399 and RK3288 platforms.
--- MAINTAINERS | 7 + drivers/staging/media/Kconfig | 2 + drivers/staging/media/Makefile | 1 + drivers/staging/media/rockchip/vpu/Kconfig | 14 + drivers/staging/media/rockchip/vpu/Makefile | 10 + drivers/staging/media/rockchip/vpu/TODO | 6 + .../media/rockchip/vpu/rk3288_vpu_hw.c | 118 +++ .../rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c | 133 ++++ .../media/rockchip/vpu/rk3288_vpu_regs.h | 442 +++++++++++ .../media/rockchip/vpu/rk3399_vpu_hw.c | 118 +++ .../rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c | 160 ++++ .../media/rockchip/vpu/rk3399_vpu_regs.h | 600 +++++++++++++++ .../staging/media/rockchip/vpu/rockchip_vpu.h | 237 ++++++ .../media/rockchip/vpu/rockchip_vpu_common.h | 29 + .../media/rockchip/vpu/rockchip_vpu_drv.c | 535 +++++++++++++ .../media/rockchip/vpu/rockchip_vpu_enc.c | 702 ++++++++++++++++++ .../media/rockchip/vpu/rockchip_vpu_hw.h | 58 ++ .../media/rockchip/vpu/rockchip_vpu_jpeg.c | 289 +++++++ .../media/rockchip/vpu/rockchip_vpu_jpeg.h | 12 + 19 files changed, 3473 insertions(+) create mode 100644 drivers/staging/media/rockchip/vpu/Kconfig create mode 100644 drivers/staging/media/rockchip/vpu/Makefile create mode 100644 drivers/staging/media/rockchip/vpu/TODO create mode 100644 drivers/staging/media/rockchip/vpu/rk3288_vpu_hw.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3288_vpu_regs.h create mode 100644 drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3399_vpu_regs.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_common.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_hw.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.c create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.h
MAINTAINERS +7 -0
@@ -12742,6 +12742,13 @@ S: Maintained F: drivers/media/platform/rockchip/rga/ F: Documentation/devicetree/bindings/media/rockchip-rga.txt +ROCKCHIP VPU CODEC DRIVER +M: Ezequiel Garcia <ezequiel-ZGY8ohtN/[email protected]> +L: [email protected] +S: Maintained +F: drivers/staging/media/platform/rockchip/vpu/ +F: Documentation/devicetree/bindings/media/rockchip-vpu.txt + ROCKER DRIVER M: Jiri Pirko <[email protected]> L: [email protected]
drivers/staging/media/Kconfig +2 -0
@@ -31,6 +31,8 @@ source "drivers/staging/media/mt9t031/Kconfig" source "drivers/staging/media/omap4iss/Kconfig" +source "drivers/staging/media/rockchip/vpu/Kconfig" + source "drivers/staging/media/sunxi/Kconfig" source "drivers/staging/media/tegra-vde/Kconfig"
drivers/staging/media/Makefile +1 -0
@@ -8,3 +8,4 @@ obj-$(CONFIG_VIDEO_OMAP4) += omap4iss/ obj-$(CONFIG_VIDEO_SUNXI) += sunxi/ obj-$(CONFIG_TEGRA_VDE) += tegra-vde/ obj-$(CONFIG_VIDEO_ZORAN) += zoran/ +obj-$(CONFIG_VIDEO_ROCKCHIP_VPU) += rockchip/vpu/
drivers/staging/media/rockchip/vpu/Kconfig new file +14 -0
@@ -0,0 +1,14 @@ +config VIDEO_ROCKCHIP_VPU + tristate "Rockchip VPU driver" + depends on ARCH_ROCKCHIP || COMPILE_TEST + depends on VIDEO_DEV && VIDEO_V4L2 && MEDIA_CONTROLLER + select VIDEOBUF2_DMA_CONTIG + select VIDEOBUF2_VMALLOC + select V4L2_MEM2MEM_DEV + default n + help + Support for the Video Processing Unit present on Rockchip SoC, + which accelerates video and image encoding and decoding. + To compile this driver as a module, choose M here: the module + will be called rockchip-vpu. +
drivers/staging/media/rockchip/vpu/Makefile new file +10 -0
@@ -0,0 +1,10 @@ +obj-$(CONFIG_VIDEO_ROCKCHIP_VPU) += rockchip-vpu.o + +rockchip-vpu-y += \ + rockchip_vpu_drv.o \ + rockchip_vpu_enc.o \ + rk3288_vpu_hw.o \ + rk3288_vpu_hw_jpeg_enc.o \ + rk3399_vpu_hw.o \ + rk3399_vpu_hw_jpeg_enc.o \ + rockchip_vpu_jpeg.o
drivers/staging/media/rockchip/vpu/TODO new file +6 -0
@@ -0,0 +1,6 @@ +Support for VP8, VP9 and H264 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.
drivers/staging/media/rockchip/vpu/rk3288_vpu_hw.c new file +118 -0
118 lines not on this page · raw message
drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c new file +133 -0
133 lines not on this page · raw message
drivers/staging/media/rockchip/vpu/rk3288_vpu_regs.h new file +442 -0
442 lines not on this page · raw message
drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c new file +118 -0
118 lines not on this page · raw message
drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c new file +160 -0
160 lines not on this page · raw message
drivers/staging/media/rockchip/vpu/rk3399_vpu_regs.h new file +600 -0
600 lines not on this page · raw message
drivers/staging/media/rockchip/vpu/rockchip_vpu.h new file +237 -0
237 lines not on this page · raw message
drivers/staging/media/rockchip/vpu/rockchip_vpu_common.h new file +29 -0
@@ -0,0 +1,29 @@ +// SPDX-License-Identifier: GPL-2.0 +/* +* Rockchip VPU codec driver +* +* Copyright (C) 2018 Rockchip Electronics Co., Ltd. +* Alpha Lin <[email protected]> +* Jeffy Chen <[email protected]> +* +* Copyright (C) 2018 Google, Inc. +* Tomasz Figa <[email protected]> +* +* Based on s5p-mfc driver by Samsung Electronics Co., Ltd. +* Copyright (C) 2011 Samsung Electronics Co., Ltd. +*/ + +#ifndef ROCKCHIP_VPU_COMMON_H_ +#define ROCKCHIP_VPU_COMMON_H_ + +#include "rockchip_vpu.h" + +extern const struct v4l2_ioctl_ops rockchip_vpu_enc_ioctl_ops; +extern const struct vb2_ops rockchip_vpu_enc_queue_ops; + +void rockchip_vpu_enc_reset_src_fmt (struct rockchip_vpu_dev *vpu, +struct rockchip_vpu_ctx *ctx); +void rockchip_vpu_enc_reset_dst_fmt (struct rockchip_vpu_dev *vpu, +struct rockchip_vpu_ctx *ctx); + +#endif /* ROCKCHIP_VPU_COMMON_H_ */
drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c new file +535 -0
535 lines not on this page · raw message
drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c new file +702 -0
573 lines not on this page · raw message
drivers/staging/media/rockchip/vpu/rockchip_vpu_hw.h new file +58 -0
58 lines not on this page · raw message
drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.c new file +289 -0
289 lines not on this page · raw message
drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.h new file +12 -0
Lines of this file are not shown. View the raw message.
The rest of this diff is not shown. View the raw message.
Signature · 1 line
2.19.1
Part of the diff is not shown here. View the raw message.
A message that is not in the archive (sent off-list or not yet received): 20181120212059.29244-4-ezequiel-ZGY8ohtN/[email protected]
Re: [PATCH v9 3/3] media: add Rockchip VPU JPEG encoder driver
Quoted 43 lines · 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 <ezequiel-ZGY8ohtN/[email protected]>--- MAINTAINERS | 7 + drivers/staging/media/Kconfig | 2 + drivers/staging/media/Makefile | 1 + drivers/staging/media/rockchip/vpu/Kconfig | 14 + drivers/staging/media/rockchip/vpu/Makefile | 10 + drivers/staging/media/rockchip/vpu/TODO | 6 + .../media/rockchip/vpu/rk3288_vpu_hw.c | 118 +++ .../rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c | 133 ++++ .../media/rockchip/vpu/rk3288_vpu_regs.h | 442 +++++++++++ .../media/rockchip/vpu/rk3399_vpu_hw.c | 118 +++ .../rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c | 160 ++++ .../media/rockchip/vpu/rk3399_vpu_regs.h | 600 +++++++++++++++ .../staging/media/rockchip/vpu/rockchip_vpu.h | 237 ++++++ .../media/rockchip/vpu/rockchip_vpu_common.h | 29 + .../media/rockchip/vpu/rockchip_vpu_drv.c | 535 +++++++++++++ .../media/rockchip/vpu/rockchip_vpu_enc.c | 702 ++++++++++++++++++ .../media/rockchip/vpu/rockchip_vpu_hw.h | 58 ++ .../media/rockchip/vpu/rockchip_vpu_jpeg.c | 289 +++++++ .../media/rockchip/vpu/rockchip_vpu_jpeg.h | 12 + 19 files changed, 3473 insertions(+) create mode 100644 drivers/staging/media/rockchip/vpu/Kconfig create mode 100644 drivers/staging/media/rockchip/vpu/Makefile create mode 100644 drivers/staging/media/rockchip/vpu/TODO create mode 100644 drivers/staging/media/rockchip/vpu/rk3288_vpu_hw.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3288_vpu_hw_jpeg_enc.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3288_vpu_regs.h create mode 100644 drivers/staging/media/rockchip/vpu/rk3399_vpu_hw.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3399_vpu_hw_jpeg_enc.c create mode 100644 drivers/staging/media/rockchip/vpu/rk3399_vpu_regs.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_common.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_drv.c create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_enc.c create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_hw.h create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.c create mode 100644 drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.h
<snip>
Quoted 10 lines
drivers/staging/media/rockchip/vpu/Kconfig new file +4
-0@@ -0,0 +1,14 @@ +config VIDEO_ROCKCHIP_VPU + tristate "Rockchip VPU driver" + depends on ARCH_ROCKCHIP || COMPILE_TEST + depends on VIDEO_DEV && VIDEO_V4L2 && MEDIA_CONTROLLER
drivers/staging/media/rockchip/vpu/Kconfig line 14
Quoted 10 lines
drivers/staging/media/rockchip/vpu/Kconfig new file +10
-0+ select VIDEOBUF2_DMA_CONTIG + select VIDEOBUF2_VMALLOC + select V4L2_MEM2MEM_DEV + default n + help + Support for the Video Processing Unit present on Rockchip SoC, + which accelerates video and image encoding and decoding. + To compile this driver as a module, choose M here: the module + will be called rockchip-vpu. +
checkpatch warns about empty line at the end of the Kconfig
<snip>
drivers/staging/media/rockchip/vpu/rk3288_vpu_regs.h line 1
Quoted 7 lines
drivers/staging/media/rockchip/vpu/rk3288_vpu_regs.h new file +1
-0@@ -0,0 +1,442 @@ +// SPDX-License-Identifier: GPL-2.0
Headers must use /* */ for the SPDX license. Sorry, I didn't make up these rules.
In any case, checkpatch.pl --strict complains about it.
<snip>
drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.c
Quoted 6 lines
drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.c new file +0
-0@@ -0,0 +1,289 @@
Missing SPDX license!
Quoted 7 lines
drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.c new file +7
-0+/* +* Copyright (C) Collabora, Ltd. +* +* Based on GSPCA and CODA drivers: +* Copyright (C) Jean-Francois Moine (http://moinejf.free.fr) +* Copyright (C) 2014 Philipp Zabel, Pengutronix +*/
<snip>
drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.h
Quoted 6 lines
drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.h new file +0
-0@@ -0,0 +1,12 @@
Missing SPDX license!
drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.h line 12
Quoted 13 lines
drivers/staging/media/rockchip/vpu/rockchip_vpu_jpeg.h new file +12
-0+#define JPEG_HEADER_SIZE 601 + +struct rockchip_vpu_jpeg_ctx { +int width; +int height; +int quality; +unsigned char *buffer; +}; + +unsigned char * +rockchip_vpu_jpeg_get_qtable (struct rockchip_vpu_jpeg_ctx *ctx,int index); +void rockchip_vpu_jpeg_render (struct rockchip_vpu_jpeg_ctx *ctx);
So close...
Regards,
Hans