From: Dmitry Osipenko <digetx@gmail.com>
To: "Thierry Reding" <thierry.reding@gmail.com>,
"Thomas Zimmermann" <tzimmermann@suse.de>,
"Derek Basehore" <dbasehore@chromium.org>,
"Sam Ravnborg" <sam@ravnborg.org>,
"Laurent Pinchart" <laurent.pinchart@ideasonboard.com>,
"Sean Paul" <sean@poorly.run>, "Daniel Vetter" <daniel@ffwll.ch>,
"Ville Syrjälä" <ville.syrjala@linux.intel.com>,
"Emil Velikov" <emil.l.velikov@gmail.com>,
"Daniel Stone" <daniel@fooishbar.org>
Cc: dri-devel@lists.freedesktop.org, linux-tegra@vger.kernel.org,
linux-kernel@vger.kernel.org
Subject: [PATCH RESEND v12 2/4] drm/panel: Read panel orientation for BOE TV101WUM-NL6
Date: Fri, 14 Aug 2020 00:56:07 +0300 [thread overview]
Message-ID: <20200813215609.28643-3-digetx@gmail.com> (raw)
In-Reply-To: <20200813215609.28643-1-digetx@gmail.com>
From: Derek Basehore <dbasehore@chromium.org>
This reads the DT setting for the panel rotation to set the panel
orientation in the get_modes callback.
Reviewed-by: Dmitry Osipenko <digetx@gmail.com>
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
Signed-off-by: Dmitry Osipenko <digetx@gmail.com>
---
drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
index e320aa30b9ae..6824363fcff1 100644
--- a/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
+++ b/drivers/gpu/drm/panel/panel-boe-tv101wum-nl6.c
@@ -11,6 +11,7 @@
#include <linux/of_device.h>
#include <linux/regulator/consumer.h>
+#include <drm/drm_connector.h>
#include <drm/drm_crtc.h>
#include <drm/drm_mipi_dsi.h>
#include <drm/drm_panel.h>
@@ -43,6 +44,7 @@ struct boe_panel {
const struct panel_desc *desc;
+ enum drm_panel_orientation orientation;
struct regulator *pp1800;
struct regulator *avee;
struct regulator *avdd;
@@ -740,6 +742,7 @@ static int boe_panel_get_modes(struct drm_panel *panel,
connector->display_info.width_mm = boe->desc->size.width_mm;
connector->display_info.height_mm = boe->desc->size.height_mm;
connector->display_info.bpc = boe->desc->bpc;
+ drm_connector_set_panel_orientation(connector, boe->orientation);
return 1;
}
@@ -779,6 +782,9 @@ static int boe_panel_add(struct boe_panel *boe)
drm_panel_init(&boe->base, dev, &boe_panel_funcs,
DRM_MODE_CONNECTOR_DSI);
+ err = of_drm_get_panel_orientation(dev->of_node, &boe->orientation);
+ if (err < 0)
+ return err;
err = drm_panel_of_backlight(&boe->base);
if (err)
--
2.27.0
next prev parent reply other threads:[~2020-08-13 21:56 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-08-13 21:56 [PATCH RESEND v12 0/4] Panel rotation patches Dmitry Osipenko
2020-08-13 21:56 ` [PATCH RESEND v12 1/4] drm/panel: Add helper for reading DT rotation Dmitry Osipenko
2020-08-13 21:56 ` Dmitry Osipenko [this message]
2020-08-13 21:56 ` [PATCH RESEND v12 3/4] drm/panel: lvds: Read panel orientation Dmitry Osipenko
2020-08-13 21:56 ` [PATCH RESEND v12 4/4] drm/panel-simple: " Dmitry Osipenko
2020-08-16 15:17 ` [PATCH RESEND v12 0/4] Panel rotation patches Sam Ravnborg
2020-08-16 16:17 ` Dmitry Osipenko
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20200813215609.28643-3-digetx@gmail.com \
--to=digetx@gmail.com \
--cc=daniel@ffwll.ch \
--cc=daniel@fooishbar.org \
--cc=dbasehore@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=emil.l.velikov@gmail.com \
--cc=laurent.pinchart@ideasonboard.com \
--cc=linux-kernel@vger.kernel.org \
--cc=linux-tegra@vger.kernel.org \
--cc=sam@ravnborg.org \
--cc=sean@poorly.run \
--cc=thierry.reding@gmail.com \
--cc=tzimmermann@suse.de \
--cc=ville.syrjala@linux.intel.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).