linux-renesas-soc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/3] dt-bindings: display: renesas: du: Add vendor prefix to vsps property
@ 2019-11-05 18:35 Geert Uytterhoeven
  2019-11-05 18:35 ` [PATCH 1/3] " Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2019-11-05 18:35 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Magnus Damm
  Cc: dri-devel, linux-renesas-soc, devicetree, Geert Uytterhoeven

	Hi all,

When the Renesas-specific "vsps" property for the Renesas Display Unit
was introduced, it was forgotten to add a vendor prefix.

Hence this patch series fixes that in DT bindings, Linux driver, and DT
source files.  The driver retains backward compatibility with old DTBs
by falling back to the old property name when needed.

The first two patches are against Laurent's drm/du/next branch.
The last patch is against renesas-devel, and must be postponed until the
second patch has landed upstream.

Thanks!

Geert Uytterhoeven (3):
  dt-bindings: display: renesas: du: Add vendor prefix to vsps property
  drm: rcar-du: Recognize "renesas,vsps" in addition to "vsps"
  arm64: dts: renesas: rcar-gen3: Replace "vsps" by "renesas,vsps"

 .../devicetree/bindings/display/renesas,du.txt  | 12 ++++++------
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi       |  2 +-
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi       |  2 +-
 arch/arm64/boot/dts/renesas/r8a774c0.dtsi       |  3 ++-
 arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi    |  2 +-
 arch/arm64/boot/dts/renesas/r8a7795.dtsi        |  3 ++-
 arch/arm64/boot/dts/renesas/r8a7796.dtsi        |  2 +-
 arch/arm64/boot/dts/renesas/r8a77965.dtsi       |  2 +-
 arch/arm64/boot/dts/renesas/r8a77970.dtsi       |  3 ++-
 arch/arm64/boot/dts/renesas/r8a77980.dtsi       |  3 ++-
 arch/arm64/boot/dts/renesas/r8a77990.dtsi       |  2 +-
 arch/arm64/boot/dts/renesas/r8a77995.dtsi       |  2 +-
 drivers/gpu/drm/rcar-du/rcar_du_kms.c           | 17 ++++++++++++-----
 13 files changed, 33 insertions(+), 22 deletions(-)

-- 
2.17.1

Gr{oetje,eeting}s,

						Geert

--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
							    -- Linus Torvalds

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

* [PATCH 1/3] dt-bindings: display: renesas: du: Add vendor prefix to vsps property
  2019-11-05 18:35 [PATCH 0/3] dt-bindings: display: renesas: du: Add vendor prefix to vsps property Geert Uytterhoeven
@ 2019-11-05 18:35 ` Geert Uytterhoeven
  2019-11-07  0:44   ` Rob Herring
  2019-11-07  2:29   ` Laurent Pinchart
  2019-11-05 18:35 ` [PATCH 2/3] drm: rcar-du: Recognize "renesas,vsps" in addition to "vsps" Geert Uytterhoeven
  2019-11-05 18:35 ` [PATCH 3/3] arm64: dts: renesas: rcar-gen3: Replace "vsps" by "renesas,vsps" Geert Uytterhoeven
  2 siblings, 2 replies; 8+ messages in thread
From: Geert Uytterhoeven @ 2019-11-05 18:35 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Magnus Damm
  Cc: dri-devel, linux-renesas-soc, devicetree, Geert Uytterhoeven

The Renesas-specific "vsps" property lacks a vendor prefix.
Add a "renesas," prefix to comply with DT best practises.

Move "renesas,vsps" below "renesas,cmms" to preserve alphabetical sort
order.

Fixes: 06711e6385a4ab4c ("drm: rcar-du: Document the vsps property in the DT bindings")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 .../devicetree/bindings/display/renesas,du.txt       | 12 ++++++------
 1 file changed, 6 insertions(+), 6 deletions(-)

diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
index f6fdaa67c257a046..eb4ae41fe41f83c7 100644
--- a/Documentation/devicetree/bindings/display/renesas,du.txt
+++ b/Documentation/devicetree/bindings/display/renesas,du.txt
@@ -41,15 +41,15 @@ Required Properties:
       supplied they must be named "dclkin.x" with "x" being the input clock
       numerical index.
 
