[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20220903183753.25736-5-max@maxfierke.com>
Date: Sat, 3 Sep 2022 13:37:53 -0500
From: Max Fierke <max@...fierke.com>
To: thierry.reding@...il.com, sam@...nborg.org, airlied@...ux.ie,
daniel@...ll.ch, robh+dt@...nel.org,
krzysztof.kozlowski+dt@...aro.org
Cc: dri-devel@...ts.freedesktop.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, Max Fierke <max@...fierke.com>
Subject: [PATCH v2 4/4] drm/panel: clockworkpi-cwd686: Implement .get_orientation callback
Returns the panel's configured orientation
Signed-off-by: Max Fierke <max@...fierke.com>
---
Changes in v2:
- this was added as .get_orientation is now available in drm-misc-next since v1
drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c b/drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c
index 87d20d784596..2c433a458c8b 100644
--- a/drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c
+++ b/drivers/gpu/drm/panel/panel-clockworkpi-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,18 @@ 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.37.1
Powered by blists - more mailing lists