[PATCH 3/3] drm/i915: Add "panel orientation" property to the panel connector

Hans de Goede hdegoede at redhat.com
Fri Sep 8 11:54:44 UTC 2017


For now this is always set to DRM_MODE_PANEL_ORIENTATION_UNKNOWN
unless there is a dmi based quirk overriding the value.

In the future we should probably provide an initial value based on
the VBT (at least for some panel types).

Signed-off-by: Hans de Goede <hdegoede at redhat.com>
---
 drivers/gpu/drm/i915/intel_panel.c | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_panel.c b/drivers/gpu/drm/i915/intel_panel.c
index 72f8cbb237b1..4a52c9d5790a 100644
--- a/drivers/gpu/drm/i915/intel_panel.c
+++ b/drivers/gpu/drm/i915/intel_panel.c
@@ -1926,6 +1926,22 @@ int intel_panel_init(struct intel_panel *panel,
 		     struct drm_display_mode *alt_fixed_mode,
 		     struct drm_display_mode *downclock_mode)
 {
+	struct intel_connector *intel_connector =
+		container_of(panel, struct intel_connector, panel);
+	int ret;
+
+	if (fixed_mode) {
+		ret = drm_connector_create_panel_orientation_property(
+						intel_connector->base.dev);
+		if (ret)
+			return ret;
+
+		drm_connector_attach_panel_orientation_property(
+				&intel_connector->base,
+				fixed_mode->hdisplay, fixed_mode->vdisplay,
+				DRM_MODE_PANEL_ORIENTATION_UNKNOWN);
+	}
+
 	intel_panel_init_backlight_funcs(panel);
 
 	panel->fixed_mode = fixed_mode;
-- 
2.13.4



More information about the dri-devel mailing list