-  - vsps: A list of phandle and channel index tuples to the VSPs that handle
-    the memory interfaces for the DU channels. The phandle identifies the VSP
-    instance that serves the DU channel, and the channel index identifies the
-    LIF instance in that VSP.
-
   - renesas,cmms: A list of phandles to the CMM instances present in the SoC,
     one for each available DU channel. The property shall not be specified for
     SoCs that do not provide any CMM (such as V3M and V3H).
 
+  - renesas,vsps: A list of phandle and channel index tuples to the VSPs that
+    handle the memory interfaces for the DU channels. The phandle identifies the
+    VSP instance that serves the DU channel, and the channel index identifies
+    the LIF instance in that VSP.
+
 Required nodes:
 
 The connections to the DU output video ports are modeled using the OF graph
@@ -96,8 +96,8 @@ Example: R8A7795 (R-Car H3) ES2.0 DU
 			 <&cpg CPG_MOD 722>,
 			 <&cpg CPG_MOD 721>;
 		clock-names = "du.0", "du.1", "du.2", "du.3";
-		vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd0 1>;
 		renesas,cmms = <&cmm0>, <&cmm1>, <&cmm2>, <&cmm3>;
+		renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd0 1>;
 
 		ports {
 			#address-cells = <1>;
-- 
2.17.1


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

* [PATCH 2/3] drm: rcar-du: Recognize "renesas,vsps" in addition to "vsps"
  2019-11-05 18:35 [PATCH 0/3] dt-bindings: display: renesas: du: Add vendor prefix to vsps property Geert Uytterhoeven
  2019-11-05 18:35 ` [PATCH 1/3] " Geert Uytterhoeven
@ 2019-11-05 18:35 ` Geert Uytterhoeven
  2019-11-07  2:31   ` Laurent Pinchart
  2019-11-05 18:35 ` [PATCH 3/3] arm64: dts: renesas: rcar-gen3: Replace "vsps" by "renesas,vsps" Geert Uytterhoeven
  2 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2019-11-05 18:35 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Magnus Damm
  Cc: dri-devel, linux-renesas-soc, devicetree, Geert Uytterhoeven

The Renesas-specific "vsps" property lacks a vendor prefix.
Add a "renesas," prefix to comply with DT best practises.
Retain backward compatibility with old DTBs by falling back to "vsps"
when needed.

Fixes: 6d62ef3ac30be756 ("drm: rcar-du: Expose the VSP1 compositor through KMS planes")
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
 drivers/gpu/drm/rcar-du/rcar_du_kms.c | 17 ++++++++++++-----
 1 file changed, 12 insertions(+), 5 deletions(-)

diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
index 186422ac552b2870..b14676f7a9f17501 100644
--- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
+++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
@@ -544,6 +544,7 @@ static int rcar_du_properties_init(struct rcar_du_device *rcdu)
 static int rcar_du_vsps_init(struct rcar_du_device *rcdu)
 {
 	const struct device_node *np = rcdu->dev->of_node;
+	const char *vsps_prop_name = "renesas,vsps";
 	struct of_phandle_args args;
 	struct {
 		struct device_node *np;
@@ -559,15 +560,21 @@ static int rcar_du_vsps_init(struct rcar_du_device *rcdu)
 	 * entry contains a pointer to the VSP DT node and a bitmask of the
 	 * connected DU CRTCs.
 	 */
-	cells = of_property_count_u32_elems(np, "vsps") / rcdu->num_crtcs - 1;
+	ret = of_property_count_u32_elems(np, vsps_prop_name);
+	if (ret < 0) {
+		/* Backward compatibility with old DTBs */
+		vsps_prop_name = "vsps";
+		ret = of_property_count_u32_elems(np, vsps_prop_name);
+	}
+	cells = ret / rcdu->num_crtcs - 1;
 	if (cells > 1)
 		return -EINVAL;
 
 	for (i = 0; i < rcdu->num_crtcs; ++i) {
 		unsigned int j;
 
-		ret = of_parse_phandle_with_fixed_args(np, "vsps", cells, i,
-						       &args);
+		ret = of_parse_phandle_with_fixed_args(np, vsps_prop_name,
+						       cells, i, &args);
 		if (ret < 0)
 			goto error;
 
@@ -589,8 +596,8 @@ static int rcar_du_vsps_init(struct rcar_du_device *rcdu)
 
 		/*
 		 * Store the VSP pointer and pipe index in the CRTC. If the
-		 * second cell of the 'vsps' specifier isn't present, default
-		 * to 0 to remain compatible with older DT bindings.
+		 * second cell of the 'renesas,vsps' specifier isn't present,
+		 * default to 0 to remain compatible with older DT bindings.
 		 */
 		rcdu->crtcs[i].vsp = &rcdu->vsps[j];
 		rcdu->crtcs[i].vsp_pipe = cells >= 1 ? args.args[0] : 0;
-- 
2.17.1


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

* [PATCH 3/3] arm64: dts: renesas: rcar-gen3: Replace "vsps" by "renesas,vsps"
  2019-11-05 18:35 [PATCH 0/3] dt-bindings: display: renesas: du: Add vendor prefix to vsps property Geert Uytterhoeven
  2019-11-05 18:35 ` [PATCH 1/3] " Geert Uytterhoeven
  2019-11-05 18:35 ` [PATCH 2/3] drm: rcar-du: Recognize "renesas,vsps" in addition to "vsps" Geert Uytterhoeven
@ 2019-11-05 18:35 ` Geert Uytterhoeven
  2019-11-07  2:28   ` Laurent Pinchart
  2 siblings, 1 reply; 8+ messages in thread
From: Geert Uytterhoeven @ 2019-11-05 18:35 UTC (permalink / raw)
  To: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter,
	Rob Herring, Mark Rutland, Magnus Damm
  Cc: dri-devel, linux-renesas-soc, devicetree, Geert Uytterhoeven

The Renesas-specific "vsps" property lacks a vendor prefix.
Add a "renesas," prefix to comply with DT best practises.

Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
---
This depends on '[PATCH 2/3] drm: rcar-du: Recognize "renesas,vsps" in
addition to "vsps"'.
---
 arch/arm64/boot/dts/renesas/r8a774a1.dtsi    | 2 +-
 arch/arm64/boot/dts/renesas/r8a774b1.dtsi    | 2 +-
 arch/arm64/boot/dts/renesas/r8a774c0.dtsi    | 3 ++-
 arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi | 2 +-
 arch/arm64/boot/dts/renesas/r8a7795.dtsi     | 3 ++-
 arch/arm64/boot/dts/renesas/r8a7796.dtsi     | 2 +-
 arch/arm64/boot/dts/renesas/r8a77965.dtsi    | 2 +-
 arch/arm64/boot/dts/renesas/r8a77970.dtsi    | 3 ++-
 arch/arm64/boot/dts/renesas/r8a77980.dtsi    | 3 ++-
 arch/arm64/boot/dts/renesas/r8a77990.dtsi    | 2 +-
 arch/arm64/boot/dts/renesas/r8a77995.dtsi    | 2 +-
 11 files changed, 15 insertions(+), 11 deletions(-)

diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
index 34a9f472fbb43072..0a48b53c3f9dcd69 100644
--- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
@@ -2640,7 +2640,7 @@
 			clock-names = "du.0", "du.1", "du.2";
 			status = "disabled";
 
-			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>;
+			renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>;
 
 			ports {
 				#address-cells = <1>;
diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
index fe78387e4bb866ec..2ef0e136c84dcd25 100644
--- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
@@ -2486,7 +2486,7 @@
 			clock-names = "du.0", "du.1", "du.3";
 			status = "disabled";
 
-			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
+			renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
 
 			ports {
 				#address-cells = <1>;
diff --git a/arch/arm64/boot/dts/renesas/r8a774c0.dtsi b/arch/arm64/boot/dts/renesas/r8a774c0.dtsi
index c7bdc3606323fc97..40aceb6681474f0d 100644
--- a/arch/arm64/boot/dts/renesas/r8a774c0.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a774c0.dtsi
@@ -1813,7 +1813,8 @@
 			clocks = <&cpg CPG_MOD 724>,
 				 <&cpg CPG_MOD 723>;
 			clock-names = "du.0", "du.1";
-			vsps = <&vspd0 0>, <&vspd1 0>;
+			renesas,vsps = <&vspd0 0>, <&vspd1 0>;
+
 			status = "disabled";
 
 			ports {
diff --git a/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi b/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi
index 14d8513d2a47336f..29b20e8aca5863e4 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi
@@ -30,7 +30,7 @@
 };
 
 &du {
-	vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd3 0>;
+	renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd3 0>;
 };
 
 &fcpvb1 {
diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
index fde6ec122d3b4006..c7b4ece0ab3ee03f 100644
--- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
@@ -3184,7 +3184,8 @@
 			clock-names = "du.0", "du.1", "du.2", "du.3";
 
 			renesas,cmms = <&cmm0>, <&cmm1>, <&cmm2>, <&cmm3>;
-			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd0 1>;
+			renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>,
+				       <&vspd0 1>;
 
 			status = "disabled";
 
diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
index b9db882b0351155c..95fa1608add896bf 100644
--- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
@@ -2824,7 +2824,7 @@
 			clock-names = "du.0", "du.1", "du.2";
 
 			renesas,cmms = <&cmm0>, <&cmm1>, <&cmm2>;
-			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>;
+			renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>;
 
 			status = "disabled";
 
diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
index bdbe197774d2f659..fb48dabb25adaf77 100644
--- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
@@ -2500,7 +2500,7 @@
 			clock-names = "du.0", "du.1", "du.3";
 
 			renesas,cmms = <&cmm0>, <&cmm1>, <&cmm3>;
-			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
+			renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
 
 			status = "disabled";
 
diff --git a/arch/arm64/boot/dts/renesas/r8a77970.dtsi b/arch/arm64/boot/dts/renesas/r8a77970.dtsi
index 0d0558e53533f0dc..c47608c3e0fa066f 100644
--- a/arch/arm64/boot/dts/renesas/r8a77970.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77970.dtsi
@@ -1121,7 +1121,8 @@
 			clock-names = "du.0";
 			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
 			resets = <&cpg 724>;
-			vsps = <&vspd0 0>;
+			renesas,vsps = <&vspd0 0>;
+
 			status = "disabled";
 
 			ports {
diff --git a/arch/arm64/boot/dts/renesas/r8a77980.dtsi b/arch/arm64/boot/dts/renesas/r8a77980.dtsi
index 4d86669af819f089..53a01265233901fe 100644
--- a/arch/arm64/boot/dts/renesas/r8a77980.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77980.dtsi
@@ -1496,7 +1496,8 @@
 			clock-names = "du.0";
 			power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
 			resets = <&cpg 724>;
-			vsps = <&vspd0 0>;
+			renesas,vsps = <&vspd0 0>;
+
 			status = "disabled";
 
 			ports {
diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
index 67a6824a962c57a1..8283eb311eac6334 100644
--- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
@@ -1791,7 +1791,7 @@
 			reset-names = "du.0";
 
 			renesas,cmms = <&cmm0>, <&cmm1>;
-			vsps = <&vspd0 0>, <&vspd1 0>;
+			renesas,vsps = <&vspd0 0>, <&vspd1 0>;
 
 			status = "disabled";
 
diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
index e6ee2b709ba61bd3..d969d7347cf872a4 100644
--- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
+++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
@@ -1024,7 +1024,7 @@
 			reset-names = "du.0";
 
 			renesas,cmms = <&cmm0>, <&cmm1>;
-			vsps = <&vspd0 0>, <&vspd1 0>;
+			renesas,vsps = <&vspd0 0>, <&vspd1 0>;
 
 			status = "disabled";
 
-- 
2.17.1


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

* Re: [PATCH 1/3] dt-bindings: display: renesas: du: Add vendor prefix to vsps property
  2019-11-05 18:35 ` [PATCH 1/3] " Geert Uytterhoeven
@ 2019-11-07  0:44   ` Rob Herring
  2019-11-07  2:29   ` Laurent Pinchart
  1 sibling, 0 replies; 8+ messages in thread
From: Rob Herring @ 2019-11-07  0:44 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Laurent Pinchart, Kieran Bingham, David Airlie, Daniel Vetter,
	Mark Rutland, Magnus Damm, dri-devel, linux-renesas-soc,
	devicetree, Geert Uytterhoeven

On Tue,  5 Nov 2019 19:35:02 +0100, Geert Uytterhoeven wrote:
> The Renesas-specific "vsps" property lacks a vendor prefix.
> Add a "renesas," prefix to comply with DT best practises.
> 
> Move "renesas,vsps" below "renesas,cmms" to preserve alphabetical sort
> order.
> 
> Fixes: 06711e6385a4ab4c ("drm: rcar-du: Document the vsps property in the DT bindings")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
>  .../devicetree/bindings/display/renesas,du.txt       | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 

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

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

* Re: [PATCH 3/3] arm64: dts: renesas: rcar-gen3: Replace "vsps" by "renesas,vsps"
  2019-11-05 18:35 ` [PATCH 3/3] arm64: dts: renesas: rcar-gen3: Replace "vsps" by "renesas,vsps" Geert Uytterhoeven
@ 2019-11-07  2:28   ` Laurent Pinchart
  0 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2019-11-07  2:28 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Magnus Damm, dri-devel, linux-renesas-soc,
	devicetree

Hi Geert,

Thank you for the patch.

On Tue, Nov 05, 2019 at 07:35:04PM +0100, Geert Uytterhoeven wrote:
> The Renesas-specific "vsps" property lacks a vendor prefix.
> Add a "renesas," prefix to comply with DT best practises.
> 
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
> ---
> This depends on '[PATCH 2/3] drm: rcar-du: Recognize "renesas,vsps" in
> addition to "vsps"'.

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

(once 2/3 will be upstream)

> ---
>  arch/arm64/boot/dts/renesas/r8a774a1.dtsi    | 2 +-
>  arch/arm64/boot/dts/renesas/r8a774b1.dtsi    | 2 +-
>  arch/arm64/boot/dts/renesas/r8a774c0.dtsi    | 3 ++-
>  arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi | 2 +-
>  arch/arm64/boot/dts/renesas/r8a7795.dtsi     | 3 ++-
>  arch/arm64/boot/dts/renesas/r8a7796.dtsi     | 2 +-
>  arch/arm64/boot/dts/renesas/r8a77965.dtsi    | 2 +-
>  arch/arm64/boot/dts/renesas/r8a77970.dtsi    | 3 ++-
>  arch/arm64/boot/dts/renesas/r8a77980.dtsi    | 3 ++-
>  arch/arm64/boot/dts/renesas/r8a77990.dtsi    | 2 +-
>  arch/arm64/boot/dts/renesas/r8a77995.dtsi    | 2 +-
>  11 files changed, 15 insertions(+), 11 deletions(-)
> 
> diff --git a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
> index 34a9f472fbb43072..0a48b53c3f9dcd69 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774a1.dtsi
> @@ -2640,7 +2640,7 @@
>  			clock-names = "du.0", "du.1", "du.2";
>  			status = "disabled";
>  
> -			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>;
> +			renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>;
>  
>  			ports {
>  				#address-cells = <1>;
> diff --git a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> index fe78387e4bb866ec..2ef0e136c84dcd25 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774b1.dtsi
> @@ -2486,7 +2486,7 @@
>  			clock-names = "du.0", "du.1", "du.3";
>  			status = "disabled";
>  
> -			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
> +			renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
>  
>  			ports {
>  				#address-cells = <1>;
> diff --git a/arch/arm64/boot/dts/renesas/r8a774c0.dtsi b/arch/arm64/boot/dts/renesas/r8a774c0.dtsi
> index c7bdc3606323fc97..40aceb6681474f0d 100644
> --- a/arch/arm64/boot/dts/renesas/r8a774c0.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a774c0.dtsi
> @@ -1813,7 +1813,8 @@
>  			clocks = <&cpg CPG_MOD 724>,
>  				 <&cpg CPG_MOD 723>;
>  			clock-names = "du.0", "du.1";
> -			vsps = <&vspd0 0>, <&vspd1 0>;
> +			renesas,vsps = <&vspd0 0>, <&vspd1 0>;
> +
>  			status = "disabled";
>  
>  			ports {
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi b/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi
> index 14d8513d2a47336f..29b20e8aca5863e4 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7795-es1.dtsi
> @@ -30,7 +30,7 @@
>  };
>  
>  &du {
> -	vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd3 0>;
> +	renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd3 0>;
>  };
>  
>  &fcpvb1 {
> diff --git a/arch/arm64/boot/dts/renesas/r8a7795.dtsi b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> index fde6ec122d3b4006..c7b4ece0ab3ee03f 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7795.dtsi
> @@ -3184,7 +3184,8 @@
>  			clock-names = "du.0", "du.1", "du.2", "du.3";
>  
>  			renesas,cmms = <&cmm0>, <&cmm1>, <&cmm2>, <&cmm3>;
> -			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd0 1>;
> +			renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>,
> +				       <&vspd0 1>;
>  
>  			status = "disabled";
>  
> diff --git a/arch/arm64/boot/dts/renesas/r8a7796.dtsi b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> index b9db882b0351155c..95fa1608add896bf 100644
> --- a/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a7796.dtsi
> @@ -2824,7 +2824,7 @@
>  			clock-names = "du.0", "du.1", "du.2";
>  
>  			renesas,cmms = <&cmm0>, <&cmm1>, <&cmm2>;
> -			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>;
> +			renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>;
>  
>  			status = "disabled";
>  
> diff --git a/arch/arm64/boot/dts/renesas/r8a77965.dtsi b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
> index bdbe197774d2f659..fb48dabb25adaf77 100644
> --- a/arch/arm64/boot/dts/renesas/r8a77965.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77965.dtsi
> @@ -2500,7 +2500,7 @@
>  			clock-names = "du.0", "du.1", "du.3";
>  
>  			renesas,cmms = <&cmm0>, <&cmm1>, <&cmm3>;
> -			vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
> +			renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd0 1>;
>  
>  			status = "disabled";
>  
> diff --git a/arch/arm64/boot/dts/renesas/r8a77970.dtsi b/arch/arm64/boot/dts/renesas/r8a77970.dtsi
> index 0d0558e53533f0dc..c47608c3e0fa066f 100644
> --- a/arch/arm64/boot/dts/renesas/r8a77970.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77970.dtsi
> @@ -1121,7 +1121,8 @@
>  			clock-names = "du.0";
>  			power-domains = <&sysc R8A77970_PD_ALWAYS_ON>;
>  			resets = <&cpg 724>;
> -			vsps = <&vspd0 0>;
> +			renesas,vsps = <&vspd0 0>;
> +
>  			status = "disabled";
>  
>  			ports {
> diff --git a/arch/arm64/boot/dts/renesas/r8a77980.dtsi b/arch/arm64/boot/dts/renesas/r8a77980.dtsi
> index 4d86669af819f089..53a01265233901fe 100644
> --- a/arch/arm64/boot/dts/renesas/r8a77980.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77980.dtsi
> @@ -1496,7 +1496,8 @@
>  			clock-names = "du.0";
>  			power-domains = <&sysc R8A77980_PD_ALWAYS_ON>;
>  			resets = <&cpg 724>;
> -			vsps = <&vspd0 0>;
> +			renesas,vsps = <&vspd0 0>;
> +
>  			status = "disabled";
>  
>  			ports {
> diff --git a/arch/arm64/boot/dts/renesas/r8a77990.dtsi b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
> index 67a6824a962c57a1..8283eb311eac6334 100644
> --- a/arch/arm64/boot/dts/renesas/r8a77990.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77990.dtsi
> @@ -1791,7 +1791,7 @@
>  			reset-names = "du.0";
>  
>  			renesas,cmms = <&cmm0>, <&cmm1>;
> -			vsps = <&vspd0 0>, <&vspd1 0>;
> +			renesas,vsps = <&vspd0 0>, <&vspd1 0>;
>  
>  			status = "disabled";
>  
> diff --git a/arch/arm64/boot/dts/renesas/r8a77995.dtsi b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> index e6ee2b709ba61bd3..d969d7347cf872a4 100644
> --- a/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> +++ b/arch/arm64/boot/dts/renesas/r8a77995.dtsi
> @@ -1024,7 +1024,7 @@
>  			reset-names = "du.0";
>  
>  			renesas,cmms = <&cmm0>, <&cmm1>;
> -			vsps = <&vspd0 0>, <&vspd1 0>;
> +			renesas,vsps = <&vspd0 0>, <&vspd1 0>;
>  
>  			status = "disabled";
>  

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 1/3] dt-bindings: display: renesas: du: Add vendor prefix to vsps property
  2019-11-05 18:35 ` [PATCH 1/3] " Geert Uytterhoeven
  2019-11-07  0:44   ` Rob Herring
@ 2019-11-07  2:29   ` Laurent Pinchart
  1 sibling, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2019-11-07  2:29 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Magnus Damm, dri-devel, linux-renesas-soc,
	devicetree

Hi Geert,

Thank you for the patch.

On Tue, Nov 05, 2019 at 07:35:02PM +0100, Geert Uytterhoeven wrote:
> The Renesas-specific "vsps" property lacks a vendor prefix.
> Add a "renesas," prefix to comply with DT best practises.
> 
> Move "renesas,vsps" below "renesas,cmms" to preserve alphabetical sort
> order.
> 
> Fixes: 06711e6385a4ab4c ("drm: rcar-du: Document the vsps property in the DT bindings")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and taken in my tree.

> ---
>  .../devicetree/bindings/display/renesas,du.txt       | 12 ++++++------
>  1 file changed, 6 insertions(+), 6 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/display/renesas,du.txt b/Documentation/devicetree/bindings/display/renesas,du.txt
> index f6fdaa67c257a046..eb4ae41fe41f83c7 100644
> --- a/Documentation/devicetree/bindings/display/renesas,du.txt
> +++ b/Documentation/devicetree/bindings/display/renesas,du.txt
> @@ -41,15 +41,15 @@ Required Properties:
>        supplied they must be named "dclkin.x" with "x" being the input clock
>        numerical index.
>  
> -  - vsps: A list of phandle and channel index tuples to the VSPs that handle
> -    the memory interfaces for the DU channels. The phandle identifies the VSP
> -    instance that serves the DU channel, and the channel index identifies the
> -    LIF instance in that VSP.
> -
>    - renesas,cmms: A list of phandles to the CMM instances present in the SoC,
>      one for each available DU channel. The property shall not be specified for
>      SoCs that do not provide any CMM (such as V3M and V3H).
>  
> +  - renesas,vsps: A list of phandle and channel index tuples to the VSPs that
> +    handle the memory interfaces for the DU channels. The phandle identifies the
> +    VSP instance that serves the DU channel, and the channel index identifies
> +    the LIF instance in that VSP.
> +
>  Required nodes:
>  
>  The connections to the DU output video ports are modeled using the OF graph
> @@ -96,8 +96,8 @@ Example: R8A7795 (R-Car H3) ES2.0 DU
>  			 <&cpg CPG_MOD 722>,
>  			 <&cpg CPG_MOD 721>;
>  		clock-names = "du.0", "du.1", "du.2", "du.3";
> -		vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd0 1>;
>  		renesas,cmms = <&cmm0>, <&cmm1>, <&cmm2>, <&cmm3>;
> +		renesas,vsps = <&vspd0 0>, <&vspd1 0>, <&vspd2 0>, <&vspd0 1>;
>  
>  		ports {
>  			#address-cells = <1>;

-- 
Regards,

Laurent Pinchart

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

* Re: [PATCH 2/3] drm: rcar-du: Recognize "renesas,vsps" in addition to "vsps"
  2019-11-05 18:35 ` [PATCH 2/3] drm: rcar-du: Recognize "renesas,vsps" in addition to "vsps" Geert Uytterhoeven
@ 2019-11-07  2:31   ` Laurent Pinchart
  0 siblings, 0 replies; 8+ messages in thread
From: Laurent Pinchart @ 2019-11-07  2:31 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Kieran Bingham, David Airlie, Daniel Vetter, Rob Herring,
	Mark Rutland, Magnus Damm, dri-devel, linux-renesas-soc,
	devicetree

Hi Geert,

Thank you for the patch.

On Tue, Nov 05, 2019 at 07:35:03PM +0100, Geert Uytterhoeven wrote:
> The Renesas-specific "vsps" property lacks a vendor prefix.
> Add a "renesas," prefix to comply with DT best practises.
> Retain backward compatibility with old DTBs by falling back to "vsps"
> when needed.
> 
> Fixes: 6d62ef3ac30be756 ("drm: rcar-du: Expose the VSP1 compositor through KMS planes")
> Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>

Reviewed-by: Laurent Pinchart <laurent.pinchart@ideasonboard.com>

and taken in my tree (with a small change below).

> ---
>  drivers/gpu/drm/rcar-du/rcar_du_kms.c | 17 ++++++++++++-----
>  1 file changed, 12 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/rcar-du/rcar_du_kms.c b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
> index 186422ac552b2870..b14676f7a9f17501 100644
> --- a/drivers/gpu/drm/rcar-du/rcar_du_kms.c
> +++ b/drivers/gpu/drm/rcar-du/rcar_du_kms.c
> @@ -544,6 +544,7 @@ static int rcar_du_properties_init(struct rcar_du_device *rcdu)
>  static int rcar_du_vsps_init(struct rcar_du_device *rcdu)
>  {
>  	const struct device_node *np = rcdu->dev->of_node;
> +	const char *vsps_prop_name = "renesas,vsps";
>  	struct of_phandle_args args;
>  	struct {
>  		struct device_node *np;
> @@ -559,15 +560,21 @@ static int rcar_du_vsps_init(struct rcar_du_device *rcdu)
>  	 * entry contains a pointer to the VSP DT node and a bitmask of the
>  	 * connected DU CRTCs.
>  	 */
> -	cells = of_property_count_u32_elems(np, "vsps") / rcdu->num_crtcs - 1;
> +	ret = of_property_count_u32_elems(np, vsps_prop_name);
> +	if (ret < 0) {
> +		/* Backward compatibility with old DTBs */

s/DTBs/DTBs./

> +		vsps_prop_name = "vsps";
> +		ret = of_property_count_u32_elems(np, vsps_prop_name);
> +	}
> +	cells = ret / rcdu->num_crtcs - 1;
>  	if (cells > 1)
>  		return -EINVAL;
>  
>  	for (i = 0; i < rcdu->num_crtcs; ++i) {
>  		unsigned int j;
>  
> -		ret = of_parse_phandle_with_fixed_args(np, "vsps", cells, i,
> -						       &args);
> +		ret = of_parse_phandle_with_fixed_args(np, vsps_prop_name,
> +						       cells, i, &args);
>  		if (ret < 0)
>  			goto error;
>  
> @@ -589,8 +596,8 @@ static int rcar_du_vsps_init(struct rcar_du_device *rcdu)
>  
>  		/*
>  		 * Store the VSP pointer and pipe index in the CRTC. If the
> -		 * second cell of the 'vsps' specifier isn't present, default
> -		 * to 0 to remain compatible with older DT bindings.
> +		 * second cell of the 'renesas,vsps' specifier isn't present,
> +		 * default to 0 to remain compatible with older DT bindings.
>  		 */
>  		rcdu->crtcs[i].vsp = &rcdu->vsps[j];
>  		rcdu->crtcs[i].vsp_pipe = cells >= 1 ? args.args[0] : 0;

-- 
Regards,

Laurent Pinchart

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

end of thread, other threads:[~2019-11-07  2:31 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2019-11-05 18:35 [PATCH 0/3] dt-bindings: display: renesas: du: Add vendor prefix to vsps property Geert Uytterhoeven
2019-11-05 18:35 ` [PATCH 1/3] " Geert Uytterhoeven
2019-11-07  0:44   ` Rob Herring
2019-11-07  2:29   ` Laurent Pinchart
2019-11-05 18:35 ` [PATCH 2/3] drm: rcar-du: Recognize "renesas,vsps" in addition to "vsps" Geert Uytterhoeven
2019-11-07  2:31   ` Laurent Pinchart
2019-11-05 18:35 ` [PATCH 3/3] arm64: dts: renesas: rcar-gen3: Replace "vsps" by "renesas,vsps" Geert Uytterhoeven
2019-11-07  2:28   ` Laurent Pinchart

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).