2020-07-28 10:08:51

by Kevin Tang

[permalink] [raw]
Subject: [PATCH RFC v6 1/6] dt-bindings: display: add Unisoc's drm master bindings

From: Kevin Tang <[email protected]>

The Unisoc DRM master device is a virtual device needed to list all
DPU devices or other display interface nodes that comprise the
graphics subsystem

Cc: Orson Zhai <[email protected]>
Cc: Chunyan Zhang <[email protected]>
Signed-off-by: Kevin Tang <[email protected]>
---
.../devicetree/bindings/display/sprd/drm.yaml | 36 ++++++++++++++++++++++
1 file changed, 36 insertions(+)
create mode 100644 Documentation/devicetree/bindings/display/sprd/drm.yaml

diff --git a/Documentation/devicetree/bindings/display/sprd/drm.yaml b/Documentation/devicetree/bindings/display/sprd/drm.yaml
new file mode 100644
index 0000000..b5792c0
--- /dev/null
+++ b/Documentation/devicetree/bindings/display/sprd/drm.yaml
@@ -0,0 +1,36 @@
+# SPDX-License-Identifier: GPL-2.0
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/display/sprd/drm.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Unisoc DRM master device
+
+maintainers:
+ - Mark Rutland <[email protected]>
+
+description: |
+ The Unisoc DRM master device is a virtual device needed to list all
+ DPU devices or other display interface nodes that comprise the
+ graphics subsystem.
+
+properties:
+ compatible:
+ const: sprd,display-subsystem
+
+ ports:
+ description:
+ Should contain a list of phandles pointing to display interface port
+ of DPU devices.
+
+required:
+ - compatible
+ - ports
+
+examples:
+ - |
+ display-subsystem {
+ compatible = "sprd,display-subsystem";
+ ports = <&dpu_out>;
+ };
+
--
2.7.4


2020-07-28 20:30:08

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH RFC v6 1/6] dt-bindings: display: add Unisoc's drm master bindings

Hi Kevin

On Tue, Jul 28, 2020 at 06:07:54PM +0800, Kevin Tang wrote:
> From: Kevin Tang <[email protected]>
>
> The Unisoc DRM master device is a virtual device needed to list all
> DPU devices or other display interface nodes that comprise the
> graphics subsystem
>
> Cc: Orson Zhai <[email protected]>
> Cc: Chunyan Zhang <[email protected]>
> Signed-off-by: Kevin Tang <[email protected]>
> ---
> .../devicetree/bindings/display/sprd/drm.yaml | 36 ++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/display/sprd/drm.yaml
>
> diff --git a/Documentation/devicetree/bindings/display/sprd/drm.yaml b/Documentation/devicetree/bindings/display/sprd/drm.yaml
> new file mode 100644
> index 0000000..b5792c0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/sprd/drm.yaml
drm seems like a sub-optimal name.
How about usign the compatible name "display-subsystem" as it is a bit
more specific (but not good).

> @@ -0,0 +1,36 @@
> +# SPDX-License-Identifier: GPL-2.0

Any chance this can be (GPL-2.0-only OR BSD-2-Clause).
I noticed that for example clock/sprd,sc9863a-clk.yaml uses this license
so I hope this is OK.

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/sprd/drm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Unisoc DRM master device
> +
> +maintainers:
> + - Mark Rutland <[email protected]>
> +
> +description: |
> + The Unisoc DRM master device is a virtual device needed to list all
> + DPU devices or other display interface nodes that comprise the
> + graphics subsystem.
> +
> +properties:
> + compatible:
> + const: sprd,display-subsystem
> +
> + ports:
> + description:
> + Should contain a list of phandles pointing to display interface port
> + of DPU devices.
Add type - like this:
$ref: /schemas/types.yaml#/definitions/phandle-array

See for example display/rockchip/rockchip-drm.yaml

Any specific reason why this is not a ports node like used by many other
display bindings?
In other words - I think this is too simple.

> +
> +required:
> + - compatible
> + - ports
> +

Add:
additionalProperties: false

so we catch if other properties sneak in.

> +examples:
> + - |
> + display-subsystem {
> + compatible = "sprd,display-subsystem";
> + ports = <&dpu_out>;
> + };
> +
> --
> 2.7.4
>
> _______________________________________________
> dri-devel mailing list
> [email protected]
> https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-08-26 17:13:00

by Kevin Tang

[permalink] [raw]
Subject: Re: [PATCH RFC v6 1/6] dt-bindings: display: add Unisoc's drm master bindings

