Skip to contentSkip to conversation

rockchip: Split rk3288-vop compatible into big and lit

PATCH In review Jonas Karlman 2 participants 8 messages Sep 21, 2024 – Sep 23, 2024

Subsystems (5)
lore
Share & tools
lore
#0 lore raw

cover rockchip: Split rk3288-vop compatible into big and lit

The Rockchip RK3288 SoC contain two different Visual Output Processor (VOP) blocks, VOP_BIG and VOP_LIT. The VOP blocks support different max output resolution, 3840x2160 and 2560x1600.

This series add compatible to differentiate between the two VOP blocks, backward and forward compatibility is kept for older and newer DTs.

Jonas Karlman (3):
dt-bindings: display: rockchip-vop: Split rk3288-vop into big and lit
ARM: dts: rockchip: Split rk3288-vop into big and lit drm/rockchip: vop: Split rk3288-vop into big and lit

 .../display/rockchip/rockchip-vop.yaml        | 36 +++++++++++--------
 arch/arm/boot/dts/rockchip/rk3288.dtsi        |  4 +--
 drivers/gpu/drm/rockchip/rockchip_vop_reg.c   | 27 ++++++++++----
 3 files changed, 43 insertions(+), 24 deletions(-)
Signature · 1 line
2.46.1
#1 lore raw

PATCH 1/3 dt-bindings: display: rockchip-vop: Split rk3288-vop into big and lit

The Rockchip RK3288 SoC contain two different Visual Output Processor (VOP) blocks, VOP_BIG and VOP_LIT. The VOP blocks support different max output resolution, 3840x2160 and 2560x1600.

Add compatible to differentiate between the two VOP blocks.

---
 .../display/rockchip/rockchip-vop.yaml        | 36 +++++++++++--------
 1 file changed, 21 insertions(+), 15 deletions(-)
Documentation/devicetree/bindings/display/rockchip/rockchip-vop.yaml +21 -15
index b339b7e708c6..ce4169b030af 100644
@@ -17,21 +17,27 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - rockchip,px30-vop-big
-      - rockchip,px30-vop-lit
-      - rockchip,rk3036-vop
-      - rockchip,rk3066-vop
-      - rockchip,rk3126-vop
-      - rockchip,rk3188-vop
-      - rockchip,rk3228-vop
-      - rockchip,rk3288-vop
-      - rockchip,rk3328-vop
-      - rockchip,rk3366-vop
-      - rockchip,rk3368-vop
-      - rockchip,rk3399-vop-big
-      - rockchip,rk3399-vop-lit
-      - rockchip,rv1126-vop
+    oneOf:
+      - items:
+          - enum:
+              - rockchip,rk3288-vop-big
+              - rockchip,rk3288-vop-lit
+          - const: rockchip,rk3288-vop
+      - enum:
+          - rockchip,px30-vop-big
+          - rockchip,px30-vop-lit
+          - rockchip,rk3036-vop
+          - rockchip,rk3066-vop
+          - rockchip,rk3126-vop
+          - rockchip,rk3188-vop
+          - rockchip,rk3228-vop
+          - rockchip,rk3288-vop
+          - rockchip,rk3328-vop
+          - rockchip,rk3366-vop
+          - rockchip,rk3368-vop
+          - rockchip,rk3399-vop-big
+          - rockchip,rk3399-vop-lit
+          - rockchip,rv1126-vop
 
   reg:
     minItems: 1
Signature · 1 line
2.46.1
#2 lore raw

Re: [PATCH 1/3] dt-bindings: display: rockchip-vop: Split rk3288-vop into big and lit

Quoted 39 lines · Jonas Karlman

The Rockchip RK3288 SoC contain two different Visual Output Processor (VOP) blocks, VOP_BIG and VOP_LIT. The VOP blocks support different max output resolution, 3840x2160 and 2560x1600.

Add compatible to differentiate between the two VOP blocks.

---
 .../display/rockchip/rockchip-vop.yaml        | 36 +++++++++++--------
 1 file changed, 21 insertions(+), 15 deletions(-)
Documentation/devicetree/bindings/display/rockchip/rockchip-vop.yaml +5 -15
index b339b7e708c6..ce4169b030af 100644
@@ -17,21 +17,27 @@ maintainers:
 
 properties:
   compatible:
-    enum:
-      - rockchip,px30-vop-big
-      - rockchip,px30-vop-lit
-      - rockchip,rk3036-vop
-      - rockchip,rk3066-vop
-      - rockchip,rk3126-vop
-      - rockchip,rk3188-vop
-      - rockchip,rk3228-vop
-      - rockchip,rk3288-vop
-      - rockchip,rk3328-vop
-      - rockchip,rk3366-vop
-      - rockchip,rk3368-vop
-      - rockchip,rk3399-vop-big
-      - rockchip,rk3399-vop-lit
-      - rockchip,rv1126-vop
+    oneOf:
+      - items:
+          - enum:
+              - rockchip,rk3288-vop-big
+              - rockchip,rk3288-vop-lit

