* [PATCH 1/2] drm/panel: add rotation support for Elida KD35T133 panels
@ 2021-02-12 15:50 Chris Morgan
2021-02-13 13:53 ` Odroid GO Advance display in mainline (Re: [PATCH 1/2] drm/panel: add rotation support for Elida KD35T133 panels) Ezequiel Garcia
0 siblings, 1 reply; 3+ messages in thread
From: Chris Morgan @ 2021-02-12 15:50 UTC (permalink / raw)
To: thierry.reding, sam, airlied, daniel, dri-devel, HHheiko; +Cc: Chris Morgan
Update the panel to allow setting the rotation value in device tree.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
drivers/gpu/drm/panel/panel-elida-kd35t133.c | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
index bc36aa3c1123..d8534406d1ef 100644
--- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c
+++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
@@ -42,6 +42,7 @@ struct kd35t133 {
struct gpio_desc *reset_gpio;
struct regulator *vdd;
struct regulator *iovcc;
+ enum drm_panel_orientation orientation;
bool prepared;
};
@@ -216,6 +217,7 @@ static int kd35t133_get_modes(struct drm_panel *panel,
connector->display_info.width_mm = mode->width_mm;
connector->display_info.height_mm = mode->height_mm;
drm_mode_probed_add(connector, mode);
+ drm_connector_set_panel_orientation(connector, ctx->orientation);
return 1;
}
@@ -258,6 +260,12 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi)
return ret;
}
+ ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation);
+ if (ret < 0) {
+ dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret);
+ return ret;
+ }
+
mipi_dsi_set_drvdata(dsi, ctx);
ctx->dev = dev;
--
2.25.1
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Odroid GO Advance display in mainline (Re: [PATCH 1/2] drm/panel: add rotation support for Elida KD35T133 panels)
2021-02-12 15:50 [PATCH 1/2] drm/panel: add rotation support for Elida KD35T133 panels Chris Morgan
@ 2021-02-13 13:53 ` Ezequiel Garcia
2021-02-13 14:06 ` Ezequiel Garcia
0 siblings, 1 reply; 3+ messages in thread
From: Ezequiel Garcia @ 2021-02-13 13:53 UTC (permalink / raw)
To: Chris Morgan
Cc: David Airlie, HHheiko, dri-devel, Thierry Reding, Sam Ravnborg
Hi Chris,
I'm hijacking this discussion a bit.
I recently tried to boot maline on my Odroid GOA, which I managed to do,
except the display wasn't displaying anything :-)
Everything looks good on a quick look, the Inno PHY driver is here,
and there's a DRM card registered with the right mode 320x240 and
connected status (which I suppose doesn't mean much in this case).
Also, the backlight is on.
Looks like this is working for you, so I was wondering if maybe
this would ring a bell, or perhaps you're aware of any patches
we are missing in v5.11-rc7 (which is what I'm basing on).
Or maybe I'm missing some config?...
Any ideas would be welcome!
Ezequiel
On Fri, 12 Feb 2021 at 12:51, Chris Morgan <macromorgan@hotmail.com> wrote:
>
> Update the panel to allow setting the rotation value in device tree.
>
> Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> ---
> drivers/gpu/drm/panel/panel-elida-kd35t133.c | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> index bc36aa3c1123..d8534406d1ef 100644
> --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> @@ -42,6 +42,7 @@ struct kd35t133 {
> struct gpio_desc *reset_gpio;
> struct regulator *vdd;
> struct regulator *iovcc;
> + enum drm_panel_orientation orientation;
> bool prepared;
> };
>
> @@ -216,6 +217,7 @@ static int kd35t133_get_modes(struct drm_panel *panel,
> connector->display_info.width_mm = mode->width_mm;
> connector->display_info.height_mm = mode->height_mm;
> drm_mode_probed_add(connector, mode);
> + drm_connector_set_panel_orientation(connector, ctx->orientation);
>
> return 1;
> }
> @@ -258,6 +260,12 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi)
> return ret;
> }
>
> + ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation);
> + if (ret < 0) {
> + dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret);
> + return ret;
> + }
> +
> mipi_dsi_set_drvdata(dsi, ctx);
>
> ctx->dev = dev;
> --
> 2.25.1
>
> _______________________________________________
> dri-devel mailing list
> dri-devel@lists.freedesktop.org
> https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: Odroid GO Advance display in mainline (Re: [PATCH 1/2] drm/panel: add rotation support for Elida KD35T133 panels)
2021-02-13 13:53 ` Odroid GO Advance display in mainline (Re: [PATCH 1/2] drm/panel: add rotation support for Elida KD35T133 panels) Ezequiel Garcia
@ 2021-02-13 14:06 ` Ezequiel Garcia
0 siblings, 0 replies; 3+ messages in thread
From: Ezequiel Garcia @ 2021-02-13 14:06 UTC (permalink / raw)
To: Chris Morgan; +Cc: David Airlie, dri-devel, Thierry Reding, Sam Ravnborg
(Now with Heiko's address fixed)
On Sat, 13 Feb 2021 at 10:53, Ezequiel Garcia
<ezequiel@vanguardiasur.com.ar> wrote:
>
> Hi Chris,
>
> I'm hijacking this discussion a bit.
>
> I recently tried to boot maline on my Odroid GOA, which I managed to do,
> except the display wasn't displaying anything :-)
>
> Everything looks good on a quick look, the Inno PHY driver is here,
> and there's a DRM card registered with the right mode 320x240 and
> connected status (which I suppose doesn't mean much in this case).
> Also, the backlight is on.
>
> Looks like this is working for you, so I was wondering if maybe
> this would ring a bell, or perhaps you're aware of any patches
> we are missing in v5.11-rc7 (which is what I'm basing on).
> Or maybe I'm missing some config?...
>
> Any ideas would be welcome!
>
> Ezequiel
>
> On Fri, 12 Feb 2021 at 12:51, Chris Morgan <macromorgan@hotmail.com> wrote:
> >
> > Update the panel to allow setting the rotation value in device tree.
> >
> > Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
> > ---
> > drivers/gpu/drm/panel/panel-elida-kd35t133.c | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/drivers/gpu/drm/panel/panel-elida-kd35t133.c b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> > index bc36aa3c1123..d8534406d1ef 100644
> > --- a/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> > +++ b/drivers/gpu/drm/panel/panel-elida-kd35t133.c
> > @@ -42,6 +42,7 @@ struct kd35t133 {
> > struct gpio_desc *reset_gpio;
> > struct regulator *vdd;
> > struct regulator *iovcc;
> > + enum drm_panel_orientation orientation;
> > bool prepared;
> > };
> >
> > @@ -216,6 +217,7 @@ static int kd35t133_get_modes(struct drm_panel *panel,
> > connector->display_info.width_mm = mode->width_mm;
> > connector->display_info.height_mm = mode->height_mm;
> > drm_mode_probed_add(connector, mode);
> > + drm_connector_set_panel_orientation(connector, ctx->orientation);
> >
> > return 1;
> > }
> > @@ -258,6 +260,12 @@ static int kd35t133_probe(struct mipi_dsi_device *dsi)
> > return ret;
> > }
> >
> > + ret = of_drm_get_panel_orientation(dev->of_node, &ctx->orientation);
> > + if (ret < 0) {
> > + dev_err(dev, "%pOF: failed to get orientation %d\n", dev->of_node, ret);
> > + return ret;
> > + }
> > +
> > mipi_dsi_set_drvdata(dsi, ctx);
> >
> > ctx->dev = dev;
> > --
> > 2.25.1
> >
> > _______________________________________________
> > dri-devel mailing list
> > dri-devel@lists.freedesktop.org
> > https://lists.freedesktop.org/mailman/listinfo/dri-devel
_______________________________________________
dri-devel mailing list
dri-devel@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/dri-devel
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2021-02-13 14:06 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-02-12 15:50 [PATCH 1/2] drm/panel: add rotation support for Elida KD35T133 panels Chris Morgan
2021-02-13 13:53 ` Odroid GO Advance display in mainline (Re: [PATCH 1/2] drm/panel: add rotation support for Elida KD35T133 panels) Ezequiel Garcia
2021-02-13 14:06 ` Ezequiel Garcia
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.