Add Rockchip VPU JPEG encoder
Subsystems (3)
v10 cover Add Rockchip VPU JPEG encoder
This series is based on Mauro's master branch,
with the following patch applied:
https://patchwork.kernel.org/patch/10676149/
Hans,
If you think the driver is now ready, I'd like to merge only patches 1/4 and 4/4 (the driver per-se) via the media tree.
The devicetree changes could go via Heiko's tree.
v10:
* Fix SPDX syntax
* Add missing patch with binding documentation
* Remove white line in Kconfig
v9:
* Address some style comments from Hans.
* Fix TODO file
v8:
* Drop new JPEG_RAW format.
* Drop quantization table user controls.
* Add JPEG headers to produce JPEG frames.
Ezequiel Garcia (4):
media: dt-bindings: Document the Rockchip VPU bindings
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
.../bindings/media/rockchip-vpu.txt | 29 + 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 | 13 + 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 | 290 ++++++++ .../media/rockchip/vpu/rockchip_vpu_jpeg.h | 14 + 22 files changed, 3530 insertions(+), 2 deletions(-) create mode 100644 Documentation/devicetree/bindings/media/rockchip-vpu.txt 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): 20181121191652.22814-1-ezequiel-ZGY8ohtN/[email protected]
PATCH v10 1/4 media: dt-bindings: Document the Rockchip VPU bindings
Add devicetree binding documentation for Rockchip Video Processing Unit IP.
--- .../bindings/media/rockchip-vpu.txt | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rockchip-vpu.txt
Documentation/devicetree/bindings/media/rockchip-vpu.txt new file +29 -0
@@ -0,0 +1,29 @@ +device-tree bindings for rockchip VPU codec + +Rockchip (Video Processing Unit) present in various Rockchip platforms, +such as RK3288 and RK3399. + +Required properties: +- compatible: value should be one of the following + "rockchip,rk3288-vpu"; + "rockchip,rk3399-vpu"; +- interrupts: encoding and decoding interrupt specifiers +- interrupt-names: should be "vepu" and "vdpu" +- clocks: phandle to VPU aclk, hclk clocks +- clock-names: should be "aclk" and "hclk" +- power-domains: phandle to power domain node +- iommus: phandle to a iommu node + +Example: +SoC-specific DT entry: + 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>; + };
Signature · 1 line
2.19.1
A message that is not in the archive (sent off-list or not yet received): 20181121191652.22814-2-ezequiel-ZGY8ohtN/[email protected]
Re: [PATCH v10 1/4] media: dt-bindings: Document the Rockchip VPU bindings
Quoted 5 lines · Ezequiel Garcia
Add devicetree binding documentation for Rockchip Video Processing Unit IP.
Reviewed-by Rob Herring <[email protected]>Signed-off-by Ezequiel Garcia <ezequiel-ZGY8ohtN/[email protected]>
This one has been merged already.
Regards,
Hans
Quoted 41 lines
--- .../bindings/media/rockchip-vpu.txt | 29 +++++++++++++++++++ 1 file changed, 29 insertions(+) create mode 100644 Documentation/devicetree/bindings/media/rockchip-vpu.txtDocumentation/devicetree/bindings/media/rockchip-vpu.txt new file +29
-0@@ -0,0 +1,29 @@ +device-tree bindings for rockchip VPU codec + +Rockchip (Video Processing Unit) present in various Rockchip platforms, +such as RK3288 and RK3399. + +Required properties: +- compatible: value should be one of the following + "rockchip,rk3288-vpu"; + "rockchip,rk3399-vpu"; +- interrupts: encoding and decoding interrupt specifiers +- interrupt-names: should be "vepu" and "vdpu" +- clocks: phandle to VPU aclk, hclk clocks +- clock-names: should be "aclk" and "hclk" +- power-domains: phandle to power domain node +- iommus: phandle to a iommu node + +Example: +SoC-specific DT entry: + 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>; + };
PATCH v10 2/4 ARM: dts: rockchip: add VPU device node for RK3288
In reply to a message not in the archiveAdd 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
A message that is not in the archive (sent off-list or not yet received): 20181121191652.22814-3-ezequiel-ZGY8ohtN/[email protected]
Tomasz Figa
Reviewed-byRe: [PATCH v10 2/4] ARM: dts: rockchip: add VPU device node for RK3288
Hi Ezequiel,
Quoted 35 lines · 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 <ezequiel-ZGY8ohtN/[email protected]>--- arch/arm/boot/dts/rk3288.dtsi | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-)arch/arm/boot/dts/rk3288.dtsi +12
-0@@ -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>;
arch/arm/boot/dts/rk3288.dtsi line 1249
Quoted 9 lines
arch/arm/boot/dts/rk3288.dtsi +1
-1@@ -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 {
Best regards,
Tomasz