Sam Ravnborg <[email protected]> 于2020年7月29日周三 上午4:27写道:
>
> Hi Kevin
>
> On Tue, Jul 28, 2020 at 06:07:54PM +0800, Kevin Tang wrote:
> > From: Kevin Tang <[email protected]>
> >
> > The Unisoc DRM master device is a virtual device needed to list all
> > DPU devices or other display interface nodes that comprise the
> > graphics subsystem
> >
> > Cc: Orson Zhai <[email protected]>
> > Cc: Chunyan Zhang <[email protected]>
> > Signed-off-by: Kevin Tang <[email protected]>
> > ---
> > .../devicetree/bindings/display/sprd/drm.yaml | 36 ++++++++++++++++++++++
> > 1 file changed, 36 insertions(+)
> > create mode 100644 Documentation/devicetree/bindings/display/sprd/drm.yaml
> >
> > diff --git a/Documentation/devicetree/bindings/display/sprd/drm.yaml b/Documentation/devicetree/bindings/display/sprd/drm.yaml
> > new file mode 100644
> > index 0000000..b5792c0
> > --- /dev/null
> > +++ b/Documentation/devicetree/bindings/display/sprd/drm.yaml
> drm seems like a sub-optimal name.
> How about usign the compatible name "display-subsystem" as it is a bit
> more specific (but not good).
You're right, maybe "sprd,drm.yaml" or "sprd-drm.yaml" will be better
>
> > @@ -0,0 +1,36 @@
> > +# SPDX-License-Identifier: GPL-2.0
>
> Any chance this can be (GPL-2.0-only OR BSD-2-Clause).
> I noticed that for example clock/sprd,sc9863a-clk.yaml uses this license
> so I hope this is OK.
I will add GPL-2.0-only to it.
>
> > +%YAML 1.2
> > +---
> > +$id: http://devicetree.org/schemas/display/sprd/drm.yaml#
> > +$schema: http://devicetree.org/meta-schemas/core.yaml#
> > +
> > +title: Unisoc DRM master device
> > +
> > +maintainers:
> > + - Mark Rutland <[email protected]>
> > +
> > +description: |
> > + The Unisoc DRM master device is a virtual device needed to list all
> > + DPU devices or other display interface nodes that comprise the
> > + graphics subsystem.
> > +
> > +properties:
> > + compatible:
> > + const: sprd,display-subsystem
> > +
> > + ports:
> > + description:
> > + Should contain a list of phandles pointing to display interface port
> > + of DPU devices.
> Add type - like this:
> $ref: /schemas/types.yaml#/definitions/phandle-array
>
> See for example display/rockchip/rockchip-drm.yaml
>
> Any specific reason why this is not a ports node like used by many other
> display bindings?
> In other words - I think this is too simple.
We only support one display pipeline now, other interface, like
DP(DisplayPort), HDMI...will be add later...

ports:
$ref: /schemas/types.yaml#/definitions/phandle-array
description: |
Should contain a list of phandles pointing to display interface port
of dpu devices.. dpu definitions as defined in
Documentation/devicetree/bindings/display/sprd/sprd,dpu.yaml


>
> > +
> > +required:
> > + - compatible
> > + - ports
> > +
>
> Add:
> additionalProperties: false
>
> so we catch if other properties sneak in.
>
> > +examples:
> > + - |
> > + display-subsystem {
> > + compatible = "sprd,display-subsystem";
> > + ports = <&dpu_out>;
> > + };
> > +
> > --
> > 2.7.4
> >
> > _______________________________________________
> > dri-devel mailing list
> > [email protected]
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel

2020-08-28 18:02:34

by Sam Ravnborg

[permalink] [raw]
Subject: Re: [PATCH RFC v6 1/6] dt-bindings: display: add Unisoc's drm master bindings

Hi Kevin.

> >
> > Any specific reason why this is not a ports node like used by many other
> > display bindings?
> > In other words - I think this is too simple.
> We only support one display pipeline now, other interface, like
> DP(DisplayPort), HDMI...will be add later...
>
> ports:
> $ref: /schemas/types.yaml#/definitions/phandle-array
> description: |
> Should contain a list of phandles pointing to display interface port
> of dpu devices.. dpu definitions as defined in
> Documentation/devicetree/bindings/display/sprd/sprd,dpu.yaml

There is nothing wrong having a ports node that is limited to a single
port node. But please remember the binding describes the HW - so if the
HW supports more than one port the binding should describe this.
What the driver supports is not relevant for the binding.

Sam

2020-08-28 19:41:35

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH RFC v6 1/6] dt-bindings: display: add Unisoc's drm master bindings

On Tue, Jul 28, 2020 at 4:08 AM Kevin Tang <[email protected]> wrote:
>
> From: Kevin Tang <[email protected]>
>
> The Unisoc DRM master device is a virtual device needed to list all
> DPU devices or other display interface nodes that comprise the
> graphics subsystem
>
> Cc: Orson Zhai <[email protected]>
> Cc: Chunyan Zhang <[email protected]>
> Signed-off-by: Kevin Tang <[email protected]>
> ---
> .../devicetree/bindings/display/sprd/drm.yaml | 36 ++++++++++++++++++++++
> 1 file changed, 36 insertions(+)
> create mode 100644 Documentation/devicetree/bindings/display/sprd/drm.yaml

If you want bindings reviewed, then you need to Cc
[email protected]. Otherwise you may be waiting until the 6th
version or later or never.

>
> diff --git a/Documentation/devicetree/bindings/display/sprd/drm.yaml b/Documentation/devicetree/bindings/display/sprd/drm.yaml
> new file mode 100644
> index 0000000..b5792c0
> --- /dev/null
> +++ b/Documentation/devicetree/bindings/display/sprd/drm.yaml
> @@ -0,0 +1,36 @@
> +# SPDX-License-Identifier: GPL-2.0

New bindings should be dual licensed:

(GPL-2.0-only OR BSD-2-Clause)

> +%YAML 1.2
> +---
> +$id: http://devicetree.org/schemas/display/sprd/drm.yaml#
> +$schema: http://devicetree.org/meta-schemas/core.yaml#
> +
> +title: Unisoc DRM master device

DRM is a Linux thing and shouldn't be part of a binding.

> +
> +maintainers:
> + - Mark Rutland <[email protected]>

No, this should be you or someone that knows the h/w.

> +
> +description: |
> + The Unisoc DRM master device is a virtual device needed to list all
> + DPU devices or other display interface nodes that comprise the
> + graphics subsystem.
> +
> +properties:
> + compatible:
> + const: sprd,display-subsystem
> +
> + ports:
> + description:
> + Should contain a list of phandles pointing to display interface port
> + of DPU devices.
> +
> +required:
> + - compatible
> + - ports
> +
> +examples:
> + - |
> + display-subsystem {
> + compatible = "sprd,display-subsystem";
> + ports = <&dpu_out>;

We generally try to avoid this virtual node as it doesn't represent
any h/w. Can't you bind the driver to the DPU directly?

Rob