Skip to contentSkip to conversation

drm: drop data-mapping property from panel-dpi

PATCH In review Sam Ravnborg 3 participants 11 messages Mar 14, 2020 – Mar 21, 2020

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

cover drm: drop data-mapping property from panel-dpi

With the review of Laurent Pinchart we realised that the data-mapping property introduced in panel-dpi binding is not the right solution.

Remove it now, while we are working on finding a better way to specify the interface between panels and display interfaces.

Include a patch to fix some grammar issues spotted in the same review.

Sam

Sam Ravnborg (3):
dt-bindings: display: drop data-mapping from panel-dpi drm/panel-simple: drop use of data-mapping property
dt-bindings: display: grammar fixes in panel/

 .../devicetree/bindings/display/panel/display-timings.yaml    |  8 ++++----
 .../devicetree/bindings/display/panel/panel-common.yaml       |  4 ++--
 .../devicetree/bindings/display/panel/panel-dpi.yaml          | 10 ----------
 drivers/gpu/drm/panel/panel-simple.c                          | 11 -----------
 4 files changed, 6 insertions(+), 27 deletions(-)

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#1 lore raw

PATCH 1/3 dt-bindings: display: drop data-mapping from panel-dpi

data-mapping may not be the best way to describe the data format used between panels and display interface.

Drop it from the panel-dpi binding so we do not start to rely on it. We can then work out how to best describe this mapping and when we know it, we can add it to this binding.

Cc Laurent Pinchart <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Rob Herring <[email protected]>
---
 .../devicetree/bindings/display/panel/panel-dpi.yaml   | 10 ----------
 1 file changed, 10 deletions(-)
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +0 -10
index f63870384c00..0cd74c8dab42 100644
@@ -21,15 +21,6 @@ properties:
       - {}
       - const: panel-dpi
 
-  data-mapping:
-    enum:
-      - rgb24
-      - rgb565
-      - bgr666
-    description: |
-      Describes the media format, how the display panel is connected
-      to the display interface.
-
   backlight: true
   enable-gpios: true
   height-mm: true
@@ -52,7 +43,6 @@ examples:
         compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
         label = "osddisplay";
         power-supply = <&vcc_supply>;
