* [PATCH 0/3] drm/panel: ilitek-ili9881c: Read panel orientation
@ 2021-10-20 15:34 John Keeping
2021-10-20 15:34 ` [PATCH 1/3] dt-bindings: ili9881c: add missing panel-common inheritance John Keeping
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: John Keeping @ 2021-10-20 15:34 UTC (permalink / raw)
To: dri-devel
Cc: John Keeping, Daniel Vetter, David Airlie, devicetree,
linux-kernel, Maxime Ripard, Rob Herring, Sam Ravnborg,
Thierry Reding
Support the "rotation" DT property for ILI9881C based panels.
The first patch is a fix for the binding, then the usual binding update
followed by the corresponding driver update.
John Keeping (3):
dt-bindings: ili9881c: add missing panel-common inheritance
dt-bindings: ili9881c: add rotation property
drm/panel: ilitek-ili9881c: Read panel orientation
.../bindings/display/panel/ilitek,ili9881c.yaml | 4 ++++
drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 11 +++++++++++
2 files changed, 15 insertions(+)
--
2.33.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH 1/3] dt-bindings: ili9881c: add missing panel-common inheritance
2021-10-20 15:34 [PATCH 0/3] drm/panel: ilitek-ili9881c: Read panel orientation John Keeping
@ 2021-10-20 15:34 ` John Keeping
2021-10-20 15:34 ` [PATCH 2/3] dt-bindings: ili9881c: add rotation property John Keeping
2021-10-20 15:34 ` [PATCH 3/3] drm/panel: ilitek-ili9881c: Read panel orientation John Keeping
2 siblings, 0 replies; 4+ messages in thread
From: John Keeping @ 2021-10-20 15:34 UTC (permalink / raw)
To: dri-devel
Cc: John Keeping, Thierry Reding, Sam Ravnborg, David Airlie,
Daniel Vetter, Rob Herring, Maxime Ripard, devicetree,
linux-kernel
The properties below refer to items in panel-common.yaml, which means
that needs to be referenced in the schema.
Signed-off-by: John Keeping <john@metanate.com>
---
.../devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 3 +++
1 file changed, 3 insertions(+)
diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
index 07789d554889..032bae7891ad 100644
--- a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
+++ b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
@@ -9,6 +9,9 @@ title: Ilitek ILI9881c based MIPI-DSI panels
maintainers:
- Maxime Ripard <mripard@kernel.org>
+allOf:
+ - $ref: panel-common.yaml#
+
properties:
compatible:
items:
--
2.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 2/3] dt-bindings: ili9881c: add rotation property
2021-10-20 15:34 [PATCH 0/3] drm/panel: ilitek-ili9881c: Read panel orientation John Keeping
2021-10-20 15:34 ` [PATCH 1/3] dt-bindings: ili9881c: add missing panel-common inheritance John Keeping
@ 2021-10-20 15:34 ` John Keeping
2021-10-20 15:34 ` [PATCH 3/3] drm/panel: ilitek-ili9881c: Read panel orientation John Keeping
2 siblings, 0 replies; 4+ messages in thread
From: John Keeping @ 2021-10-20 15:34 UTC (permalink / raw)
To: dri-devel
Cc: John Keeping, Thierry Reding, Sam Ravnborg, David Airlie,
Daniel Vetter, Rob Herring, Maxime Ripard, devicetree,
linux-kernel
Allow the standard rotation property from panel-common for ILI9881C
based panels.
Signed-off-by: John Keeping <john@metanate.com>
---
.../devicetree/bindings/display/panel/ilitek,ili9881c.yaml | 1 +
1 file changed, 1 insertion(+)
diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
index 032bae7891ad..c5d1df680858 100644
--- a/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
+++ b/Documentation/devicetree/bindings/display/panel/ilitek,ili9881c.yaml
@@ -25,6 +25,7 @@ properties:
power-supply: true
reg: true
reset-gpios: true
+ rotation: true
required:
- compatible
--
2.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH 3/3] drm/panel: ilitek-ili9881c: Read panel orientation
2021-10-20 15:34 [PATCH 0/3] drm/panel: ilitek-ili9881c: Read panel orientation John Keeping
2021-10-20 15:34 ` [PATCH 1/3] dt-bindings: ili9881c: add missing panel-common inheritance John Keeping
2021-10-20 15:34 ` [PATCH 2/3] dt-bindings: ili9881c: add rotation property John Keeping
@ 2021-10-20 15:34 ` John Keeping
2 siblings, 0 replies; 4+ messages in thread
From: John Keeping @ 2021-10-20 15:34 UTC (permalink / raw)
To: dri-devel
Cc: John Keeping, Thierry Reding, Sam Ravnborg, David Airlie,
Daniel Vetter, linux-kernel
The panel orientation needs to parsed from a device-tree and assigned to
the panel's connector in order to make orientation property available to
userspace. That's what this patch does for ILI9881C based panels.
Signed-off-by: John Keeping <john@metanate.com>
---
drivers/gpu/drm/panel/panel-ilitek-ili9881c.c | 11 +++++++++++
1 file changed, 11 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
index d68c52bd53c2..ba30d11547ad 100644
--- a/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
+++ b/drivers/gpu/drm/panel/panel-ilitek-ili9881c.c
@@ -52,6 +52,8 @@ struct ili9881c {
struct regulator *power;
struct gpio_desc *reset;
+
+ enum drm_panel_orientation orientation;
};
#define ILI9881C_SWITCH_PAGE_INSTR(_page) \
@@ -851,6 +853,8 @@ static int ili9881c_get_modes(struct drm_panel *panel,
connector->display_info.width_mm = mode->width_mm;
connector->display_info.height_mm = mode->height_mm;
+ drm_connector_set_panel_orientation(connector, ctx->orientation);
+
return 1;
}
@@ -887,6 +891,13 @@ static int ili9881c_dsi_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(&dsi->dev, PTR_ERR(ctx->reset),
"Couldn't get our reset GPIO\n");
+ ret = of_drm_get_panel_orientation(dsi->dev.of_node, &ctx->orientation);
+ if (ret) {
+ dev_err(&dsi->dev, "%pOF: failed to get orientation: %d\n",
+ dsi->dev.of_node, ret);
+ return ret;
+ }
+
ret = drm_panel_of_backlight(&ctx->panel);
if (ret)
return ret;
--
2.33.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
end of thread, other threads:[~2021-10-20 15:34 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-10-20 15:34 [PATCH 0/3] drm/panel: ilitek-ili9881c: Read panel orientation John Keeping
2021-10-20 15:34 ` [PATCH 1/3] dt-bindings: ili9881c: add missing panel-common inheritance John Keeping
2021-10-20 15:34 ` [PATCH 2/3] dt-bindings: ili9881c: add rotation property John Keeping
2021-10-20 15:34 ` [PATCH 3/3] drm/panel: ilitek-ili9881c: Read panel orientation John Keeping
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).