All of lore.kernel.org
 help / color / mirror / Atom feed
From: Manasi Navare <manasi.d.navare@intel.com>
To: intel-gfx@lists.freedesktop.org
Cc: dri-devel@lists.freedesktop.org, Daniel Vetter <daniel.vetter@intel.com>
Subject: [PATCH 2/2] drm/i915: Set link status property for DP connector
Date: Tue, 25 Oct 2016 18:16:35 -0700	[thread overview]
Message-ID: <1477444595-19656-2-git-send-email-manasi.d.navare@intel.com> (raw)
In-Reply-To: <1477444595-19656-1-git-send-email-manasi.d.navare@intel.com>

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@lists.freedesktop.org
Cc: Jani Nikula <jani.nikula@linux.intel.com>
Cc: Daniel Vetter <daniel.vetter@intel.com>
Cc: Ville Syrjala <ville.syrjala@linux.intel.com>
Cc: Chris Wilson <chris@chris-wilson.co.uk>
Signed-off-by: Manasi Navare <manasi.d.navare@intel.com>
---
 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

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

  reply	other threads:[~2016-10-26  1:16 UTC|newest]

Thread overview: 12+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-10-26  1:16 [PATCH 1/2] drm: Add a new connector property for link status Manasi Navare
2016-10-26  1:16 ` Manasi Navare [this message]
2016-10-26  1:19 ` Manasi Navare
2016-10-26  9:27   ` Chris Wilson
2016-10-26  1:58 ` ✗ Fi.CI.BAT: failure for series starting with [1/2] " Patchwork
2016-10-26  5:52 ` [Intel-gfx] [PATCH 1/2] " Daniel Vetter
2016-10-26  9:42   ` Chris Wilson
2016-10-26  9:51     ` Jani Nikula
2016-10-26 11:17       ` [Intel-gfx] " Ville Syrjälä
2016-10-26 13:11         ` Chris Wilson
2016-10-26 13:15           ` Ville Syrjälä
2016-10-26 13:29             ` [Intel-gfx] " Chris Wilson

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1477444595-19656-2-git-send-email-manasi.d.navare@intel.com \
    --to=manasi.d.navare@intel.com \
    --cc=daniel.vetter@intel.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=intel-gfx@lists.freedesktop.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.