-        data-mapping = "rgb565";
         backlight = <&backlight>;
 
         port {
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#2 lore raw

Re: [PATCH v1 1/3] dt-bindings: display: drop data-mapping from panel-dpi

Hi Sam,

Quoted 11 lines · Sam Ravnborg

data-mapping may not be the best way to describe the data format used between panels and display interface.

Drop it from the panel-dpi binding so we do not start to rely on it. We can then work out how to best describe this mapping and when we know it, we can add it to this binding.

Cc Laurent Pinchart <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Rob Herring <[email protected]>

I can't say whether it's the right decision or not, but if you want to go forward with this, you should maintain the backward compatibility, so leave the code to deal with this as a fallback solution...

Quoted 11 lines
---
 .../devicetree/bindings/display/panel/panel-dpi.yaml   | 10 ----------
 1 file changed, 10 deletions(-)
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +0 -0
index f63870384c00..0cd74c8dab42 100644
@@ -21,15 +21,6 @@ properties:
       - {}
       - const: panel-dpi

Documentation/devicetree/bindings/display/panel/panel-dpi.yaml properties: · line 32

Quoted 10 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +0 -9
 
-  data-mapping:
-    enum:
-      - rgb24
-      - rgb565
-      - bgr666
-    description: |
-      Describes the media format, how the display panel is connected
-      to the display interface.
-

And keep that DT property documented too.

You can express that it's only here for compatibility using the deprecated keyword though.

It doesn't do anything at the moment, but the next spec of the schema language uses it, so as soon as the library implements it we'll report it.

Maxime

#3 lore raw

Re: [PATCH v1 1/3] dt-bindings: display: drop data-mapping from panel-dpi

Hi Maxime.

Quoted 10 lines · Maxime Ripard

Hi Sam,

Quoted 7 lines · Sam Ravnborg

data-mapping may not be the best way to describe the data format used between panels and display interface.

Drop it from the panel-dpi binding so we do not start to rely on it. We can then work out how to best describe this mapping and when we know it, we can add it to this binding.

Quoted 8 lines
Quoted 4 lines
Cc Laurent Pinchart <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Rob Herring <[email protected]>

I can't say whether it's the right decision or not, but if you want to go forward with this, you should maintain the backward compatibility, so leave the code to deal with this as a fallback solution...

This was all introduced very recently and is for now only present in drm-misc-next.
The idea was to revert is *before* people started to rely on this new mapping. So we avoid all the backward compatibility fun.
I had hoped the revert could land before the 5.7 pull, alas that was not the case.

Sam

Quoted 25 lines
Quoted 12 lines
---
 .../devicetree/bindings/display/panel/panel-dpi.yaml   | 10 ----------
 1 file changed, 10 deletions(-)
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +0 -0
index f63870384c00..0cd74c8dab42 100644
@@ -21,15 +21,6 @@ properties:
       - {}
       - const: panel-dpi

Documentation/devicetree/bindings/display/panel/panel-dpi.yaml properties: · line 32

Quoted 10 lines
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +0 -9
 
-  data-mapping:
-    enum:
-      - rgb24
-      - rgb565
-      - bgr666
-    description: |
-      Describes the media format, how the display panel is connected
-      to the display interface.
-

And keep that DT property documented too.

Quoted 8 lines

You can express that it's only here for compatibility using the deprecated keyword though.

It doesn't do anything at the moment, but the next spec of the schema language uses it, so as soon as the library implements it we'll report it.

Maxime

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel

#4 lore raw

Re: [PATCH v1 1/3] dt-bindings: display: drop data-mapping from panel-dpi

Quoted 22 lines · Sam Ravnborg

Hi Maxime.

Quoted 10 lines · Maxime Ripard

Hi Sam,

Quoted 7 lines · Sam Ravnborg

data-mapping may not be the best way to describe the data format used between panels and display interface.

Drop it from the panel-dpi binding so we do not start to rely on it. We can then work out how to best describe this mapping and when we know it, we can add it to this binding.

Quoted 8 lines
Quoted 4 lines
Cc Laurent Pinchart <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Rob Herring <[email protected]>

I can't say whether it's the right decision or not, but if you want to go forward with this, you should maintain the backward compatibility, so leave the code to deal with this as a fallback solution...

Quoted 6 lines

This was all introduced very recently and is for now only present in drm-misc-next.
The idea was to revert is *before* people started to rely on this new mapping. So we avoid all the backward compatibility fun.
I had hoped the revert could land before the 5.7 pull, alas that was not the case.

My bad, it works for me then :)

Maxime

Reviewed-by on v1 1/3
#5 lore raw

Re: [PATCH v1 1/3] dt-bindings: display: drop data-mapping from panel-dpi

In reply to Sam Ravnborg

Hi Sam,

Thank you for the patch.

Quoted 6 lines · Sam Ravnborg

data-mapping may not be the best way to describe the data format used between panels and display interface.

Drop it from the panel-dpi binding so we do not start to rely on it. We can then work out how to best describe this mapping and when we know it, we can add it to this binding.

I certainly welcome that, as we need to define how to express this information in a more detailed way, taking into account all use cases.

I think this qualifies as a v5.7 fix.

Quoted 36 lines
Cc Laurent Pinchart <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Rob Herring <[email protected]>
---
 .../devicetree/bindings/display/panel/panel-dpi.yaml   | 10 ----------
 1 file changed, 10 deletions(-)
Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +0 -10
index f63870384c00..0cd74c8dab42 100644
@@ -21,15 +21,6 @@ properties:
       - {}
       - const: panel-dpi
 
-  data-mapping:
-    enum:
-      - rgb24
-      - rgb565
-      - bgr666
-    description: |
-      Describes the media format, how the display panel is connected
-      to the display interface.
-
   backlight: true
   enable-gpios: true
   height-mm: true
