* [PATCH v1 0/2] drm/panel: simple: add bus-format support for panel-dpi
@ 2022-05-16 16:28 Max Krummenacher
2022-05-16 16:28 ` [PATCH v1 1/2] dt-bindings: display: add new bus-format property " Max Krummenacher
0 siblings, 1 reply; 3+ messages in thread
From: Max Krummenacher @ 2022-05-16 16:28 UTC (permalink / raw)
To: max.krummenacher
Cc: Christoph Niedermaier, Laurent Pinchart, Marek Vasut,
Francesco Dolcini, Maxime Ripard, Dave Stevenson, Daniel Vetter,
David Airlie, Krzysztof Kozlowski, Rob Herring, Sam Ravnborg,
Thierry Reding, devicetree, dri-devel, linux-kernel
From: Max Krummenacher <max.krummenacher@toradex.com>
Commit 4a1d0dbc8332 ("drm/panel: simple: add panel-dpi support") added
support for defining a panel from device tree provided data.
However support for setting the bus format is missing, so that with
the current implementation a 'panel-dpi' panel can only be used
if the driver of the display interface connected can cope with a
missing bus_format.
This patch series defines the new property bus-format and adds it to
the panel-dpi implementation.
Check initial discussions [1] and [2].
[1] https://lore.kernel.org/all/20220201110717.3585-1-cniedermaier@dh-electronics.com/
[2] https://lore.kernel.org/all/20220222084723.14310-1-max.krummenacher@toradex.com/
Max Krummenacher (2):
dt-bindings: display: add new bus-format property for panel-dpi
drm/panel: simple: add bus-format support for panel-dpi
.../bindings/display/panel/panel-dpi.yaml | 11 +++++
drivers/gpu/drm/panel/panel-simple.c | 43 +++++++++++++++++++
.../dt-bindings/display/dt-media-bus-format.h | 23 ++++++++++
3 files changed, 77 insertions(+)
create mode 100644 include/dt-bindings/display/dt-media-bus-format.h
--
2.20.1
^ permalink raw reply [flat|nested] 3+ messages in thread* [PATCH v1 1/2] dt-bindings: display: add new bus-format property for panel-dpi
2022-05-16 16:28 [PATCH v1 0/2] drm/panel: simple: add bus-format support for panel-dpi Max Krummenacher
@ 2022-05-16 16:28 ` Max Krummenacher
2022-05-17 12:40 ` Rob Herring
0 siblings, 1 reply; 3+ messages in thread
From: Max Krummenacher @ 2022-05-16 16:28 UTC (permalink / raw)
To: max.krummenacher
Cc: Christoph Niedermaier, Laurent Pinchart, Marek Vasut,
Francesco Dolcini, Maxime Ripard, Dave Stevenson, Daniel Vetter,
David Airlie, Krzysztof Kozlowski, Rob Herring, Sam Ravnborg,
Thierry Reding, devicetree, dri-devel, linux-kernel
From: Max Krummenacher <max.krummenacher@toradex.com>
The property is used to set the enum bus_format and infer the bpc
for a panel defined by 'panel-dpi'.
This specifies how the panel is connected to the display interface.
Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
---
.../bindings/display/panel/panel-dpi.yaml | 11 +++++++++
.../dt-bindings/display/dt-media-bus-format.h | 23 +++++++++++++++++++
2 files changed, 34 insertions(+)
create mode 100644 include/dt-bindings/display/dt-media-bus-format.h
diff --git a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
index dae0676b5c6e..ca44e96c3001 100644
--- a/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
+++ b/Documentation/devicetree/bindings/display/panel/panel-dpi.yaml
@@ -21,6 +21,14 @@ properties:
- {}
- const: panel-dpi
+ bus-format:
+ $ref: /schemas/types.yaml#/definitions/uint32
+ description: |
+ Describes how the display panel is connected to the display interface.
+ Valid values are defined in <dt-bindings/display/dt-media-bus-format.h>.
+ The mapping between the color/significance of the panel lines to the
+ parallel data lines are defined in [1].
+ [1] https://www.kernel.org/doc/html/v5.17/userspace-api/media/v4l/subdev-formats.html#packed-rgb-formats
backlight: true
enable-gpios: true
height-mm: true
@@ -39,11 +47,14 @@ additionalProperties: false
examples:
- |
+ #include <dt-bindings/display/dt-media-bus-format.h>
+ ...
panel {
compatible = "startek,startek-kd050c", "panel-dpi";
label = "osddisplay";
power-supply = <&vcc_supply>;
backlight = <&backlight>;
+ bus-format = "DT_MEDIA_BUS_FMT_RGB888_1X24";
port {
lcd_in: endpoint {
diff --git a/include/dt-bindings/display/dt-media-bus-format.h b/include/dt-bindings/display/dt-media-bus-format.h
new file mode 100644
index 000000000000..c0f2a7b59aa1
--- /dev/null
+++ b/include/dt-bindings/display/dt-media-bus-format.h
@@ -0,0 +1,23 @@
+/* SPDX-License-Identifier: GPL-2.0-only OR MIT */
+/*
+ * Copyright 2022 Max Krummenacher <max.krummenacher@toradex.com>
+ */
+
+#ifndef __DT_BINDINGS_DT_MEDIA_BUS_FORMAT_H
+#define __DT_BINDINGS_DT_MEDIA_BUS_FORMAT_H
+
+/*
+ * Attention: Keep these macro names in sync with
+ * include/uapi/linux/media-bus-format.h
+ */
+
+#define DT_MEDIA_BUS_FMT_RGB565_1X16 1
+#define DT_MEDIA_BUS_FMT_RGB666_1X18 2
+#define DT_MEDIA_BUS_FMT_RBG888_1X24 3
+#define DT_MEDIA_BUS_FMT_RGB666_1X24_CPADHI 4
+#define DT_MEDIA_BUS_FMT_BGR888_1X24 5
+#define DT_MEDIA_BUS_FMT_GBR888_1X24 6
+#define DT_MEDIA_BUS_FMT_RGB888_1X24 7
+#define DT_MEDIA_BUS_FMT_RGB888_1X32_PADHI 8
+
+#endif /* __DT_BINDINGS_DT_MEDIA_BUS_FORMAT_H */
--
2.20.1
^ permalink raw reply related [flat|nested] 3+ messages in thread* Re: [PATCH v1 1/2] dt-bindings: display: add new bus-format property for panel-dpi
2022-05-16 16:28 ` [PATCH v1 1/2] dt-bindings: display: add new bus-format property " Max Krummenacher
@ 2022-05-17 12:40 ` Rob Herring
0 siblings, 0 replies; 3+ messages in thread
From: Rob Herring @ 2022-05-17 12:40 UTC (permalink / raw)
To: Max Krummenacher
Cc: Francesco Dolcini, Christoph Niedermaier, Maxime Ripard,
Marek Vasut, Sam Ravnborg, Thierry Reding, David Airlie,
dri-devel, linux-kernel, Daniel Vetter, Krzysztof Kozlowski,
devicetree, Rob Herring, Laurent Pinchart, max.krummenacher,
Dave Stevenson
On Mon, 16 May 2022 18:28:25 +0200, Max Krummenacher wrote:
> From: Max Krummenacher <max.krummenacher@toradex.com>
>
> The property is used to set the enum bus_format and infer the bpc
> for a panel defined by 'panel-dpi'.
> This specifies how the panel is connected to the display interface.
>
> Signed-off-by: Max Krummenacher <max.krummenacher@toradex.com>
> ---
>
> .../bindings/display/panel/panel-dpi.yaml | 11 +++++++++
> .../dt-bindings/display/dt-media-bus-format.h | 23 +++++++++++++++++++
> 2 files changed, 34 insertions(+)
> create mode 100644 include/dt-bindings/display/dt-media-bus-format.h
>
My bot found errors running 'make DT_CHECKER_FLAGS=-m dt_binding_check'
on your patch (DT_CHECKER_FLAGS is new in v5.13):
yamllint warnings/errors:
dtschema/dtc warnings/errors:
Error: Documentation/devicetree/bindings/display/panel/panel-dpi.example.dts:20.9-10 syntax error
FATAL ERROR: Unable to parse input tree
make[1]: *** [scripts/Makefile.lib:364: Documentation/devicetree/bindings/display/panel/panel-dpi.example.dtb] Error 1
make[1]: *** Waiting for unfinished jobs....
make: *** [Makefile:1401: dt_binding_check] Error 2
doc reference errors (make refcheckdocs):
See https://patchwork.ozlabs.org/patch/
This check can fail if there are any dependencies. The base for a patch
series is generally the most recent rc1.
If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:
pip3 install dtschema --upgrade
Please check and re-submit.
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2022-05-17 12:41 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2022-05-16 16:28 [PATCH v1 0/2] drm/panel: simple: add bus-format support for panel-dpi Max Krummenacher
2022-05-16 16:28 ` [PATCH v1 1/2] dt-bindings: display: add new bus-format property " Max Krummenacher
2022-05-17 12:40 ` Rob Herring
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).