Documentation/devicetree/bindings/display/rockchip/rockchip-vop.yaml maintainers: · line 34

Quoted 10 lines
Documentation/devicetree/bindings/display/rockchip/rockchip-vop.yaml +10 -0
+          - const: rockchip,rk3288-vop
+      - enum:
+          - rockchip,px30-vop-big
+          - rockchip,px30-vop-lit
+          - rockchip,rk3036-vop
+          - rockchip,rk3066-vop
+          - rockchip,rk3126-vop
+          - rockchip,rk3188-vop
+          - rockchip,rk3228-vop
+          - rockchip,rk3288-vop

I think this one should be dropped. You will update all in-kernel users, so it won't be needed here and all other projects should probably follow up.

Best regards,
Krzysztof

#3 lore raw

PATCH 2/3 ARM: dts: rockchip: Split rk3288-vop into big and lit

In reply to Jonas Karlman

The Rockchip RK3288 SoC contain two different Visual Output Processor (VOP) blocks, VOP_BIG and VOP_LIT. The VOP blocks support different max output resolution, 3840x2160 and 2560x1600.

Change compatible to differentiate between VOP_BIG and VOP_LIT, the old compatible is kept for backward compatibility.

---
 arch/arm/boot/dts/rockchip/rk3288.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/rockchip/rk3288.dtsi +2 -2