@@ -52,7 +43,6 @@ examples:
         compatible = "osddisplays,osd057T0559-34ts", "panel-dpi";
         label = "osddisplay";
         power-supply = <&vcc_supply>;
-        data-mapping = "rgb565";
         backlight = <&backlight>;
 
         port {
Signature · 3 lines
Regards,

Laurent Pinchart
#6 lore raw

PATCH 2/3 drm/panel-simple: drop use of data-mapping property

In reply to Sam Ravnborg

The "data-mapping" property may not be the best way to describe the interface between panels and display interfaces.
Drop use of in the panel-simple driver, so we have time to find the right way to describe this interface.

Cc Thierry Reding <[email protected]>
Cc Rob Herring <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Laurent Pinchart <[email protected]>
---
 drivers/gpu/drm/panel/panel-simple.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/gpu/drm/panel/panel-simple.c +0 -11
index 0ce81b1f36af..3ad828eaefe1 100644
@@ -361,7 +361,6 @@ static int panel_dpi_probe(struct device *dev,
 	struct panel_desc *desc;
 	unsigned int bus_flags;
 	struct videomode vm;
-	const char *mapping;
 	int ret;
 
 	np = dev->of_node;
@@ -386,16 +385,6 @@ static int panel_dpi_probe(struct device *dev,
 	of_property_read_u32(np, "width-mm", &desc->size.width);
 	of_property_read_u32(np, "height-mm", &desc->size.height);
 
-	of_property_read_string(np, "data-mapping", &mapping);
-	if (!strcmp(mapping, "rgb24"))
-		desc->bus_format = MEDIA_BUS_FMT_RGB888_1X24;
-	else if (!strcmp(mapping, "rgb565"))
-		desc->bus_format = MEDIA_BUS_FMT_RGB565_1X16;
-	else if (!strcmp(mapping, "bgr666"))
-		desc->bus_format = MEDIA_BUS_FMT_RGB666_1X18;
-	else if (!strcmp(mapping, "lvds666"))
-		desc->bus_format = MEDIA_BUS_FMT_RGB666_1X24_CPADHI;
-
 	/* Extract bus_flags from display_timing */
 	bus_flags = 0;
 	vm.flags = timing->flags;
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 2/3
#7 lore raw

Re: [PATCH v1 2/3] drm/panel-simple: drop use of data-mapping property

Hi Sam,

Thank you for the patch.

Quoted 4 lines · Sam Ravnborg

The "data-mapping" property may not be the best way to describe the interface between panels and display interfaces.
Drop use of in the panel-simple driver, so we have time to find the right way to describe this interface.

For the same reason as for patch 1/3,

Quoted 38 lines
Cc Thierry Reding <[email protected]>
Cc Rob Herring <[email protected]>
Cc Maxime Ripard <[email protected]>
Cc Laurent Pinchart <[email protected]>
---
 drivers/gpu/drm/panel/panel-simple.c | 11 -----------
 1 file changed, 11 deletions(-)
drivers/gpu/drm/panel/panel-simple.c +0 -11
index 0ce81b1f36af..3ad828eaefe1 100644
@@ -361,7 +361,6 @@ static int panel_dpi_probe(struct device *dev,
 	struct panel_desc *desc;
 	unsigned int bus_flags;
 	struct videomode vm;
-	const char *mapping;
 	int ret;
 
 	np = dev->of_node;
@@ -386,16 +385,6 @@ static int panel_dpi_probe(struct device *dev,
 	of_property_read_u32(np, "width-mm", &desc->size.width);
 	of_property_read_u32(np, "height-mm", &desc->size.height);
 
-	of_property_read_string(np, "data-mapping", &mapping);
-	if (!strcmp(mapping, "rgb24"))
-		desc->bus_format = MEDIA_BUS_FMT_RGB888_1X24;
-	else if (!strcmp(mapping, "rgb565"))
-		desc->bus_format = MEDIA_BUS_FMT_RGB565_1X16;
-	else if (!strcmp(mapping, "bgr666"))
-		desc->bus_format = MEDIA_BUS_FMT_RGB666_1X18;
-	else if (!strcmp(mapping, "lvds666"))
-		desc->bus_format = MEDIA_BUS_FMT_RGB666_1X24_CPADHI;
-
 	/* Extract bus_flags from display_timing */
 	bus_flags = 0;
 	vm.flags = timing->flags;
Signature · 3 lines
Regards,

Laurent Pinchart
#8 lore raw

PATCH 3/3 dt-bindings: display: grammar fixes in panel/

In reply to Sam Ravnborg

Fix a few grammar/editorial issues spotted by Laurent Pinchart.

Cc Laurent Pinchart <[email protected]>
Cc Rob Herring <[email protected]>
---
 .../bindings/display/panel/display-timings.yaml           | 8 ++++----
 .../devicetree/bindings/display/panel/panel-common.yaml   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/display/panel/display-timings.yaml +4 -4
index c8c0c9cb0492..56903ded005e 100644
@@ -4,7 +4,7 @@
 $id: http://devicetree.org/schemas/display/panel/display-timings.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: display timing bindings
+title: display timings bindings
 
 maintainers:
   - Thierry Reding <[email protected]>
@@ -14,7 +14,7 @@ maintainers:
 description: |
   A display panel may be able to handle several display timings,
   with different resolutions.
-  The display-timings node makes it possible to specify the timing
+  The display-timings node makes it possible to specify the timings
   and to specify the timing that is native for the display.
 
 properties:
@@ -25,8 +25,8 @@ properties:
     $ref: /schemas/types.yaml#/definitions/phandle
     description: |
       The default display timing is the one specified as native-mode.
-      If no native-mode is specified then the first node is assumed the
-      native mode.
+      If no native-mode is specified then the first node is assumed
+      to be the native mode.
 
 patternProperties:
   "^timing":
Documentation/devicetree/bindings/display/panel/panel-common.yaml +2 -2
index ed051ba12084..dee4faffd204 100644
@@ -63,9 +63,9 @@ properties:
 
   display-timings:
     description:
-      Some display panels supports several resolutions with different timing.
+      Some display panels supports several resolutions with different timings.
       The display-timings bindings supports specifying several timings and
-      optional specify which is the native mode.
+      optionally specify which is the native mode.
     allOf:
       - $ref: display-timings.yaml#
 
Signature · 6 lines
2.20.1

_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
Reviewed-by on v1 3/3
#9 lore raw

Re: [PATCH v1 3/3] dt-bindings: display: grammar fixes in panel/

Hi Sam,

Thank you for the patch.

Quoted 48 lines · Sam Ravnborg

Fix a few grammar/editorial issues spotted by Laurent Pinchart.

Cc Laurent Pinchart <[email protected]>
Cc Rob Herring <[email protected]>
---
 .../bindings/display/panel/display-timings.yaml           | 8 ++++----
 .../devicetree/bindings/display/panel/panel-common.yaml   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/display/panel/display-timings.yaml +4 -4
index c8c0c9cb0492..56903ded005e 100644
@@ -4,7 +4,7 @@
 $id: http://devicetree.org/schemas/display/panel/display-timings.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: display timing bindings
+title: display timings bindings
 
 maintainers:
   - Thierry Reding <[email protected]>
@@ -14,7 +14,7 @@ maintainers:
 description: |
   A display panel may be able to handle several display timings,
   with different resolutions.
-  The display-timings node makes it possible to specify the timing
+  The display-timings node makes it possible to specify the timings
   and to specify the timing that is native for the display.
 
 properties:
@@ -25,8 +25,8 @@ properties:
     $ref: /schemas/types.yaml#/definitions/phandle
     description: |
       The default display timing is the one specified as native-mode.
-      If no native-mode is specified then the first node is assumed the
-      native mode.
+      If no native-mode is specified then the first node is assumed
+      to be the native mode.
 
 patternProperties:
   "^timing":
Documentation/devicetree/bindings/display/panel/panel-common.yaml +0 -0
index ed051ba12084..dee4faffd204 100644

Documentation/devicetree/bindings/display/panel/panel-common.yaml properties: · line 66

Quoted 5 lines
Documentation/devicetree/bindings/display/panel/panel-common.yaml +1 -1
@@ -63,9 +63,9 @@ properties:
 
   display-timings:
     description:
-      Some display panels supports several resolutions with different timing.
+      Some display panels supports several resolutions with different timings.

s/supports/support/

Documentation/devicetree/bindings/display/panel/panel-common.yaml properties: · line 68

Quoted 3 lines
Documentation/devicetree/bindings/display/panel/panel-common.yaml +1 -1
       The display-timings bindings supports specifying several timings and
-      optional specify which is the native mode.
+      optionally specify which is the native mode.

s/specify/specifying/ ?

Quoted 3 lines
Documentation/devicetree/bindings/display/panel/panel-common.yaml +0 -0
     allOf:
       - $ref: display-timings.yaml#
 
Signature · 7 lines
Regards,

Laurent Pinchart
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel
#10 lore raw

Re: [PATCH v1 3/3] dt-bindings: display: grammar fixes in panel/

Hi Laurent.

Quoted 61 lines · Laurent Pinchart

Hi Sam,

Thank you for the patch.

Quoted 48 lines · Sam Ravnborg

Fix a few grammar/editorial issues spotted by Laurent Pinchart.

Cc Laurent Pinchart <[email protected]>
Cc Rob Herring <[email protected]>
---
 .../bindings/display/panel/display-timings.yaml           | 8 ++++----
 .../devicetree/bindings/display/panel/panel-common.yaml   | 4 ++--
 2 files changed, 6 insertions(+), 6 deletions(-)
Documentation/devicetree/bindings/display/panel/display-timings.yaml +4 -4
index c8c0c9cb0492..56903ded005e 100644
@@ -4,7 +4,7 @@
 $id: http://devicetree.org/schemas/display/panel/display-timings.yaml#
 $schema: http://devicetree.org/meta-schemas/core.yaml#
 
-title: display timing bindings
+title: display timings bindings
 
 maintainers:
   - Thierry Reding <[email protected]>
@@ -14,7 +14,7 @@ maintainers:
 description: |
   A display panel may be able to handle several display timings,
   with different resolutions.
-  The display-timings node makes it possible to specify the timing
+  The display-timings node makes it possible to specify the timings
   and to specify the timing that is native for the display.
 
 properties:
@@ -25,8 +25,8 @@ properties:
     $ref: /schemas/types.yaml#/definitions/phandle
     description: |
       The default display timing is the one specified as native-mode.
-      If no native-mode is specified then the first node is assumed the
-      native mode.
+      If no native-mode is specified then the first node is assumed
+      to be the native mode.
 
 patternProperties:
   "^timing":
Documentation/devicetree/bindings/display/panel/panel-common.yaml +0 -0
index ed051ba12084..dee4faffd204 100644

Documentation/devicetree/bindings/display/panel/panel-common.yaml properties: · line 66

Quoted 5 lines
Documentation/devicetree/bindings/display/panel/panel-common.yaml +1 -1
@@ -63,9 +63,9 @@ properties:
 
   display-timings:
     description:
-      Some display panels supports several resolutions with different timing.
+      Some display panels supports several resolutions with different timings.

s/supports/support/

Quoted 7 lines

Documentation/devicetree/bindings/display/panel/panel-common.yaml properties: · line 68

Quoted 3 lines
Documentation/devicetree/bindings/display/panel/panel-common.yaml +1 -1
       The display-timings bindings supports specifying several timings and
-      optional specify which is the native mode.
+      optionally specify which is the native mode.

s/specify/specifying/ ?

Fixed the above and applied this patch to drm-misc-next. The other patches awaits that drm-misc-next-fixes is ready

Sam
_______________________________________________
dri-devel mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/dri-devel