mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: "Charlotte �leńkec" <lotte@chir.rs>
To: neil.armstrong@linaro.org, quic_jesszhan@quicinc.com,
	robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org,
	max@maxfierke.com
Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-kernel@vger.kernel.org
Subject: [PATCH v4 3/3] drm/panel: clockworkpi-cwd686: Implement .get_orientation callback
Date: Tue,  1 Apr 2025 09:18:33 +0100	[thread overview]
Message-ID: <20250401081852.283532-4-lotte@chir.rs> (raw)
In-Reply-To: <20250401081852.283532-1-lotte@chir.rs>

From: Max Fierke <max@maxfierke.com>

Returns the panel's configured orientation

Signed-off-by: Max Fierke <max@maxfierke.com>
---
 drivers/gpu/drm/panel/panel-clockwork-cwd686.c | 14 +++++++++++++-
 1 file changed, 13 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/panel/panel-clockwork-cwd686.c b/drivers/gpu/drm/panel/panel-clockwork-cwd686.c
index 53d65e6df1b0..49db20de06c1 100644
--- a/drivers/gpu/drm/panel/panel-clockwork-cwd686.c
+++ b/drivers/gpu/drm/panel/panel-clockwork-cwd686.c
@@ -340,7 +340,10 @@ static int cwd686_get_modes(struct drm_panel *panel, struct drm_connector *conne
 	drm_mode_set_name(mode);
 	mode->type = DRM_MODE_TYPE_DRIVER | DRM_MODE_TYPE_PREFERRED;
 
-	/* Set up connector's "panel orientation" property */
+	/*
+	 * TODO: Remove once all drm drivers call
+	 * drm_connector_set_orientation_from_panel()
+	 */
 	drm_connector_set_panel_orientation(connector, ctx->orientation);
 
 	drm_mode_probed_add(connector, mode);
@@ -348,10 +351,19 @@ static int cwd686_get_modes(struct drm_panel *panel, struct drm_connector *conne
 	return 1; /* Number of modes */
 }
 
+ 
+static enum drm_panel_orientation cwd686_get_orientation(struct drm_panel *panel)
+{
+	struct cwd686 *ctx = panel_to_cwd686(panel);
+
+	return ctx->orientation;
+}
+
 static const struct drm_panel_funcs cwd686_drm_funcs = {
 	.unprepare = cwd686_unprepare,
 	.prepare = cwd686_prepare,
 	.get_modes = cwd686_get_modes,
+	.get_orientation = cwd686_get_orientation,
 };
 
 static int cwd686_probe(struct mipi_dsi_device *dsi)
-- 
2.48.1


      parent reply	other threads:[~2025-04-01  8:20 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-04-01  8:18 [PATCH v4 0/4] Introduce ClockworkPi CWD686 DRM panel driver Charlotte �leńkec
2025-04-01  8:18 ` [PATCH v4 1/3] drm: panel: Add driver for Clockwork cwd686 panel Charlotte �leńkec
2025-04-01  8:18 ` [PATCH v4 2/3] dt-bindings: display: Add Clockwork CWD686 panel Charlotte �leńkec
2025-04-01  8:34   ` Krzysztof Kozlowski
2025-04-01  8:54     ` Charlotte 🦝 Deleńkec
2025-04-01  8:18 ` Charlotte �leńkec [this message]

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=20250401081852.283532-4-lotte@chir.rs \
    --to=lotte@chir.rs \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=max@maxfierke.com \
    --cc=neil.armstrong@linaro.org \
    --cc=quic_jesszhan@quicinc.com \
    --cc=robh@kernel.org \
    /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®