From: Derek Basehore <dbasehore@chromium.org>
To: linux-kernel@vger.kernel.org
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
Thierry Reding <thierry.reding@gmail.com>,
Sam Ravnborg <sam@ravnborg.org>, David Airlie <airlied@linux.ie>,
Daniel Vetter <daniel@ffwll.ch>,
dri-devel@lists.freedesktop.org,
Derek Basehore <dbasehore@chromium.org>
Subject: [PATCH v10 2/2] drm/panel: read panel orientation for BOE tv101wum-nl6
Date: Thu, 5 Mar 2020 16:21:12 -0800 [thread overview]
Message-ID: <20200306002112.255361-3-dbasehore@chromium.org> (raw)
In-Reply-To: <20200306002112.255361-1-dbasehore@chromium.org>
This reads the DT setting for the panel rotation to set the panel
orientation in the get_modes callback.
Signed-off-by: Derek Basehore <dbasehore@chromium.org>
---
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 48a164257d18..ee2d96413900 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;
@@ -717,6 +719,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;
}
@@ -756,6 +759,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.25.0.265.gbab2e86ba0-goog
next prev parent reply other threads:[~2020-03-06 0:21 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2020-03-06 0:21 [PATCH v10 0/2] Panel rotation patches Derek Basehore
2020-03-06 0:21 ` [PATCH v10 1/2] drm/panel: Add helper for reading DT rotation Derek Basehore
2020-03-06 0:21 ` Derek Basehore [this message]
2020-03-08 19:25 ` [PATCH v10 0/2] Panel rotation patches Dmitry Osipenko
2020-04-14 19:32 ` dbasehore .
2020-04-14 21:18 ` Dmitry Osipenko
2020-04-14 21:32 ` dbasehore .
2020-04-16 23:03 ` Dmitry Osipenko
2020-05-12 20:59 ` Sean Paul
2020-05-18 7:36 ` Dmitry Osipenko
2020-06-12 16:32 ` 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=20200306002112.255361-3-dbasehore@chromium.org \
--to=dbasehore@chromium.org \
--cc=airlied@linux.ie \
--cc=daniel@ffwll.ch \
--cc=dri-devel@lists.freedesktop.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=sam@ravnborg.org \
--cc=thierry.reding@gmail.com \
--cc=tzimmermann@suse.de \
/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
all inboxes | Powered by JetHome®