linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/8] Prepare for new rkvdec variants
@ 2025-06-23 16:07 Detlev Casanova
  2025-06-23 16:07 ` [PATCH 1/8] media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings Detlev Casanova
                   ` (7 more replies)
  0 siblings, 8 replies; 14+ messages in thread
From: Detlev Casanova @ 2025-06-23 16:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Detlev Casanova, Andy Yan, Frank Wang, devicetree,
	linux-arm-kernel, linux-rockchip, Ezequiel Garcia,
	Mauro Carvalho Chehab, Hans Verkuil, Ricardo Ribalda,
	Hans de Goede, Yunke Cao, linux-media, kernel

This patch set introduces the necessary bits for new variants
implementations that do not modify the driver.
The driver changes will come in another patch set.

The first 4 patches document the device nodes and then add the nodes for
rk3588 and rk3576. I kept the R-b tag from Conor Dooley as the patch
didn't change much from [1]. I can remove it if needed.

Then a new v4l2 control for HEVC is added to be able to send the missing
RPS information to the driver.

Finally, the driver is unstaged as the TODO points are removed. I added
myself as maintainer for now as I'll be adding support for several
variants.

Those 3 parts can be applied separately and do not depend on each other.
Based on v6.16-rc3.

[1]: https://lore.kernel.org/all/20240620-unsmooth-surfer-b62ed94b4a5e@spud/

