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