From: Chris Morgan <macroalpha82@gmail.com>
To: linux-rockchip@lists.infradead.org
Cc: dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org,
devicetree@vger.kernel.org, sboyd@kernel.org,
mturquette@baylibre.com, tzimmermann@suse.de, mripard@kernel.org,
maarten.lankhorst@linux.intel.com, daniel@ffwll.ch,
airlied@gmail.com, sam@ravnborg.org, quic_jesszhan@quicinc.com,
neil.armstrong@linaro.org, javierm@redhat.com, heiko@sntech.de,
conor+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org,
robh+dt@kernel.org, Chris Morgan <macromorgan@hotmail.com>
Subject: [PATCH 4/9] drm/panel: himax-hx8394: Add Panel Rotation Support
Date: Thu, 30 Nov 2023 09:56:19 -0600 [thread overview]
Message-ID: <20231130155624.405575-5-macroalpha82@gmail.com> (raw)
In-Reply-To: <20231130155624.405575-1-macroalpha82@gmail.com>
From: Chris Morgan <macromorgan@hotmail.com>
Add support for setting the rotation property for the Himax HX8394
panel.
Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
---
drivers/gpu/drm/panel/panel-himax-hx8394.c | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/drivers/gpu/drm/panel/panel-himax-hx8394.c b/drivers/gpu/drm/panel/panel-himax-hx8394.c
index d8e590d5e1da..b68ea09f4725 100644
--- a/drivers/gpu/drm/panel/panel-himax-hx8394.c
+++ b/drivers/gpu/drm/panel/panel-himax-hx8394.c
@@ -68,6 +68,7 @@ struct hx8394 {
struct gpio_desc *reset_gpio;
struct regulator *vcc;
struct regulator *iovcc;
+ enum drm_panel_orientation orientation;
const struct hx8394_panel_desc *desc;
};
@@ -324,12 +325,20 @@ static int hx8394_get_modes(struct drm_panel *panel,
return 1;
}
+static enum drm_panel_orientation hx8394_get_orientation(struct drm_panel *panel)
+{
+ struct hx8394 *ctx = panel_to_hx8394(panel);
+
+ return ctx->orientation;
+}
+
static const struct drm_panel_funcs hx8394_drm_funcs = {
.disable = hx8394_disable,
.unprepare = hx8394_unprepare,
.prepare = hx8394_prepare,
.enable = hx8394_enable,
.get_modes = hx8394_get_modes,
+ .get_orientation = hx8394_get_orientation,
};
static int hx8394_probe(struct mipi_dsi_device *dsi)
@@ -347,6 +356,12 @@ static int hx8394_probe(struct mipi_dsi_device *dsi)
return dev_err_probe(dev, PTR_ERR(ctx->reset_gpio),
"Failed to get reset gpio\n");
+ 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.34.1
next prev parent reply other threads:[~2023-11-30 15:56 UTC|newest]
Thread overview: 15+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-30 15:56 [PATCH 0/9] rockchip: Add Powkiddy X55 Chris Morgan
2023-11-30 15:56 ` [PATCH 1/9] drm/panel: himax-hx8394: Drop prepare/unprepare tracking Chris Morgan
2023-11-30 15:56 ` [PATCH 2/9] drm/panel: himax-hx8394: Drop shutdown logic Chris Morgan
2023-11-30 15:56 ` [PATCH 3/9] dt-bindings: display: Document Himax HX8394 panel rotation Chris Morgan
2023-12-01 8:40 ` Krzysztof Kozlowski
2023-11-30 15:56 ` Chris Morgan [this message]
2023-11-30 15:56 ` [PATCH 5/9] dt-bindings: display: himax-hx8394: Add Powkiddy X55 panel Chris Morgan
2023-12-01 8:40 ` Krzysztof Kozlowski
2023-11-30 15:56 ` [PATCH 6/9] drm/panel: himax-hx8394: Add Support for " Chris Morgan
2023-12-01 3:19 ` Kendrick Curry
2023-12-01 17:18 ` Chris Morgan
2023-11-30 15:56 ` [PATCH 7/9] clk: rockchip: Mark pclk_usb as critical on rk3568 Chris Morgan
2023-11-30 15:56 ` [PATCH 8/9] dt-bindings: arm: rockchip: Add Powkiddy X55 Chris Morgan
2023-12-01 8:40 ` Krzysztof Kozlowski
2023-11-30 15:56 ` [PATCH 9/9] arm64: dts: " Chris Morgan
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=20231130155624.405575-5-macroalpha82@gmail.com \
--to=macroalpha82@gmail.com \
--cc=airlied@gmail.com \
--cc=conor+dt@kernel.org \
--cc=daniel@ffwll.ch \
--cc=devicetree@vger.kernel.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=heiko@sntech.de \
--cc=javierm@redhat.com \
--cc=krzysztof.kozlowski+dt@linaro.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-rockchip@lists.infradead.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=macromorgan@hotmail.com \
--cc=mripard@kernel.org \
--cc=mturquette@baylibre.com \
--cc=neil.armstrong@linaro.org \
--cc=quic_jesszhan@quicinc.com \
--cc=robh+dt@kernel.org \
--cc=sam@ravnborg.org \
--cc=sboyd@kernel.org \
--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