[PATCH 2/2] drm/i915: utilize subconnector property for DP

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Since DP-specific information is stored in driver's structures, every
driver needs to implement subconnector property by itself.

Signed-off-by: Oleg Vasilev <oleg.vasilev@xxxxxxxxx>
---
 drivers/gpu/drm/i915/display/intel_dp.c | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/drivers/gpu/drm/i915/display/intel_dp.c b/drivers/gpu/drm/i915/display/intel_dp.c
index 4336df46fe78..6436c14d9b41 100644
--- a/drivers/gpu/drm/i915/display/intel_dp.c
+++ b/drivers/gpu/drm/i915/display/intel_dp.c
@@ -5532,6 +5532,7 @@ intel_dp_unset_edid(struct intel_dp *intel_dp)
 	intel_dp->has_audio = false;
 }
 
+
 static int
 intel_dp_detect(struct drm_connector *connector,
 		struct drm_modeset_acquire_ctx *ctx,
@@ -5542,6 +5543,7 @@ intel_dp_detect(struct drm_connector *connector,
 	struct intel_digital_port *dig_port = dp_to_dig_port(intel_dp);
 	struct intel_encoder *encoder = &dig_port->base;
 	enum drm_connector_status status;
+	enum drm_mode_subconnector subconnector = DRM_MODE_SUBCONNECTOR_Unknown;
 
 	DRM_DEBUG_KMS("[CONNECTOR:%d:%s]\n",
 		      connector->base.id, connector->name);
@@ -5633,6 +5635,14 @@ intel_dp_detect(struct drm_connector *connector,
 	if (status != connector_status_connected && !intel_dp->is_mst)
 		intel_dp_unset_edid(intel_dp);
 
+	if (status == connector_status_connected)
+		subconnector = drm_dp_downstream_subconnector_type(
+				intel_dp->dpcd, intel_dp->downstream_ports);
+
+	drm_object_property_set_value(&connector->base,
+				      connector->dev->
+				      mode_config.dp_subconnector_property,
+				      subconnector);
 	return status;
 }
 
@@ -6529,6 +6539,11 @@ intel_dp_add_properties(struct intel_dp *intel_dp, struct drm_connector *connect
 	struct drm_i915_private *dev_priv = to_i915(connector->dev);
 	enum port port = dp_to_dig_port(intel_dp)->base.port;
 
+	drm_mode_create_dp_properties(connector->dev);
+	drm_object_attach_property(&connector->base,
+				   connector->dev->mode_config.dp_subconnector_property,
+				   DRM_MODE_SUBCONNECTOR_Unknown);
+
 	if (!IS_G4X(dev_priv) && port != PORT_A)
 		intel_attach_force_audio_property(connector);
 
-- 
2.22.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [AMD Graphics]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux