[PATCH 2/2] drm/i915: Set link status property for DP connector

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

 



The link status connector property is attached to the drm
object in DP initialization.
This also defines a helper function to set the property value.
This will be used to set the link sttaus to Bad in case
of link training failures.

Cc: dri-devel@xxxxxxxxxxxxxxxxxxxxx
Cc: Jani Nikula <jani.nikula@xxxxxxxxxxxxxxx>
Cc: Daniel Vetter <daniel.vetter@xxxxxxxxx>
Cc: Ville Syrjala <ville.syrjala@xxxxxxxxxxxxxxx>
Cc: Chris Wilson <chris@xxxxxxxxxxxxxxxxxx>
Signed-off-by: Manasi Navare <manasi.d.navare@xxxxxxxxx>
---
 drivers/gpu/drm/i915/intel_dp.c | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 3c2293b..dd0d372 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -4674,6 +4674,22 @@ static int intel_dp_get_modes(struct drm_connector *connector)
 }
 
 static int
+intel_dp_set_link_status_property(struct drm_connector *connector,
+				  uint64_t val)
+{
+	struct drm_device *dev = connector->dev;
+	int ret = 0;
+
+	ret = drm_object_property_set_value(&connector->base,
+					    dev->mode_config.link_status_property,
+					    val);
+	if (ret)
+		return ret;
+
+	return ret;
+}
+
+static int
 intel_dp_connector_register(struct drm_connector *connector)
 {
 	struct intel_dp *intel_dp = intel_attached_dp(connector);
@@ -4940,6 +4956,11 @@ bool intel_dp_is_edp(struct drm_device *dev, enum port port)
 			connector->dev->mode_config.scaling_mode_property,
 			DRM_MODE_SCALE_ASPECT);
 		intel_connector->panel.fitting_mode = DRM_MODE_SCALE_ASPECT;
+	} else {
+		drm_mode_create_link_status_property(connector->dev);
+		drm_object_attach_property(&connector->base,
+					   connector->dev->mode_config.link_status_property,
+					   DRM_MODE_LINK_STATUS_GOOD);
 	}
 }
 
-- 
1.9.1

_______________________________________________
dri-devel mailing list
dri-devel@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/dri-devel




[Index of Archives]     [Linux DRI Users]     [Linux Intel Graphics]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Linux Kernel]     [Linux SCSI]     [XFree86]
  Powered by Linux