Detlev Casanova (8):
  media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings
  media: dt-bindings: rockchip: Add RK3576 Video Decoder bindings
  arm64: dts: rockchip: Add the vdpu381 Video Decoders on RK3588
  arm64: dts: rockchip: Add the vdpu383 Video Decoder on rk3576
  media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_rps control
  media: v4l2-ctrls: Add hevc_ext_sps_rps control
  media: rkvdec: Remove TODO file
  media: rkvdec: Unstage the driver

 .../bindings/media/rockchip,vdec.yaml         | 80 ++++++++++++++++++-
 .../media/v4l/ext-ctrls-codec-stateless.rst   | 73 +++++++++++++++++
 .../media/v4l/vidioc-queryctrl.rst            |  6 ++
 MAINTAINERS                                   |  8 ++
 arch/arm64/boot/dts/rockchip/rk3576.dtsi      | 36 +++++++++
 arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 74 +++++++++++++++++
 drivers/media/platform/rockchip/Kconfig       |  1 +
 drivers/media/platform/rockchip/Makefile      |  1 +
 .../platform/rockchip}/rkvdec/Kconfig         |  0
 .../platform/rockchip}/rkvdec/Makefile        |  0
 .../platform/rockchip}/rkvdec/rkvdec-h264.c   |  0
 .../platform/rockchip}/rkvdec/rkvdec-regs.h   |  0
 .../platform/rockchip}/rkvdec/rkvdec-vp9.c    |  0
 .../platform/rockchip}/rkvdec/rkvdec.c        |  0
 .../platform/rockchip}/rkvdec/rkvdec.h        |  0
 drivers/media/v4l2-core/v4l2-ctrls-core.c     |  9 +++
 drivers/media/v4l2-core/v4l2-ctrls-defs.c     |  5 ++
 drivers/staging/media/Kconfig                 |  2 -
 drivers/staging/media/Makefile                |  1 -
 drivers/staging/media/rkvdec/TODO             | 11 ---
 include/uapi/linux/v4l2-controls.h            | 48 +++++++++++
 include/uapi/linux/videodev2.h                |  1 +
 22 files changed, 339 insertions(+), 17 deletions(-)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/Kconfig (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/Makefile (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-h264.c (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-regs.h (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-vp9.c (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec.c (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec.h (100%)
 delete mode 100644 drivers/staging/media/rkvdec/TODO

-- 
2.50.0


^ permalink raw reply	[flat|nested] 14+ messages in thread

* [PATCH 1/8] media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings
  2025-06-23 16:07 [PATCH 0/8] Prepare for new rkvdec variants Detlev Casanova
@ 2025-06-23 16:07 ` Detlev Casanova
  2025-06-23 16:07 ` [PATCH 2/8] media: dt-bindings: rockchip: Add RK3576 " Detlev Casanova
                   ` (6 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Detlev Casanova @ 2025-06-23 16:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Detlev Casanova, Andy Yan, Frank Wang, devicetree,
	linux-arm-kernel, linux-rockchip, Ezequiel Garcia,
	Mauro Carvalho Chehab, Hans Verkuil, Ricardo Ribalda,
	Hans de Goede, Yunke Cao, linux-media, kernel, Conor Dooley

Document the Rockchip RK3588 Video Decoder bindings.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
Reviewed-by: Conor Dooley <conor.dooley@microchip.com>
---
 .../bindings/media/rockchip,vdec.yaml         | 77 ++++++++++++++++++-
 1 file changed, 74 insertions(+), 3 deletions(-)

diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
index 08b02ec167557..e9b82dc05fd1d 100644
--- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
@@ -10,13 +10,14 @@ maintainers:
   - Heiko Stuebner <heiko@sntech.de>
 
 description: |-
-  The Rockchip rk3399 has a stateless Video Decoder that can decodes H.264,
-  HEVC an VP9 streams.
+  Rockchip SoCs have variants of the same stateless Video Decoder that can
+  decodes H.264, HEVC, VP9 and AV1 streams, depending on the variant.
 
 properties:
   compatible:
     oneOf:
       - const: rockchip,rk3399-vdec
+      - const: rockchip,rk3588-vdec
       - items:
           - enum:
               - rockchip,rk3228-vdec
@@ -24,35 +25,72 @@ properties:
           - const: rockchip,rk3399-vdec
 
   reg:
-    maxItems: 1
+    minItems: 1
+    items:
+      - description: The function configuration registers base
+      - description: The link table configuration registers base
+      - description: The cache configuration registers base
+
+  reg-names:
+    items:
+      - const: function
+      - const: link
+      - const: cache
 
   interrupts:
     maxItems: 1
 
   clocks:
+    minItems: 4
     items:
       - description: The Video Decoder AXI interface clock
       - description: The Video Decoder AHB interface clock
       - description: The Video Decoded CABAC clock
       - description: The Video Decoder core clock
+      - description: The Video decoder HEVC CABAC clock
 
   clock-names:
+    minItems: 4
     items:
       - const: axi
       - const: ahb
       - const: cabac
       - const: core
+      - const: hevc_cabac
 
   assigned-clocks: true
 
   assigned-clock-rates: true
 
+  resets:
+    items:
+      - description: The Video Decoder AXI interface reset
+      - description: The Video Decoder AHB interface reset
+      - description: The Video Decoded CABAC reset
+      - description: The Video Decoder core reset
+      - description: The Video decoder HEVC CABAC reset
+
+  reset-names:
+    items:
+      - const: axi
+      - const: ahb
+      - const: cabac
+      - const: core
+      - const: hevc_cabac
+
   power-domains:
     maxItems: 1
 
   iommus:
     maxItems: 1
 
+  sram:
+    $ref: /schemas/types.yaml#/definitions/phandle
+    description: |
+      phandle to a reserved on-chip SRAM regions.
+      Some SoCs, like rk3588 provide on-chip SRAM to store temporary
+      buffers during decoding.
+
 required:
   - compatible
   - reg
@@ -61,6 +99,39 @@ required:
   - clock-names
   - power-domains
 
+allOf:
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: rockchip,rk3588-vdec
+    then:
+      properties:
+        reg:
+          minItems: 3
+        reg-names:
+          minItems: 3
+        clocks:
+          minItems: 5
+        clock-names:
+          minItems: 5
+        resets:
+          minItems: 5
+        reset-names:
+          minItems: 5
+    else:
+      properties:
+        reg:
+          maxItems: 1
+        reg-names: false
+        clocks:
+          maxItems: 4
+        clock-names:
+          maxItems: 4
+        resets: false
+        reset-names: false
+        sram: false
+
 additionalProperties: false
 
 examples:
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 2/8] media: dt-bindings: rockchip: Add RK3576 Video Decoder bindings
  2025-06-23 16:07 [PATCH 0/8] Prepare for new rkvdec variants Detlev Casanova
  2025-06-23 16:07 ` [PATCH 1/8] media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings Detlev Casanova
@ 2025-06-23 16:07 ` Detlev Casanova
  2025-06-27 20:23   ` Rob Herring (Arm)
  2025-06-23 16:07 ` [PATCH 3/8] arm64: dts: rockchip: Add the vdpu381 Video Decoders on RK3588 Detlev Casanova
                   ` (5 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Detlev Casanova @ 2025-06-23 16:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Detlev Casanova, Andy Yan, Frank Wang, devicetree,
	linux-arm-kernel, linux-rockchip, Ezequiel Garcia,
	Mauro Carvalho Chehab, Hans Verkuil, Ricardo Ribalda,
	Hans de Goede, Yunke Cao, linux-media, kernel

The video decoder in RK3576 (vdpu383) is described the same way as the
one in RK3588 (vdpu381). A new compatible is added as the driver
implementation will be different.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
 Documentation/devicetree/bindings/media/rockchip,vdec.yaml | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
index e9b82dc05fd1d..96b6c89387683 100644
--- a/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
+++ b/Documentation/devicetree/bindings/media/rockchip,vdec.yaml
@@ -17,6 +17,7 @@ properties:
   compatible:
     oneOf:
       - const: rockchip,rk3399-vdec
+      - const: rockchip,rk3576-vdec
       - const: rockchip,rk3588-vdec
       - items:
           - enum:
@@ -104,7 +105,9 @@ allOf:
       properties:
         compatible:
           contains:
-            const: rockchip,rk3588-vdec
+            enum:
+              - rockchip,rk3576-vdec
+              - rockchip,rk3588-vdec
     then:
       properties:
         reg:
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 3/8] arm64: dts: rockchip: Add the vdpu381 Video Decoders on RK3588
  2025-06-23 16:07 [PATCH 0/8] Prepare for new rkvdec variants Detlev Casanova
  2025-06-23 16:07 ` [PATCH 1/8] media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings Detlev Casanova
  2025-06-23 16:07 ` [PATCH 2/8] media: dt-bindings: rockchip: Add RK3576 " Detlev Casanova
@ 2025-06-23 16:07 ` Detlev Casanova
  2025-06-23 16:07 ` [PATCH 4/8] arm64: dts: rockchip: Add the vdpu383 Video Decoder on rk3576 Detlev Casanova
                   ` (4 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Detlev Casanova @ 2025-06-23 16:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Detlev Casanova, Andy Yan, Frank Wang, devicetree,
	linux-arm-kernel, linux-rockchip, Ezequiel Garcia,
	Mauro Carvalho Chehab, Hans Verkuil, Ricardo Ribalda,
	Hans de Goede, Yunke Cao, linux-media, kernel

Add the vdpu381 Video Decoders to the rk3588-base devicetree.

The RK3588 based SoCs all embed 2 vdpu381 decoders.
This also adds the dedicated IOMMU controllers.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
 arch/arm64/boot/dts/rockchip/rk3588-base.dtsi | 74 +++++++++++++++++++
 1 file changed, 74 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
index 70f03e68ba550..c1eaff86d5b73 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3588-base.dtsi
@@ -1252,6 +1252,70 @@ vepu121_3_mmu: iommu@fdbac800 {
 		#iommu-cells = <0>;
 	};
 
+	vdec0: video-codec@fdc38000 {
+		compatible = "rockchip,rk3588-vdec";
+		reg = <0x0 0xfdc38100 0x0 0x500>,
+		      <0x0 0xfdc38000 0x0 0x100>,
+		      <0x0 0xfdc38600 0x0 0x100>;
+		reg-names = "function", "link", "cache";
+		interrupts = <GIC_SPI 95 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru ACLK_RKVDEC0>, <&cru HCLK_RKVDEC0>, <&cru CLK_RKVDEC0_CA>,
+			 <&cru CLK_RKVDEC0_CORE>, <&cru CLK_RKVDEC0_HEVC_CA>;
+		clock-names = "axi", "ahb", "cabac", "core", "hevc_cabac";
+		assigned-clocks = <&cru ACLK_RKVDEC0>, <&cru CLK_RKVDEC0_CORE>,
+				  <&cru CLK_RKVDEC0_CA>, <&cru CLK_RKVDEC0_HEVC_CA>;
+		assigned-clock-rates = <800000000>, <600000000>,
+				       <600000000>, <1000000000>;
+		iommus = <&vdec0_mmu>;
+		power-domains = <&power RK3588_PD_RKVDEC0>;
+		resets = <&cru SRST_A_RKVDEC0>, <&cru SRST_H_RKVDEC0>, <&cru SRST_RKVDEC0_CA>,
+			 <&cru SRST_RKVDEC0_CORE>, <&cru SRST_RKVDEC0_HEVC_CA>;
+		reset-names = "axi", "ahb", "cabac", "core", "hevc_cabac";
+		sram = <&vdec0_sram>;
+	};
+
+	vdec0_mmu: iommu@fdc38700 {
+		compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu";
+		reg = <0x0 0xfdc38700 0x0 0x40>, <0x0 0xfdc38740 0x0 0x40>;
+		interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru ACLK_RKVDEC0>, <&cru HCLK_RKVDEC0>;
+		clock-names = "aclk", "iface";
+		power-domains = <&power RK3588_PD_RKVDEC0>;
+		#iommu-cells = <0>;
+	};
+
+	vdec1: video-codec@fdc40000 {
+		compatible = "rockchip,rk3588-vdec";
+		reg = <0x0 0xfdc40100 0x0 0x500>,
+		      <0x0 0xfdc40000 0x0 0x100>,
+		      <0x0 0xfdc40600 0x0 0x100>;
+		reg-names = "function", "link", "cache";
+		interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru ACLK_RKVDEC1>, <&cru HCLK_RKVDEC1>, <&cru CLK_RKVDEC1_CA>,
+			 <&cru CLK_RKVDEC1_CORE>, <&cru CLK_RKVDEC1_HEVC_CA>;
+		clock-names = "axi", "ahb", "cabac", "core", "hevc_cabac";
+		assigned-clocks = <&cru ACLK_RKVDEC1>, <&cru CLK_RKVDEC1_CORE>,
+				  <&cru CLK_RKVDEC1_CA>, <&cru CLK_RKVDEC1_HEVC_CA>;
+		assigned-clock-rates = <800000000>, <600000000>,
+				       <600000000>, <1000000000>;
+		iommus = <&vdec1_mmu>;
+		power-domains = <&power RK3588_PD_RKVDEC1>;
+		resets = <&cru SRST_A_RKVDEC1>, <&cru SRST_H_RKVDEC1>, <&cru SRST_RKVDEC1_CA>,
+			 <&cru SRST_RKVDEC1_CORE>, <&cru SRST_RKVDEC1_HEVC_CA>;
+		reset-names = "axi", "ahb", "cabac", "core", "hevc_cabac";
+		sram = <&vdec1_sram>;
+	};
+
+	vdec1_mmu: iommu@fdc40700 {
+		compatible = "rockchip,rk3588-iommu", "rockchip,rk3568-iommu";
+		reg = <0x0 0xfdc40700 0x0 0x40>, <0x0 0xfdc40740 0x0 0x40>;
+		interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH 0>;
+		clocks = <&cru ACLK_RKVDEC1>, <&cru HCLK_RKVDEC1>;
+		clock-names = "aclk", "iface";
+		power-domains = <&power RK3588_PD_RKVDEC1>;
+		#iommu-cells = <0>;
+	};
+
 	av1d: video-codec@fdc70000 {
 		compatible = "rockchip,rk3588-av1-vpu";
 		reg = <0x0 0xfdc70000 0x0 0x800>;
@@ -3093,6 +3157,16 @@ system_sram2: sram@ff001000 {
 		ranges = <0x0 0x0 0xff001000 0xef000>;
 		#address-cells = <1>;
 		#size-cells = <1>;
+
+		vdec0_sram: codec-sram@0 {
+			reg = <0x0 0x78000>;
+			pool;
+		};
+
+		vdec1_sram: codec-sram@78000 {
+			reg = <0x78000 0x77000>;
+			pool;
+		};
 	};
 
 	pinctrl: pinctrl {
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 4/8] arm64: dts: rockchip: Add the vdpu383 Video Decoder on rk3576
  2025-06-23 16:07 [PATCH 0/8] Prepare for new rkvdec variants Detlev Casanova
                   ` (2 preceding siblings ...)
  2025-06-23 16:07 ` [PATCH 3/8] arm64: dts: rockchip: Add the vdpu381 Video Decoders on RK3588 Detlev Casanova
@ 2025-06-23 16:07 ` Detlev Casanova
  2025-06-23 16:07 ` [PATCH 5/8] media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_rps control Detlev Casanova
                   ` (3 subsequent siblings)
  7 siblings, 0 replies; 14+ messages in thread
From: Detlev Casanova @ 2025-06-23 16:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Detlev Casanova, Andy Yan, Frank Wang, devicetree,
	linux-arm-kernel, linux-rockchip, Ezequiel Garcia,
	Mauro Carvalho Chehab, Hans Verkuil, Ricardo Ribalda,
	Hans de Goede, Yunke Cao, linux-media, kernel

Add the vdpu383 Video Decoder variant to the RK3576 device tree.

Also allow using the dedicated SRAM as a pool.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
 arch/arm64/boot/dts/rockchip/rk3576.dtsi | 36 ++++++++++++++++++++++++
 1 file changed, 36 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3576.dtsi b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
index b1ac23035dd78..26896ac22cedf 100644
--- a/arch/arm64/boot/dts/rockchip/rk3576.dtsi
+++ b/arch/arm64/boot/dts/rockchip/rk3576.dtsi
@@ -1139,6 +1139,41 @@ gpu: gpu@27800000 {
 			status = "disabled";
 		};
 
+		vdec: video-codec@27b00000 {
+			compatible = "rockchip,rk3576-vdec";
+			reg = <0x0 0x27b00100 0x0 0x500>,
+			      <0x0 0x27b00000 0x0 0x100>,
+			      <0x0 0x27b00600 0x0 0x100>;
+			reg-names = "function", "link", "cache";
+			interrupts = <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cru ACLK_RKVDEC_ROOT>, <&cru HCLK_RKVDEC>,
+				 <&cru ACLK_RKVDEC_ROOT_BAK>, <&cru CLK_RKVDEC_CORE>,
+				 <&cru CLK_RKVDEC_HEVC_CA>;
+			clock-names = "axi", "ahb", "cabac", "core", "hevc_cabac";
+			assigned-clocks = <&cru ACLK_RKVDEC_ROOT>, <&cru CLK_RKVDEC_CORE>,
+					  <&cru ACLK_RKVDEC_ROOT_BAK>, <&cru CLK_RKVDEC_HEVC_CA>;
+			assigned-clock-rates = <600000000>, <600000000>,
+					       <500000000>, <1000000000>;
+			iommus = <&vdec_mmu>;
+			power-domains = <&power RK3576_PD_VDEC>;
+			resets = <&cru SRST_A_RKVDEC_BIU>, <&cru SRST_H_RKVDEC_BIU>,
+				 <&cru SRST_H_RKVDEC>, <&cru SRST_RKVDEC_CORE>,
+				 <&cru SRST_RKVDEC_HEVC_CA>;
+			reset-names = "axi", "ahb", "cabac", "core", "hevc_cabac";
+			sram = <&rkvdec_sram>;
+		};
+
+		vdec_mmu: iommu@27b00800 {
+			compatible = "rockchip,rk3576-iommu", "rockchip,rk3568-iommu";
+			reg = <0x0 0x27b00800 0x0 0x40>, <0x0 0x27b00900 0x0 0x40>;
+			interrupts = <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>;
+			clocks = <&cru CLK_RKVDEC_CORE>, <&cru HCLK_RKVDEC>;
+			clock-names = "aclk", "iface";
+			power-domains = <&power RK3576_PD_VDEC>;
+			rockchip,disable-mmu-reset;
+			#iommu-cells = <0>;
+		};
+
 		vop: vop@27d00000 {
 			compatible = "rockchip,rk3576-vop";
 			reg = <0x0 0x27d00000 0x0 0x3000>, <0x0 0x27d05000 0x0 0x1000>;
@@ -2412,6 +2447,7 @@ sram: sram@3ff88000 {
 			/* start address and size should be 4k align */
 			rkvdec_sram: rkvdec-sram@0 {
 				reg = <0x0 0x78000>;
+				pool;
 			};
 		};
 
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 5/8] media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_rps control
  2025-06-23 16:07 [PATCH 0/8] Prepare for new rkvdec variants Detlev Casanova
                   ` (3 preceding siblings ...)
  2025-06-23 16:07 ` [PATCH 4/8] arm64: dts: rockchip: Add the vdpu383 Video Decoder on rk3576 Detlev Casanova
@ 2025-06-23 16:07 ` Detlev Casanova
  2025-07-11 19:59   ` Nicolas Dufresne
  2025-06-23 16:07 ` [PATCH 6/8] media: v4l2-ctrls: Add hevc_ext_sps_rps control Detlev Casanova
                   ` (2 subsequent siblings)
  7 siblings, 1 reply; 14+ messages in thread
From: Detlev Casanova @ 2025-06-23 16:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Detlev Casanova, Andy Yan, Frank Wang, devicetree,
	linux-arm-kernel, linux-rockchip, Ezequiel Garcia,
	Mauro Carvalho Chehab, Hans Verkuil, Ricardo Ribalda,
	Hans de Goede, Yunke Cao, linux-media, kernel

Some hardware (e.g.: Rockchip's rk3588 hevc decoder) need the parsed
long and short term reference information for HEVC decoding.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
 .../media/v4l/ext-ctrls-codec-stateless.rst   | 73 +++++++++++++++++++
 .../media/v4l/vidioc-queryctrl.rst            |  6 ++
 2 files changed, 79 insertions(+)

diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
index 0da635691fdcb..745f38a8fe69c 100644
--- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
+++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
@@ -2958,6 +2958,79 @@ This structure contains all loop filter related parameters. See sections
       - 0x00000004
       -
 
+.. c:type:: v4l2_ctrl_hevc_ext_sps_rps
+
+.. cssclass:: longtable
+
+.. flat-table:: struct v4l2_ctrl_hevc_ext_sps_rps
+    :header-rows:  0
+    :stub-columns: 0
+    :widths:       1 1 2
+
+    * - __u16
+      - ``lt_ref_pic_poc_lsb_sps``
+      - Long term reference picture order count as described in section 7.4.3.2.1
+        "General sequence parameter set RBSP semantics" of the specification.
+    * - __u8
+      - ``delta_idx_minus1``
+      - Specifies the delta compare to the index. See details in section 7.4.8 "Short-term
+        reference picture set semantics" of the specification.
+    * - __u8
+      - ``delta_rps_sign``
+      - Sign of the delta as specified in section 7.4.8 "Short-term reference picture set
+        semantics" of the specification.
+    * - __u16
+      - ``abs_delta_rps_minus1``
+      - Absolute delta RPS as specified in section 7.4.8 "Short-term reference picture set
+        semantics" of the specification.
+    * - __u8
+      - ``num_negative_pics``
+      - Number of short-term RPS entries that have picture order count values less than the
+        picture order count value of the current picture.
+    * - __u8
+      - ``num_positive_pics``
+      - Number of short-term RPS entries that have picture order count values greater than the
+        picture order count value of the current picture.
+    * - __u8
+      - ``used_by_curr_pic_s0[16]``
+      - Specifies if short-term RPS i (that has a negative POC) is used by the current picture.
+    * - __u8
+      - ``used_by_curr_pic_s1[16]``
+      - Specifies if short-term RPS i (that has a positive POC) is used by the current picture.
+    * - __s32
+      - ``delta_poc_s0[16]``
+      - Specifies the negative picture order count delta for the i-th entry in the short-term RPS.
+        See details in section 7.4.8 "Short-term reference picture set semantics" of the
+        specification.
+    * - __s32
+      - ``delta_poc_s1[16]``
+      - Specifies the positive picture order count delta for the i-th entry in the short-term RPS.
+        See details in section 7.4.8 "Short-term reference picture set semantics" of the
+        specification.
+    * - __u8
+      - ``flags``
+      - See :ref:`Extended RPS Flags <hevc_ext_sps_rps_flags>`
+
+.. _hevc_ext_sps_rps_flags:
+
+``Extended SPS RPS Flags``
+
+.. cssclass:: longtable
+
+.. flat-table::
+    :header-rows:  0
+    :stub-columns: 0
+    :widths:       1 1 2
+
+    * - ``V4L2_HEVC_EXT_SPS_RPS_FLAG_USED_LT``
+      - 0x00000001
+      - Specifies if the long-term reference picture is used 7.4.3.2.1 "General sequence parameter
+        set RBSP semantics" of the specification.
+    * - ``V4L2_HEVC_EXT_SPS_RPS_FLAG_INTER_REF_PIC_SET_PRED``
+      - 0x00000002
+      - Specifies if the short-term RPS is predicted from another short term RPS. See details in
+        section 7.4.8 "Short-term reference picture set semantics" of the specification.
+
 .. _v4l2-codec-stateless-av1:
 
 ``V4L2_CID_STATELESS_AV1_SEQUENCE (struct)``
diff --git a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
index 3549417c7febb..dc7caf4bf6208 100644
--- a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
+++ b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
@@ -523,6 +523,12 @@ See also the examples in :ref:`control`.
       - n/a
       - A struct :c:type:`v4l2_ctrl_hevc_decode_params`, containing HEVC
 	decoding parameters for stateless video decoders.
+    * - ``V4L2_CTRL_TYPE_HEVC_EXT_SPS_RPS``
+      - n/a
+      - n/a
+      - n/a
+      - A struct :c:type:`v4l2_ctrl_hevc_ext_sps_rps`, containing HEVC
+	extended RPS for stateless video decoders.
     * - ``V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR``
       - n/a
       - n/a
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 6/8] media: v4l2-ctrls: Add hevc_ext_sps_rps control
  2025-06-23 16:07 [PATCH 0/8] Prepare for new rkvdec variants Detlev Casanova
                   ` (4 preceding siblings ...)
  2025-06-23 16:07 ` [PATCH 5/8] media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_rps control Detlev Casanova
@ 2025-06-23 16:07 ` Detlev Casanova
  2025-06-23 16:07 ` [PATCH 7/8] media: rkvdec: Remove TODO file Detlev Casanova
  2025-06-23 16:07 ` [PATCH 8/8] media: rkvdec: Unstage the driver Detlev Casanova
  7 siblings, 0 replies; 14+ messages in thread
From: Detlev Casanova @ 2025-06-23 16:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Detlev Casanova, Andy Yan, Frank Wang, devicetree,
	linux-arm-kernel, linux-rockchip, Ezequiel Garcia,
	Mauro Carvalho Chehab, Hans Verkuil, Ricardo Ribalda,
	Hans de Goede, Yunke Cao, linux-media, kernel

The vdpu381 decoder found on newer Rockchip SoC need the information
from the long term and short term ref pic sets from the SPS.

So far, it wasn't included in the v4l2 API, so add it with a new dynamic
sized control.

Each element of the array contains the long term and short term ref pic
set at that index.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
 drivers/media/v4l2-core/v4l2-ctrls-core.c |  9 +++++
 drivers/media/v4l2-core/v4l2-ctrls-defs.c |  5 +++
 include/uapi/linux/v4l2-controls.h        | 48 +++++++++++++++++++++++
 include/uapi/linux/videodev2.h            |  1 +
 4 files changed, 63 insertions(+)

diff --git a/drivers/media/v4l2-core/v4l2-ctrls-core.c b/drivers/media/v4l2-core/v4l2-ctrls-core.c
index 90d25329661ed..be4bb14027373 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls-core.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-core.c
@@ -418,6 +418,9 @@ void v4l2_ctrl_type_op_log(const struct v4l2_ctrl *ctrl)
 	case V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS:
 		pr_cont("HEVC_SLICE_PARAMS");
 		break;
+	case V4L2_CTRL_TYPE_HEVC_EXT_SPS_RPS:
+		pr_cont("HEVC_EXT_SPS_RPS");
+		break;
 	case V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX:
 		pr_cont("HEVC_SCALING_MATRIX");
 		break;
@@ -1173,6 +1176,9 @@ static int std_validate_compound(const struct v4l2_ctrl *ctrl, u32 idx,
 	case V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS:
 		break;
 
+	case V4L2_CTRL_TYPE_HEVC_EXT_SPS_RPS:
+		break;
+
 	case V4L2_CTRL_TYPE_HDR10_CLL_INFO:
 		break;
 
@@ -1921,6 +1927,9 @@ static struct v4l2_ctrl *v4l2_ctrl_new(struct v4l2_ctrl_handler *hdl,
 	case V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS:
 		elem_size = sizeof(struct v4l2_ctrl_hevc_slice_params);
 		break;
+	case V4L2_CTRL_TYPE_HEVC_EXT_SPS_RPS:
+		elem_size = sizeof(struct v4l2_ctrl_hevc_ext_sps_rps);
+		break;
 	case V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX:
 		elem_size = sizeof(struct v4l2_ctrl_hevc_scaling_matrix);
 		break;
diff --git a/drivers/media/v4l2-core/v4l2-ctrls-defs.c b/drivers/media/v4l2-core/v4l2-ctrls-defs.c
index 1ea52011247ac..d4bb7d8f164ba 100644
--- a/drivers/media/v4l2-core/v4l2-ctrls-defs.c
+++ b/drivers/media/v4l2-core/v4l2-ctrls-defs.c
@@ -1233,6 +1233,7 @@ const char *v4l2_ctrl_get_name(u32 id)
 	case V4L2_CID_STATELESS_HEVC_DECODE_MODE:		return "HEVC Decode Mode";
 	case V4L2_CID_STATELESS_HEVC_START_CODE:		return "HEVC Start Code";
 	case V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS:	return "HEVC Entry Point Offsets";
+	case V4L2_CID_STATELESS_HEVC_EXT_SPS_RPS:		return "HEVC Extended RPS data";
 	case V4L2_CID_STATELESS_AV1_SEQUENCE:			return "AV1 Sequence Parameters";
 	case V4L2_CID_STATELESS_AV1_TILE_GROUP_ENTRY:		return "AV1 Tile Group Entry";
 	case V4L2_CID_STATELESS_AV1_FRAME:			return "AV1 Frame Parameters";
@@ -1578,6 +1579,10 @@ void v4l2_ctrl_fill(u32 id, const char **name, enum v4l2_ctrl_type *type,
 		*type = V4L2_CTRL_TYPE_U32;
 		*flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
 		break;
+	case V4L2_CID_STATELESS_HEVC_EXT_SPS_RPS:
+		*type = V4L2_CTRL_TYPE_HEVC_EXT_SPS_RPS;
+		*flags |= V4L2_CTRL_FLAG_DYNAMIC_ARRAY;
+		break;
 	case V4L2_CID_STATELESS_VP9_COMPRESSED_HDR:
 		*type = V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR;
 		break;
diff --git a/include/uapi/linux/v4l2-controls.h b/include/uapi/linux/v4l2-controls.h
index 72e32814ea83d..fcd0eef44d534 100644
--- a/include/uapi/linux/v4l2-controls.h
+++ b/include/uapi/linux/v4l2-controls.h
@@ -2088,6 +2088,7 @@ struct v4l2_ctrl_mpeg2_quantisation {
 #define V4L2_CID_STATELESS_HEVC_DECODE_MODE	(V4L2_CID_CODEC_STATELESS_BASE + 405)
 #define V4L2_CID_STATELESS_HEVC_START_CODE	(V4L2_CID_CODEC_STATELESS_BASE + 406)
 #define V4L2_CID_STATELESS_HEVC_ENTRY_POINT_OFFSETS (V4L2_CID_CODEC_STATELESS_BASE + 407)
+#define V4L2_CID_STATELESS_HEVC_EXT_SPS_RPS    (V4L2_CID_CODEC_STATELESS_BASE + 408)
 
 enum v4l2_stateless_hevc_decode_mode {
 	V4L2_STATELESS_HEVC_DECODE_MODE_SLICE_BASED,
@@ -2543,6 +2544,53 @@ struct v4l2_ctrl_hevc_scaling_matrix {
 	__u8	scaling_list_dc_coef_32x32[2];
 };
 
+#define V4L2_HEVC_EXT_SPS_RPS_FLAG_USED_LT			0x1
+#define V4L2_HEVC_EXT_SPS_RPS_FLAG_INTER_REF_PIC_SET_PRED	0x2
+
+/*
+ * struct v4l2_ctrl_hevc_sps_rps_extension - HEVC SPS RPS Extended parameters
+ *
+ * Dynamic size 1-dimension array for long and short term RPS. The number of elements
+ * should be max(num_long_term_ref_pics_sps, num_short_term_ref_pic_sets)
+ *
+ * @lt_ref_pic_poc_lsb_sps: picture order count modulo MaxPicOrderCntLsb
+ *                          of the i-th candidate long-term reference picture.
+ * @delta_idx_minus1: Specifies the delta compare to the index. See details in section 7.4.8
+ *                    "Short-term reference picture set semantics" of the specification.
+ * @delta_rps_sign: Sign of the delta as specified in section 7.4.8 "Short-term reference picture
+ *                  set semantics" of the specification.
+ * @abs_delta_rps_minus1: Absolute delta RPS as specified in section 7.4.8 "Short-term reference
+ *                        picture set semantics" of the specification.
+ * @num_negative_pics: Number of short-term RPS entries that have picture order count values less
+ *                     than the picture order count value of the current picture.
+ * @num_positive_pics: Number of short-term RPS entries that have picture order count values
+ *                     greater than the picture order count value of the current picture.
+ * @used_by_curr_pic_s0: Specifies if short-term RPS i (that has a negative POC) is used by the
+ *                       current picture.
+ * @used_by_curr_pic_s1: Specifies if short-term RPS i (that has a positive POC) is used by the
+ *                       current picture.
+ * @delta_poc_s0: Specifies the negative picture order count delta for the i-th entry in the
+ *                short-term RPS. See details in section 7.4.8 "Short-term reference picture set
+ *                semantics" of the specification.
+ * @delta_poc_s1: Specifies the positive picture order count delta for the i-th entry in the
+ *                short-term RPS. See details in section 7.4.8 "Short-term reference picture set
+ *                semantics" of the specification.
+ * @flags: See V4L2_HEVC_EXT_SPS_RPS_FLAG_{}
+ */
+struct v4l2_ctrl_hevc_ext_sps_rps {
+	__u16	lt_ref_pic_poc_lsb_sps;
+	__u8	delta_idx_minus1;
+	__u8	delta_rps_sign;
+	__u16	abs_delta_rps_minus1;
+	__u8	num_negative_pics;
+	__u8	num_positive_pics;
+	__u8	used_by_curr_pic_s0[16];
+	__u8	used_by_curr_pic_s1[16];
+	__s32	delta_poc_s0[16];
+	__s32	delta_poc_s1[16];
+	__u8	flags;
+};
+
 #define V4L2_CID_COLORIMETRY_CLASS_BASE	(V4L2_CTRL_CLASS_COLORIMETRY | 0x900)
 #define V4L2_CID_COLORIMETRY_CLASS	(V4L2_CTRL_CLASS_COLORIMETRY | 1)
 
diff --git a/include/uapi/linux/videodev2.h b/include/uapi/linux/videodev2.h
index 9e3b366d5fc79..9515e3f1195d6 100644
--- a/include/uapi/linux/videodev2.h
+++ b/include/uapi/linux/videodev2.h
@@ -1974,6 +1974,7 @@ enum v4l2_ctrl_type {
 	V4L2_CTRL_TYPE_HEVC_SLICE_PARAMS	= 0x0272,
 	V4L2_CTRL_TYPE_HEVC_SCALING_MATRIX	= 0x0273,
 	V4L2_CTRL_TYPE_HEVC_DECODE_PARAMS	= 0x0274,
+	V4L2_CTRL_TYPE_HEVC_EXT_SPS_RPS		= 0x0275,
 
 	V4L2_CTRL_TYPE_AV1_SEQUENCE	    = 0x280,
 	V4L2_CTRL_TYPE_AV1_TILE_GROUP_ENTRY = 0x281,
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 7/8] media: rkvdec: Remove TODO file
  2025-06-23 16:07 [PATCH 0/8] Prepare for new rkvdec variants Detlev Casanova
                   ` (5 preceding siblings ...)
  2025-06-23 16:07 ` [PATCH 6/8] media: v4l2-ctrls: Add hevc_ext_sps_rps control Detlev Casanova
@ 2025-06-23 16:07 ` Detlev Casanova
  2025-07-11 20:00   ` Nicolas Dufresne
  2025-06-23 16:07 ` [PATCH 8/8] media: rkvdec: Unstage the driver Detlev Casanova
  7 siblings, 1 reply; 14+ messages in thread
From: Detlev Casanova @ 2025-06-23 16:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Detlev Casanova, Andy Yan, Frank Wang, devicetree,
	linux-arm-kernel, linux-rockchip, Ezequiel Garcia,
	Mauro Carvalho Chehab, Hans Verkuil, Ricardo Ribalda,
	Hans de Goede, Yunke Cao, linux-media, kernel

2 items are present in the TODO file:
 - HEVC support
 - Evaluate adding helper for rkvdec_request_validate

Missing HEVC support is not a reason for a driver to be in staging,
support for different features of the hardware can be added in drivers
in the main tree.

The rkvdec_request_validate function was simplified in
commit 54676d5f5630 ("media: rkvdec: Do not require all controls to be present in every request")
by not setting controls that have not changed.
As it now basically just calls vb2_request_validate(), there is no need
for a helper.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
 drivers/staging/media/rkvdec/TODO | 11 -----------
 1 file changed, 11 deletions(-)
 delete mode 100644 drivers/staging/media/rkvdec/TODO

diff --git a/drivers/staging/media/rkvdec/TODO b/drivers/staging/media/rkvdec/TODO
deleted file mode 100644
index 2c0779383276e..0000000000000
--- a/drivers/staging/media/rkvdec/TODO
+++ /dev/null
@@ -1,11 +0,0 @@
-* Support for HEVC is planned for this driver.
-
-  Given the V4L controls for that CODEC 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.
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* [PATCH 8/8] media: rkvdec: Unstage the driver
  2025-06-23 16:07 [PATCH 0/8] Prepare for new rkvdec variants Detlev Casanova
                   ` (6 preceding siblings ...)
  2025-06-23 16:07 ` [PATCH 7/8] media: rkvdec: Remove TODO file Detlev Casanova
@ 2025-06-23 16:07 ` Detlev Casanova
  2025-07-11 20:02   ` Nicolas Dufresne
  2025-07-15  8:34   ` Diederik de Haas
  7 siblings, 2 replies; 14+ messages in thread
From: Detlev Casanova @ 2025-06-23 16:07 UTC (permalink / raw)
  To: linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Detlev Casanova, Andy Yan, Frank Wang, devicetree,
	linux-arm-kernel, linux-rockchip, Ezequiel Garcia,
	Mauro Carvalho Chehab, Hans Verkuil, Ricardo Ribalda,
	Hans de Goede, Yunke Cao, linux-media, kernel

The TODO list for unstaging being empty, the driver can now be moved to the
main media folder.

Also add myself as maintainer.

Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
---
 MAINTAINERS                                               | 8 ++++++++
 drivers/media/platform/rockchip/Kconfig                   | 1 +
 drivers/media/platform/rockchip/Makefile                  | 1 +
 .../media => media/platform/rockchip}/rkvdec/Kconfig      | 0
 .../media => media/platform/rockchip}/rkvdec/Makefile     | 0
 .../platform/rockchip}/rkvdec/rkvdec-h264.c               | 0
 .../platform/rockchip}/rkvdec/rkvdec-regs.h               | 0
 .../media => media/platform/rockchip}/rkvdec/rkvdec-vp9.c | 0
 .../media => media/platform/rockchip}/rkvdec/rkvdec.c     | 0
 .../media => media/platform/rockchip}/rkvdec/rkvdec.h     | 0
 drivers/staging/media/Kconfig                             | 2 --
 drivers/staging/media/Makefile                            | 1 -
 12 files changed, 10 insertions(+), 3 deletions(-)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/Kconfig (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/Makefile (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-h264.c (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-regs.h (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-vp9.c (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec.c (100%)
 rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec.h (100%)

diff --git a/MAINTAINERS b/MAINTAINERS
index c3f7fbd0d67af..d05a153c21526 100644
--- a/MAINTAINERS
+++ b/MAINTAINERS
@@ -21466,6 +21466,14 @@ S:	Maintained
 F:	Documentation/devicetree/bindings/media/rockchip-rga.yaml
 F:	drivers/media/platform/rockchip/rga/
 
+ROCKCHIP RKVDEC VIDEO DECODER DRIVER
+M:	Detlev Casanova <detlev.casanova@collabora.com>
+L:	linux-media@vger.kernel.org
+L:	linux-rockchip@lists.infradead.org
+S:	Maintained
+F:	Documentation/devicetree/bindings/media/rockchip,vdec.yaml
+F:	drivers/media/platform/rockchip/rkvdec/
+
 ROCKCHIP RK3308 INTERNAL AUDIO CODEC
 M:	Luca Ceresoli <luca.ceresoli@bootlin.com>
 S:	Maintained
diff --git a/drivers/media/platform/rockchip/Kconfig b/drivers/media/platform/rockchip/Kconfig
index b41d3960c1b41..9bbeec4996aa2 100644
--- a/drivers/media/platform/rockchip/Kconfig
+++ b/drivers/media/platform/rockchip/Kconfig
@@ -4,3 +4,4 @@ comment "Rockchip media platform drivers"
 
 source "drivers/media/platform/rockchip/rga/Kconfig"
 source "drivers/media/platform/rockchip/rkisp1/Kconfig"
+source "drivers/media/platform/rockchip/rkvdec/Kconfig"
diff --git a/drivers/media/platform/rockchip/Makefile b/drivers/media/platform/rockchip/Makefile
index 4f782b876ac9b..286dc5c53f7e1 100644
--- a/drivers/media/platform/rockchip/Makefile
+++ b/drivers/media/platform/rockchip/Makefile
@@ -1,3 +1,4 @@
 # SPDX-License-Identifier: GPL-2.0-only
 obj-y += rga/
 obj-y += rkisp1/
+obj-y += rkvdec/
diff --git a/drivers/staging/media/rkvdec/Kconfig b/drivers/media/platform/rockchip/rkvdec/Kconfig
similarity index 100%
rename from drivers/staging/media/rkvdec/Kconfig
rename to drivers/media/platform/rockchip/rkvdec/Kconfig
diff --git a/drivers/staging/media/rkvdec/Makefile b/drivers/media/platform/rockchip/rkvdec/Makefile
similarity index 100%
rename from drivers/staging/media/rkvdec/Makefile
rename to drivers/media/platform/rockchip/rkvdec/Makefile
diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c b/drivers/media/platform/rockchip/rkvdec/rkvdec-h264.c
similarity index 100%
rename from drivers/staging/media/rkvdec/rkvdec-h264.c
rename to drivers/media/platform/rockchip/rkvdec/rkvdec-h264.c
diff --git a/drivers/staging/media/rkvdec/rkvdec-regs.h b/drivers/media/platform/rockchip/rkvdec/rkvdec-regs.h
similarity index 100%
rename from drivers/staging/media/rkvdec/rkvdec-regs.h
rename to drivers/media/platform/rockchip/rkvdec/rkvdec-regs.h
diff --git a/drivers/staging/media/rkvdec/rkvdec-vp9.c b/drivers/media/platform/rockchip/rkvdec/rkvdec-vp9.c
similarity index 100%
rename from drivers/staging/media/rkvdec/rkvdec-vp9.c
rename to drivers/media/platform/rockchip/rkvdec/rkvdec-vp9.c
diff --git a/drivers/staging/media/rkvdec/rkvdec.c b/drivers/media/platform/rockchip/rkvdec/rkvdec.c
similarity index 100%
rename from drivers/staging/media/rkvdec/rkvdec.c
rename to drivers/media/platform/rockchip/rkvdec/rkvdec.c
diff --git a/drivers/staging/media/rkvdec/rkvdec.h b/drivers/media/platform/rockchip/rkvdec/rkvdec.h
similarity index 100%
rename from drivers/staging/media/rkvdec/rkvdec.h
rename to drivers/media/platform/rockchip/rkvdec/rkvdec.h
diff --git a/drivers/staging/media/Kconfig b/drivers/staging/media/Kconfig
index b442148543995..b9d52a51841b5 100644
--- a/drivers/staging/media/Kconfig
+++ b/drivers/staging/media/Kconfig
@@ -32,8 +32,6 @@ source "drivers/staging/media/max96712/Kconfig"
 
 source "drivers/staging/media/meson/vdec/Kconfig"
 
-source "drivers/staging/media/rkvdec/Kconfig"
-
 source "drivers/staging/media/starfive/Kconfig"
 
 source "drivers/staging/media/sunxi/Kconfig"
diff --git a/drivers/staging/media/Makefile b/drivers/staging/media/Makefile
index ad4e9619a9e07..102ca632ddf5c 100644
--- a/drivers/staging/media/Makefile
+++ b/drivers/staging/media/Makefile
@@ -4,7 +4,6 @@ obj-$(CONFIG_INTEL_ATOMISP)     += atomisp/
 obj-$(CONFIG_VIDEO_IMX_MEDIA)	+= imx/
 obj-$(CONFIG_VIDEO_MAX96712)	+= max96712/
 obj-$(CONFIG_VIDEO_MESON_VDEC)	+= meson/vdec/
-obj-$(CONFIG_VIDEO_ROCKCHIP_VDEC)	+= rkvdec/
 obj-$(CONFIG_VIDEO_STARFIVE_CAMSS)	+= starfive/
 obj-$(CONFIG_VIDEO_SUNXI)	+= sunxi/
 obj-$(CONFIG_VIDEO_TEGRA)	+= tegra-video/
-- 
2.50.0


^ permalink raw reply related	[flat|nested] 14+ messages in thread

* Re: [PATCH 2/8] media: dt-bindings: rockchip: Add RK3576 Video Decoder bindings
  2025-06-23 16:07 ` [PATCH 2/8] media: dt-bindings: rockchip: Add RK3576 " Detlev Casanova
@ 2025-06-27 20:23   ` Rob Herring (Arm)
  0 siblings, 0 replies; 14+ messages in thread
From: Rob Herring (Arm) @ 2025-06-27 20:23 UTC (permalink / raw)
  To: Detlev Casanova
  Cc: Alexey Charkov, Dragan Simic, Krzysztof Kozlowski, Frank Wang,
	linux-rockchip, Hans Verkuil, Mauro Carvalho Chehab, Jianfeng Liu,
	Sebastian Reichel, linux-kernel, Heiko Stuebner, Andy Yan,
	Kever Yang, Ezequiel Garcia, Conor Dooley, Ricardo Ribalda,
	linux-media, Hans de Goede, Cristian Ciocaltea,
	Nicolas Frattaroli, linux-arm-kernel, kernel, Yunke Cao,
	devicetree


On Mon, 23 Jun 2025 12:07:16 -0400, Detlev Casanova wrote:
> The video decoder in RK3576 (vdpu383) is described the same way as the
> one in RK3588 (vdpu381). A new compatible is added as the driver
> implementation will be different.
> 
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> ---
>  Documentation/devicetree/bindings/media/rockchip,vdec.yaml | 5 ++++-
>  1 file changed, 4 insertions(+), 1 deletion(-)
> 

Acked-by: Rob Herring (Arm) <robh@kernel.org>


^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 5/8] media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_rps control
  2025-06-23 16:07 ` [PATCH 5/8] media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_rps control Detlev Casanova
@ 2025-07-11 19:59   ` Nicolas Dufresne
  0 siblings, 0 replies; 14+ messages in thread
From: Nicolas Dufresne @ 2025-07-11 19:59 UTC (permalink / raw)
  To: Detlev Casanova, linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Andy Yan, Frank Wang, devicetree, linux-arm-kernel,
	linux-rockchip, Ezequiel Garcia, Mauro Carvalho Chehab,
	Hans Verkuil, Ricardo Ribalda, Hans de Goede, Yunke Cao,
	linux-media, kernel

[-- Attachment #1: Type: text/plain, Size: 5949 bytes --]

Hi,

Le lundi 23 juin 2025 à 12:07 -0400, Detlev Casanova a écrit :
> Some hardware (e.g.: Rockchip's rk3588 hevc decoder) need the parsed
> long and short term reference information for HEVC decoding.
> 
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> ---
>  .../media/v4l/ext-ctrls-codec-stateless.rst   | 73 +++++++++++++++++++
>  .../media/v4l/vidioc-queryctrl.rst            |  6 ++
>  2 files changed, 79 insertions(+)
> 
> diff --git a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
> index 0da635691fdcb..745f38a8fe69c 100644
> --- a/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
> +++ b/Documentation/userspace-api/media/v4l/ext-ctrls-codec-stateless.rst
> @@ -2958,6 +2958,79 @@ This structure contains all loop filter related parameters. See sections
>        - 0x00000004
>        -
>  
> +.. c:type:: v4l2_ctrl_hevc_ext_sps_rps
> +
> +.. cssclass:: longtable
> +
> +.. flat-table:: struct v4l2_ctrl_hevc_ext_sps_rps
> +    :header-rows:  0
> +    :stub-columns: 0
> +    :widths:       1 1 2


Something, somewhere should say this is an array.

> +
> +    * - __u16
> +      - ``lt_ref_pic_poc_lsb_sps``
> +      - Long term reference picture order count as described in section 7.4.3.2.1
> +        "General sequence parameter set RBSP semantics" of the specification.

Each LONG term reference have one of these.

> +    * - __u8
> +      - ``delta_idx_minus1``
> +      - Specifies the delta compare to the index. See details in section 7.4.8 "Short-term
> +        reference picture set semantics" of the specification.


And each SHORT term have one of these. How can both be int he same control ? For
me this could make a bit more sense with two structures:

	v4l2_ctrl_hevc_ext_sps_st_rps[]
	v4l2_ctrl_hevc_ext_sps_lt_rps[]

Did I miss something ?

> +    * - __u8
> +      - ``delta_rps_sign``
> +      - Sign of the delta as specified in section 7.4.8 "Short-term reference picture set
> +        semantics" of the specification.
> +    * - __u16
> +      - ``abs_delta_rps_minus1``
> +      - Absolute delta RPS as specified in section 7.4.8 "Short-term reference picture set
> +        semantics" of the specification.
> +    * - __u8
> +      - ``num_negative_pics``
> +      - Number of short-term RPS entries that have picture order count values less than the
> +        picture order count value of the current picture.
> +    * - __u8
> +      - ``num_positive_pics``
> +      - Number of short-term RPS entries that have picture order count values greater than the
> +        picture order count value of the current picture.
> +    * - __u8
> +      - ``used_by_curr_pic_s0[16]``
> +      - Specifies if short-term RPS i (that has a negative POC) is used by the current picture.

Use bit field for that, a __u16 works, and one per ST.

> 
> +    * - __u8
> +      - ``used_by_curr_pic_s1[16]``
> +      - Specifies if short-term RPS i (that has a positive POC) is used by the current picture.
> 

Same.

> +    * - __s32
> +      - ``delta_poc_s0[16]``
> +      - Specifies the negative picture order count delta for the i-th entry in the short-term RPS.
> +        See details in section 7.4.8 "Short-term reference picture set semantics" of the
> +        specification.

Keep it delta_poc_s0_minus1 like int he spec, and then you can go back so u16.

> +    * - __s32
> +      - ``delta_poc_s1[16]``
> +      - Specifies the positive picture order count delta for the i-th entry in the short-term RPS.
> +        See details in section 7.4.8 "Short-term reference picture set semantics" of the
> +        specification.

Same.


regards,
Nicolas

> +    * - __u8
> +      - ``flags``
> +      - See :ref:`Extended RPS Flags <hevc_ext_sps_rps_flags>`
> +
> +.. _hevc_ext_sps_rps_flags:
> +
> +``Extended SPS RPS Flags``
> +
> +.. cssclass:: longtable
> +
> +.. flat-table::
> +    :header-rows:  0
> +    :stub-columns: 0
> +    :widths:       1 1 2
> +
> +    * - ``V4L2_HEVC_EXT_SPS_RPS_FLAG_USED_LT``
> +      - 0x00000001
> +      - Specifies if the long-term reference picture is used 7.4.3.2.1 "General sequence parameter
> +        set RBSP semantics" of the specification.
> +    * - ``V4L2_HEVC_EXT_SPS_RPS_FLAG_INTER_REF_PIC_SET_PRED``
> +      - 0x00000002
> +      - Specifies if the short-term RPS is predicted from another short term RPS. See details in
> +        section 7.4.8 "Short-term reference picture set semantics" of the specification.
> +
>  .. _v4l2-codec-stateless-av1:
>  
>  ``V4L2_CID_STATELESS_AV1_SEQUENCE (struct)``
> diff --git a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
> index 3549417c7febb..dc7caf4bf6208 100644
> --- a/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
> +++ b/Documentation/userspace-api/media/v4l/vidioc-queryctrl.rst
> @@ -523,6 +523,12 @@ See also the examples in :ref:`control`.
>        - n/a
>        - A struct :c:type:`v4l2_ctrl_hevc_decode_params`, containing HEVC
>  	decoding parameters for stateless video decoders.
> +    * - ``V4L2_CTRL_TYPE_HEVC_EXT_SPS_RPS``
> +      - n/a
> +      - n/a
> +      - n/a
> +      - A struct :c:type:`v4l2_ctrl_hevc_ext_sps_rps`, containing HEVC
> +	extended RPS for stateless video decoders.
>      * - ``V4L2_CTRL_TYPE_VP9_COMPRESSED_HDR``
>        - n/a
>        - n/a

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 7/8] media: rkvdec: Remove TODO file
  2025-06-23 16:07 ` [PATCH 7/8] media: rkvdec: Remove TODO file Detlev Casanova
@ 2025-07-11 20:00   ` Nicolas Dufresne
  0 siblings, 0 replies; 14+ messages in thread
From: Nicolas Dufresne @ 2025-07-11 20:00 UTC (permalink / raw)
  To: Detlev Casanova, linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Andy Yan, Frank Wang, devicetree, linux-arm-kernel,
	linux-rockchip, Ezequiel Garcia, Mauro Carvalho Chehab,
	Hans Verkuil, Ricardo Ribalda, Hans de Goede, Yunke Cao,
	linux-media, kernel

[-- Attachment #1: Type: text/plain, Size: 1712 bytes --]

Le lundi 23 juin 2025 à 12:07 -0400, Detlev Casanova a écrit :
> 2 items are present in the TODO file:
>  - HEVC support
>  - Evaluate adding helper for rkvdec_request_validate
> 
> Missing HEVC support is not a reason for a driver to be in staging,
> support for different features of the hardware can be added in drivers
> in the main tree.
> 
> The rkvdec_request_validate function was simplified in
> commit 54676d5f5630 ("media: rkvdec: Do not require all controls to be present
> in every request")
> by not setting controls that have not changed.
> As it now basically just calls vb2_request_validate(), there is no need
> for a helper.
> 
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

> ---
>  drivers/staging/media/rkvdec/TODO | 11 -----------
>  1 file changed, 11 deletions(-)
>  delete mode 100644 drivers/staging/media/rkvdec/TODO
> 
> diff --git a/drivers/staging/media/rkvdec/TODO
> b/drivers/staging/media/rkvdec/TODO
> deleted file mode 100644
> index 2c0779383276e..0000000000000
> --- a/drivers/staging/media/rkvdec/TODO
> +++ /dev/null
> @@ -1,11 +0,0 @@
> -* Support for HEVC is planned for this driver.
> -
> -  Given the V4L controls for that CODEC 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.

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 8/8] media: rkvdec: Unstage the driver
  2025-06-23 16:07 ` [PATCH 8/8] media: rkvdec: Unstage the driver Detlev Casanova
@ 2025-07-11 20:02   ` Nicolas Dufresne
  2025-07-15  8:34   ` Diederik de Haas
  1 sibling, 0 replies; 14+ messages in thread
From: Nicolas Dufresne @ 2025-07-11 20:02 UTC (permalink / raw)
  To: Detlev Casanova, linux-kernel
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, Heiko Stuebner,
	Sebastian Reichel, Cristian Ciocaltea, Alexey Charkov,
	Dragan Simic, Jianfeng Liu, Nicolas Frattaroli, Kever Yang,
	Andy Yan, Frank Wang, devicetree, linux-arm-kernel,
	linux-rockchip, Ezequiel Garcia, Mauro Carvalho Chehab,
	Hans Verkuil, Ricardo Ribalda, Hans de Goede, Yunke Cao,
	linux-media, kernel

[-- Attachment #1: Type: text/plain, Size: 6502 bytes --]

Le lundi 23 juin 2025 à 12:07 -0400, Detlev Casanova a écrit :
> The TODO list for unstaging being empty, the driver can now be moved to the
> main media folder.
> 
> Also add myself as maintainer.
> 
> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>

Reviewed-by: Nicolas Dufresne <nicolas.dufresne@collabora.com>

> ---
>  MAINTAINERS                                               | 8 ++++++++
>  drivers/media/platform/rockchip/Kconfig                   | 1 +
>  drivers/media/platform/rockchip/Makefile                  | 1 +
>  .../media => media/platform/rockchip}/rkvdec/Kconfig      | 0
>  .../media => media/platform/rockchip}/rkvdec/Makefile     | 0
>  .../platform/rockchip}/rkvdec/rkvdec-h264.c               | 0
>  .../platform/rockchip}/rkvdec/rkvdec-regs.h               | 0
>  .../media => media/platform/rockchip}/rkvdec/rkvdec-vp9.c | 0
>  .../media => media/platform/rockchip}/rkvdec/rkvdec.c     | 0
>  .../media => media/platform/rockchip}/rkvdec/rkvdec.h     | 0
>  drivers/staging/media/Kconfig                             | 2 --
>  drivers/staging/media/Makefile                            | 1 -
>  12 files changed, 10 insertions(+), 3 deletions(-)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/Kconfig
> (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/Makefile
> (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-
> h264.c (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-
> regs.h (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-vp9.c
> (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec.c
> (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec.h
> (100%)
> 
> diff --git a/MAINTAINERS b/MAINTAINERS
> index c3f7fbd0d67af..d05a153c21526 100644
> --- a/MAINTAINERS
> +++ b/MAINTAINERS
> @@ -21466,6 +21466,14 @@ S:	Maintained
>  F:	Documentation/devicetree/bindings/media/rockchip-rga.yaml
>  F:	drivers/media/platform/rockchip/rga/
>  
> +ROCKCHIP RKVDEC VIDEO DECODER DRIVER
> +M:	Detlev Casanova <detlev.casanova@collabora.com>
> +L:	linux-media@vger.kernel.org
> +L:	linux-rockchip@lists.infradead.org
> +S:	Maintained
> +F:	Documentation/devicetree/bindings/media/rockchip,vdec.yaml
> +F:	drivers/media/platform/rockchip/rkvdec/
> +
>  ROCKCHIP RK3308 INTERNAL AUDIO CODEC
>  M:	Luca Ceresoli <luca.ceresoli@bootlin.com>
>  S:	Maintained
> diff --git a/drivers/media/platform/rockchip/Kconfig
> b/drivers/media/platform/rockchip/Kconfig
> index b41d3960c1b41..9bbeec4996aa2 100644
> --- a/drivers/media/platform/rockchip/Kconfig
> +++ b/drivers/media/platform/rockchip/Kconfig
> @@ -4,3 +4,4 @@ comment "Rockchip media platform drivers"
>  
>  source "drivers/media/platform/rockchip/rga/Kconfig"
>  source "drivers/media/platform/rockchip/rkisp1/Kconfig"
> +source "drivers/media/platform/rockchip/rkvdec/Kconfig"
> diff --git a/drivers/media/platform/rockchip/Makefile
> b/drivers/media/platform/rockchip/Makefile
> index 4f782b876ac9b..286dc5c53f7e1 100644
> --- a/drivers/media/platform/rockchip/Makefile
> +++ b/drivers/media/platform/rockchip/Makefile
> @@ -1,3 +1,4 @@
>  # SPDX-License-Identifier: GPL-2.0-only
>  obj-y += rga/
>  obj-y += rkisp1/
> +obj-y += rkvdec/
> diff --git a/drivers/staging/media/rkvdec/Kconfig
> b/drivers/media/platform/rockchip/rkvdec/Kconfig
> similarity index 100%
> rename from drivers/staging/media/rkvdec/Kconfig
> rename to drivers/media/platform/rockchip/rkvdec/Kconfig
> diff --git a/drivers/staging/media/rkvdec/Makefile
> b/drivers/media/platform/rockchip/rkvdec/Makefile
> similarity index 100%
> rename from drivers/staging/media/rkvdec/Makefile
> rename to drivers/media/platform/rockchip/rkvdec/Makefile
> diff --git a/drivers/staging/media/rkvdec/rkvdec-h264.c
> b/drivers/media/platform/rockchip/rkvdec/rkvdec-h264.c
> similarity index 100%
> rename from drivers/staging/media/rkvdec/rkvdec-h264.c
> rename to drivers/media/platform/rockchip/rkvdec/rkvdec-h264.c
> diff --git a/drivers/staging/media/rkvdec/rkvdec-regs.h
> b/drivers/media/platform/rockchip/rkvdec/rkvdec-regs.h
> similarity index 100%
> rename from drivers/staging/media/rkvdec/rkvdec-regs.h
> rename to drivers/media/platform/rockchip/rkvdec/rkvdec-regs.h
> diff --git a/drivers/staging/media/rkvdec/rkvdec-vp9.c
> b/drivers/media/platform/rockchip/rkvdec/rkvdec-vp9.c
> similarity index 100%
> rename from drivers/staging/media/rkvdec/rkvdec-vp9.c
> rename to drivers/media/platform/rockchip/rkvdec/rkvdec-vp9.c
> diff --git a/drivers/staging/media/rkvdec/rkvdec.c
> b/drivers/media/platform/rockchip/rkvdec/rkvdec.c
> similarity index 100%
> rename from drivers/staging/media/rkvdec/rkvdec.c
> rename to drivers/media/platform/rockchip/rkvdec/rkvdec.c
> diff --git a/drivers/staging/media/rkvdec/rkvdec.h
> b/drivers/media/platform/rockchip/rkvdec/rkvdec.h
> similarity index 100%
> rename from drivers/staging/media/rkvdec/rkvdec.h
> rename to drivers/media/platform/rockchip/rkvdec/rkvdec.h
> diff --git a/drivers/staging/media/Kconfig b/drivers/staging/media/Kconfig
> index b442148543995..b9d52a51841b5 100644
> --- a/drivers/staging/media/Kconfig
> +++ b/drivers/staging/media/Kconfig
> @@ -32,8 +32,6 @@ source "drivers/staging/media/max96712/Kconfig"
>  
>  source "drivers/staging/media/meson/vdec/Kconfig"
>  
> -source "drivers/staging/media/rkvdec/Kconfig"
> -
>  source "drivers/staging/media/starfive/Kconfig"
>  
>  source "drivers/staging/media/sunxi/Kconfig"
> diff --git a/drivers/staging/media/Makefile b/drivers/staging/media/Makefile
> index ad4e9619a9e07..102ca632ddf5c 100644
> --- a/drivers/staging/media/Makefile
> +++ b/drivers/staging/media/Makefile
> @@ -4,7 +4,6 @@ obj-$(CONFIG_INTEL_ATOMISP)     += atomisp/
>  obj-$(CONFIG_VIDEO_IMX_MEDIA)	+= imx/
>  obj-$(CONFIG_VIDEO_MAX96712)	+= max96712/
>  obj-$(CONFIG_VIDEO_MESON_VDEC)	+= meson/vdec/
> -obj-$(CONFIG_VIDEO_ROCKCHIP_VDEC)	+= rkvdec/
>  obj-$(CONFIG_VIDEO_STARFIVE_CAMSS)	+= starfive/
>  obj-$(CONFIG_VIDEO_SUNXI)	+= sunxi/
>  obj-$(CONFIG_VIDEO_TEGRA)	+= tegra-video/

[-- Attachment #2: This is a digitally signed message part --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

* Re: [PATCH 8/8] media: rkvdec: Unstage the driver
  2025-06-23 16:07 ` [PATCH 8/8] media: rkvdec: Unstage the driver Detlev Casanova
  2025-07-11 20:02   ` Nicolas Dufresne
@ 2025-07-15  8:34   ` Diederik de Haas
  1 sibling, 0 replies; 14+ messages in thread
From: Diederik de Haas @ 2025-07-15  8:34 UTC (permalink / raw)
  To: Detlev Casanova, linux-kernel
  Cc: Heiko Stuebner, Kever Yang, Hans Verkuil, kernel, Dragan Simic,
	Rob Herring, Yunke Cao, Sebastian Reichel, linux-rockchip,
	Ezequiel Garcia, linux-media, devicetree, Conor Dooley,
	Frank Wang, Mauro Carvalho Chehab, linux-arm-kernel, Jianfeng Liu,
	Alexey Charkov, Ricardo Ribalda, Andy Yan, Krzysztof Kozlowski,
	Hans de Goede

[-- Attachment #1: Type: text/plain, Size: 2103 bytes --]

Hi,

On Mon Jun 23, 2025 at 6:07 PM CEST, Detlev Casanova wrote:
> The TODO list for unstaging being empty, the driver can now be moved to the
> main media folder.
>
> Also add myself as maintainer.

I've tested this patch on a Rock64 (rk3328) and RockPro64 (rk3399) and
did not notice any regressions. And I no longer see this warning:

  rockchip_vdec: module is from the staging directory, the quality
  is unknown, you have been warned.

Tested-by: Diederik de Haas <didi.debian@cknow.org> # Rock64 + RockPro64

Cheers,
  Diederik

> Signed-off-by: Detlev Casanova <detlev.casanova@collabora.com>
> ---
>  MAINTAINERS                                               | 8 ++++++++
>  drivers/media/platform/rockchip/Kconfig                   | 1 +
>  drivers/media/platform/rockchip/Makefile                  | 1 +
>  .../media => media/platform/rockchip}/rkvdec/Kconfig      | 0
>  .../media => media/platform/rockchip}/rkvdec/Makefile     | 0
>  .../platform/rockchip}/rkvdec/rkvdec-h264.c               | 0
>  .../platform/rockchip}/rkvdec/rkvdec-regs.h               | 0
>  .../media => media/platform/rockchip}/rkvdec/rkvdec-vp9.c | 0
>  .../media => media/platform/rockchip}/rkvdec/rkvdec.c     | 0
>  .../media => media/platform/rockchip}/rkvdec/rkvdec.h     | 0
>  drivers/staging/media/Kconfig                             | 2 --
>  drivers/staging/media/Makefile                            | 1 -
>  12 files changed, 10 insertions(+), 3 deletions(-)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/Kconfig (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/Makefile (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-h264.c (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-regs.h (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec-vp9.c (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec.c (100%)
>  rename drivers/{staging/media => media/platform/rockchip}/rkvdec/rkvdec.h (100%)


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 14+ messages in thread

end of thread, other threads:[~2025-07-15  8:35 UTC | newest]

Thread overview: 14+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-06-23 16:07 [PATCH 0/8] Prepare for new rkvdec variants Detlev Casanova
2025-06-23 16:07 ` [PATCH 1/8] media: dt-bindings: rockchip: Document RK3588 Video Decoder bindings Detlev Casanova
2025-06-23 16:07 ` [PATCH 2/8] media: dt-bindings: rockchip: Add RK3576 " Detlev Casanova
2025-06-27 20:23   ` Rob Herring (Arm)
2025-06-23 16:07 ` [PATCH 3/8] arm64: dts: rockchip: Add the vdpu381 Video Decoders on RK3588 Detlev Casanova
2025-06-23 16:07 ` [PATCH 4/8] arm64: dts: rockchip: Add the vdpu383 Video Decoder on rk3576 Detlev Casanova
2025-06-23 16:07 ` [PATCH 5/8] media: uapi: HEVC: Add v4l2_ctrl_hevc_ext_sps_rps control Detlev Casanova
2025-07-11 19:59   ` Nicolas Dufresne
2025-06-23 16:07 ` [PATCH 6/8] media: v4l2-ctrls: Add hevc_ext_sps_rps control Detlev Casanova
2025-06-23 16:07 ` [PATCH 7/8] media: rkvdec: Remove TODO file Detlev Casanova
2025-07-11 20:00   ` Nicolas Dufresne
2025-06-23 16:07 ` [PATCH 8/8] media: rkvdec: Unstage the driver Detlev Casanova
2025-07-11 20:02   ` Nicolas Dufresne
2025-07-15  8:34   ` Diederik de Haas

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).