@@ -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)