index 3f1d640afafa..db4a258551f4 100644
@@ -1026,7 +1026,7 @@ rga: rga@ff920000 {
 	};
 
 	vopb: vop@ff930000 {
-		compatible = "rockchip,rk3288-vop";
+		compatible = "rockchip,rk3288-vop-big", "rockchip,rk3288-vop";
 		reg = <0x0 0xff930000 0x0 0x19c>, <0x0 0xff931000 0x0 0x1000>;
 		interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&cru ACLK_VOP0>, <&cru DCLK_VOP0>, <&cru HCLK_VOP0>;
@@ -1075,7 +1075,7 @@ vopb_mmu: iommu@ff930300 {
 	};
 
 	vopl: vop@ff940000 {
-		compatible = "rockchip,rk3288-vop";
+		compatible = "rockchip,rk3288-vop-lit", "rockchip,rk3288-vop";
 		reg = <0x0 0xff940000 0x0 0x19c>, <0x0 0xff941000 0x0 0x1000>;
 		interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
 		clocks = <&cru ACLK_VOP1>, <&cru DCLK_VOP1>, <&cru HCLK_VOP1>;
Signature · 1 line
2.46.1
#4 lore raw

PATCH 3/3 drm/rockchip: vop: Split rk3288-vop into big and lit

In reply to Jonas Karlman

The Rockchip RK3288 SoC contain two different Visual Output Processor (VOP) blocks, VOP_BIG and VOP_LIT. The VOP blocks support different max output resolution, 3840x2160 and 2560x1600.

Add support for the compatible used to differentiate between VOP_BIG and VOP_LIT, support for the old compatible is kept for compatibility with older device tree.

---
 drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 27 +++++++++++++++------
 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/gpu/drm/rockchip/rockchip_vop_reg.c +20 -7
index e2c6ba26f437..978db93cda33 100644
@@ -762,7 +762,7 @@ static const struct vop_intr rk3288_vop_intr = {
 	.clear = VOP_REG(RK3288_INTR_CTRL0, 0xf, 8),
 };
 
-static const struct vop_data rk3288_vop = {
+static const struct vop_data rk3288_vop_big = {
 	.version = VOP_VERSION(3, 1),
 	.feature = VOP_FEATURE_OUTPUT_RGB10,
 	.intr = &rk3288_vop_intr,
@@ -772,14 +772,22 @@ static const struct vop_data rk3288_vop = {
 	.win = rk3288_vop_win_data,
 	.win_size = ARRAY_SIZE(rk3288_vop_win_data),
 	.lut_size = 1024,
-	/*
-	 * This is the maximum resolution for the VOPB, the VOPL can only do
-	 * 2560x1600, but we can't distinguish them as they have the same
-	 * compatible.
-	 */
 	.max_output = { 3840, 2160 },
 };
 
+static const struct vop_data rk3288_vop_lit = {
+	.version = VOP_VERSION(3, 1),
+	.feature = VOP_FEATURE_OUTPUT_RGB10,
+	.intr = &rk3288_vop_intr,
+	.common = &rk3288_common,
+	.modeset = &rk3288_modeset,
+	.output = &rk3288_output,
+	.win = rk3288_vop_win_data,
+	.win_size = ARRAY_SIZE(rk3288_vop_win_data),
+	.lut_size = 1024,
+	.max_output = { 2560, 1600 },
+};
+
 static const int rk3368_vop_intrs[] = {
 	FS_INTR,
 	0, 0,
@@ -1245,8 +1253,13 @@ static const struct of_device_id vop_driver_dt_match[] = {
 	  .data = &rk3066_vop },
 	{ .compatible = "rockchip,rk3188-vop",
 	  .data = &rk3188_vop },
+	{ .compatible = "rockchip,rk3288-vop-big",
+	  .data = &rk3288_vop_big },
+	{ .compatible = "rockchip,rk3288-vop-lit",
+	  .data = &rk3288_vop_lit },
+	/* rockchip,rk3288-vop kept for backward compatibility */
 	{ .compatible = "rockchip,rk3288-vop",
-	  .data = &rk3288_vop },
+	  .data = &rk3288_vop_big },
 	{ .compatible = "rockchip,rk3368-vop",
 	  .data = &rk3368_vop },
 	{ .compatible = "rockchip,rk3366-vop",
Signature · 1 line
2.46.1
#5 lore raw

Re: [PATCH 3/3] drm/rockchip: vop: Split rk3288-vop into big and lit

Quoted 55 lines · Jonas Karlman

The Rockchip RK3288 SoC contain two different Visual Output Processor (VOP) blocks, VOP_BIG and VOP_LIT. The VOP blocks support different max output resolution, 3840x2160 and 2560x1600.

Add support for the compatible used to differentiate between VOP_BIG and VOP_LIT, support for the old compatible is kept for compatibility with older device tree.

---
 drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 27 +++++++++++++++------
 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/gpu/drm/rockchip/rockchip_vop_reg.c +14 -6
index e2c6ba26f437..978db93cda33 100644
@@ -762,7 +762,7 @@ static const struct vop_intr rk3288_vop_intr = {
 	.clear = VOP_REG(RK3288_INTR_CTRL0, 0xf, 8),
 };
 
-static const struct vop_data rk3288_vop = {
+static const struct vop_data rk3288_vop_big = {
 	.version = VOP_VERSION(3, 1),
 	.feature = VOP_FEATURE_OUTPUT_RGB10,
 	.intr = &rk3288_vop_intr,
@@ -772,14 +772,22 @@ static const struct vop_data rk3288_vop = {
 	.win = rk3288_vop_win_data,
 	.win_size = ARRAY_SIZE(rk3288_vop_win_data),
 	.lut_size = 1024,
-	/*
-	 * This is the maximum resolution for the VOPB, the VOPL can only do
-	 * 2560x1600, but we can't distinguish them as they have the same
-	 * compatible.
-	 */
 	.max_output = { 3840, 2160 },
 };
 
+static const struct vop_data rk3288_vop_lit = {
+	.version = VOP_VERSION(3, 1),
+	.feature = VOP_FEATURE_OUTPUT_RGB10,
+	.intr = &rk3288_vop_intr,
+	.common = &rk3288_common,
+	.modeset = &rk3288_modeset,
+	.output = &rk3288_output,
+	.win = rk3288_vop_win_data,
+	.win_size = ARRAY_SIZE(rk3288_vop_win_data),
+	.lut_size = 1024,
+	.max_output = { 2560, 1600 },
+};
+
 static const int rk3368_vop_intrs[] = {
 	FS_INTR,
 	0, 0,

drivers/gpu/drm/rockchip/rockchip_vop_reg.c static const struct of_device_id vop_driver_dt_match[] = { · line 1257

Quoted 5 lines
drivers/gpu/drm/rockchip/rockchip_vop_reg.c +2 -0
@@ -1245,8 +1253,13 @@ static const struct of_device_id vop_driver_dt_match[] = {
 	  .data = &rk3066_vop },
 	{ .compatible = "rockchip,rk3188-vop",
 	  .data = &rk3188_vop },
+	{ .compatible = "rockchip,rk3288-vop-big",
+	  .data = &rk3288_vop_big },

Hm... that's not really needed. Instead of having three compatibles, you could keep "rk3288-vop" as big and then my comment on bindings patch could be ignored (you keep the compatible).

Best regards,
Krzysztof

#6 lore raw

Re: [PATCH 3/3] drm/rockchip: vop: Split rk3288-vop into big and lit

Hi Krzysztof,

Quoted 57 lines · Krzysztof Kozlowski
Quoted 56 lines · Jonas Karlman

The Rockchip RK3288 SoC contain two different Visual Output Processor (VOP) blocks, VOP_BIG and VOP_LIT. The VOP blocks support different max output resolution, 3840x2160 and 2560x1600.

Add support for the compatible used to differentiate between VOP_BIG and VOP_LIT, support for the old compatible is kept for compatibility with older device tree.

---
 drivers/gpu/drm/rockchip/rockchip_vop_reg.c | 27 +++++++++++++++------
 1 file changed, 20 insertions(+), 7 deletions(-)
drivers/gpu/drm/rockchip/rockchip_vop_reg.c +14 -6
index e2c6ba26f437..978db93cda33 100644
@@ -762,7 +762,7 @@ static const struct vop_intr rk3288_vop_intr = {
 	.clear = VOP_REG(RK3288_INTR_CTRL0, 0xf, 8),
 };
 
-static const struct vop_data rk3288_vop = {
+static const struct vop_data rk3288_vop_big = {
 	.version = VOP_VERSION(3, 1),
 	.feature = VOP_FEATURE_OUTPUT_RGB10,
 	.intr = &rk3288_vop_intr,
@@ -772,14 +772,22 @@ static const struct vop_data rk3288_vop = {
 	.win = rk3288_vop_win_data,
 	.win_size = ARRAY_SIZE(rk3288_vop_win_data),
 	.lut_size = 1024,
-	/*
-	 * This is the maximum resolution for the VOPB, the VOPL can only do
-	 * 2560x1600, but we can't distinguish them as they have the same
-	 * compatible.
-	 */
 	.max_output = { 3840, 2160 },
 };
 
+static const struct vop_data rk3288_vop_lit = {
+	.version = VOP_VERSION(3, 1),
+	.feature = VOP_FEATURE_OUTPUT_RGB10,
+	.intr = &rk3288_vop_intr,
+	.common = &rk3288_common,
+	.modeset = &rk3288_modeset,
+	.output = &rk3288_output,
+	.win = rk3288_vop_win_data,
+	.win_size = ARRAY_SIZE(rk3288_vop_win_data),
+	.lut_size = 1024,
+	.max_output = { 2560, 1600 },
+};
+
 static const int rk3368_vop_intrs[] = {
 	FS_INTR,
 	0, 0,
@@ -1245,8 +1253,13 @@ static const struct of_device_id vop_driver_dt_match[] = {
 	  .data = &rk3066_vop },
Quoted 8 lines

drivers/gpu/drm/rockchip/rockchip_vop_reg.c static const struct of_device_id vop_driver_dt_match[] = { · line 1257

Quoted 4 lines
drivers/gpu/drm/rockchip/rockchip_vop_reg.c +2 -0
 	{ .compatible = "rockchip,rk3188-vop",
 	  .data = &rk3188_vop },
+	{ .compatible = "rockchip,rk3288-vop-big",
+	  .data = &rk3288_vop_big },

Hm... that's not really needed. Instead of having three compatibles, you could keep "rk3288-vop" as big and then my comment on bindings patch could be ignored (you keep the compatible).

Thanks, I guess that just adding a new compatible for vop-lit should be enough.

VOP_BIG: rockchip,rk3288-vop
VOP_LIT: rockchip,rk3288-vop-lit, rockchip,rk3288-vop

That should ensure backward/forward compatibility with any mix of old/new boot-firmware, DTs and kernels.

Will change to use that in v2.

Regards,
Jonas

Quoted 6 lines

Best regards,
Krzysztof

#7 lore raw

Re: [PATCH 3/3] drm/rockchip: vop: Split rk3288-vop into big and lit

Quoted 15 lines · Jonas Karlman
Quoted 11 lines

drivers/gpu/drm/rockchip/rockchip_vop_reg.c static const struct of_device_id vop_driver_dt_match[] = { · line 1257

Quoted 7 lines
drivers/gpu/drm/rockchip/rockchip_vop_reg.c +2 -0
 	0, 0,
@@ -1245,8 +1253,13 @@ static const struct of_device_id vop_driver_dt_match[] = {
 	  .data = &rk3066_vop },
 	{ .compatible = "rockchip,rk3188-vop",
 	  .data = &rk3188_vop },
+	{ .compatible = "rockchip,rk3288-vop-big",
+	  .data = &rk3288_vop_big },

Hm... that's not really needed. Instead of having three compatibles, you could keep "rk3288-vop" as big and then my comment on bindings patch could be ignored (you keep the compatible).

Thanks, I guess that just adding a new compatible for vop-lit should be enough.

Quoted 7 lines

VOP_BIG: rockchip,rk3288-vop
VOP_LIT: rockchip,rk3288-vop-lit, rockchip,rk3288-vop

That should ensure backward/forward compatibility with any mix of old/new boot-firmware, DTs and kernels.

Will change to use that in v2.

Yes, thanks.

Best regards,
Krzysztof