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(-)
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.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Maxime Ripard mripard@kernel.org Cc: Rob Herring robh@kernel.org --- .../devicetree/bindings/display/panel/panel-dpi.yaml | 10 ---------- 1 file changed, 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml index f63870384c00..0cd74c8dab42 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml @@ -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 {
Hi Sam,
On Sat, Mar 14, 2020 at 04:30:45PM +0100, Sam Ravnborg wrote:
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.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Maxime Ripard mripard@kernel.org Cc: Rob Herring robh@kernel.org
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...
.../devicetree/bindings/display/panel/panel-dpi.yaml | 10 ---------- 1 file changed, 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml index f63870384c00..0cd74c8dab42 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml @@ -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.
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
Hi Maxime.
On Tue, Mar 17, 2020 at 09:49:59AM +0100, Maxime Ripard wrote:
Hi Sam,
On Sat, Mar 14, 2020 at 04:30:45PM +0100, Sam Ravnborg wrote:
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.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Maxime Ripard mripard@kernel.org Cc: Rob Herring robh@kernel.org
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
.../devicetree/bindings/display/panel/panel-dpi.yaml | 10 ---------- 1 file changed, 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml index f63870384c00..0cd74c8dab42 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml @@ -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.
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
On Tue, Mar 17, 2020 at 12:22:31PM +0100, Sam Ravnborg wrote:
Hi Maxime.
On Tue, Mar 17, 2020 at 09:49:59AM +0100, Maxime Ripard wrote:
Hi Sam,
On Sat, Mar 14, 2020 at 04:30:45PM +0100, Sam Ravnborg wrote:
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.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Maxime Ripard mripard@kernel.org Cc: Rob Herring robh@kernel.org
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.
My bad, it works for me then :)
Maxime
Hi Sam,
Thank you for the patch.
On Sat, Mar 14, 2020 at 04:30:45PM +0100, Sam Ravnborg wrote:
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.
Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
I think this qualifies as a v5.7 fix.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Maxime Ripard mripard@kernel.org Cc: Rob Herring robh@kernel.org
.../devicetree/bindings/display/panel/panel-dpi.yaml | 10 ---------- 1 file changed, 10 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml index f63870384c00..0cd74c8dab42 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml @@ -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 {
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.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Thierry Reding thierry.reding@gmail.com Cc: Rob Herring robh@kernel.org Cc: Maxime Ripard mripard@kernel.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com --- drivers/gpu/drm/panel/panel-simple.c | 11 ----------- 1 file changed, 11 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 0ce81b1f36af..3ad828eaefe1 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -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;
Hi Sam,
Thank you for the patch.
On Sat, Mar 14, 2020 at 04:30:46PM +0100, Sam Ravnborg wrote:
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,
Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Thierry Reding thierry.reding@gmail.com Cc: Rob Herring robh@kernel.org Cc: Maxime Ripard mripard@kernel.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com
drivers/gpu/drm/panel/panel-simple.c | 11 ----------- 1 file changed, 11 deletions(-)
diff --git a/drivers/gpu/drm/panel/panel-simple.c b/drivers/gpu/drm/panel/panel-simple.c index 0ce81b1f36af..3ad828eaefe1 100644 --- a/drivers/gpu/drm/panel/panel-simple.c +++ b/drivers/gpu/drm/panel/panel-simple.c @@ -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;
Fix a few grammar/editorial issues spotted by Laurent Pinchart.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Rob Herring robh@kernel.org --- .../bindings/display/panel/display-timings.yaml | 8 ++++---- .../devicetree/bindings/display/panel/panel-common.yaml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/panel/display-timings.yaml b/Documentation/devicetree/bindings/display/panel/display-timings.yaml index c8c0c9cb0492..56903ded005e 100644 --- a/Documentation/devicetree/bindings/display/panel/display-timings.yaml +++ b/Documentation/devicetree/bindings/display/panel/display-timings.yaml @@ -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 thierry.reding@gmail.com @@ -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": diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml index ed051ba12084..dee4faffd204 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml @@ -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#
Hi Sam,
Thank you for the patch.
On Sat, Mar 14, 2020 at 04:30:47PM +0100, Sam Ravnborg wrote:
Fix a few grammar/editorial issues spotted by Laurent Pinchart.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Rob Herring robh@kernel.org
.../bindings/display/panel/display-timings.yaml | 8 ++++---- .../devicetree/bindings/display/panel/panel-common.yaml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/panel/display-timings.yaml b/Documentation/devicetree/bindings/display/panel/display-timings.yaml index c8c0c9cb0492..56903ded005e 100644 --- a/Documentation/devicetree/bindings/display/panel/display-timings.yaml +++ b/Documentation/devicetree/bindings/display/panel/display-timings.yaml @@ -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 thierry.reding@gmail.com
@@ -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": diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml index ed051ba12084..dee4faffd204 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml @@ -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/
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/ ?
Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
allOf: - $ref: display-timings.yaml#
Hi Laurent.
On Tue, Mar 17, 2020 at 09:25:22PM +0200, Laurent Pinchart wrote:
Hi Sam,
Thank you for the patch.
On Sat, Mar 14, 2020 at 04:30:47PM +0100, Sam Ravnborg wrote:
Fix a few grammar/editorial issues spotted by Laurent Pinchart.
Signed-off-by: Sam Ravnborg sam@ravnborg.org Cc: Laurent Pinchart laurent.pinchart@ideasonboard.com Cc: Rob Herring robh@kernel.org
.../bindings/display/panel/display-timings.yaml | 8 ++++---- .../devicetree/bindings/display/panel/panel-common.yaml | 4 ++-- 2 files changed, 6 insertions(+), 6 deletions(-)
diff --git a/Documentation/devicetree/bindings/display/panel/display-timings.yaml b/Documentation/devicetree/bindings/display/panel/display-timings.yaml index c8c0c9cb0492..56903ded005e 100644 --- a/Documentation/devicetree/bindings/display/panel/display-timings.yaml +++ b/Documentation/devicetree/bindings/display/panel/display-timings.yaml @@ -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 thierry.reding@gmail.com
@@ -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": diff --git a/Documentation/devicetree/bindings/display/panel/panel-common.yaml b/Documentation/devicetree/bindings/display/panel/panel-common.yaml index ed051ba12084..dee4faffd204 100644 --- a/Documentation/devicetree/bindings/display/panel/panel-common.yaml +++ b/Documentation/devicetree/bindings/display/panel/panel-common.yaml @@ -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/
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/ ?
Reviewed-by: Laurent Pinchart laurent.pinchart@ideasonboard.com
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@lists.freedesktop.org