dri-devel Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding@gmail.com>
To: dri-devel@lists.freedesktop.org
Cc: Daniel Vetter <daniel.vetter@ffwll.ch>
Subject: [RFC 09/13] drm/dp: Enable alternate scrambler when supported
Date: Wed, 12 Aug 2015 17:06:37 +0200	[thread overview]
Message-ID: <1439392001-29637-9-git-send-email-thierry.reding@gmail.com> (raw)
In-Reply-To: <1439392001-29637-1-git-send-email-thierry.reding@gmail.com>

From: Thierry Reding <treding@nvidia.com>

If the sink is eDP and supports the alternate scrambler reset, enable
it.

Signed-off-by: Thierry Reding <treding@nvidia.com>
---
 drivers/gpu/drm/drm_dp_helper.c | 9 +++++++++
 include/drm/drm_dp_helper.h     | 1 +
 2 files changed, 10 insertions(+)

diff --git a/drivers/gpu/drm/drm_dp_helper.c b/drivers/gpu/drm/drm_dp_helper.c
index d503cc3f1772..543349e14481 100644
--- a/drivers/gpu/drm/drm_dp_helper.c
+++ b/drivers/gpu/drm/drm_dp_helper.c
@@ -334,6 +334,8 @@ int drm_dp_link_probe(struct drm_dp_aux *aux, struct drm_dp_link *link)
 		link->capabilities |= DP_LINK_CAP_ANSI_8B10B;
 
 	if (values[13] & DP_ALTERNATE_SCRAMBLER_RESET_CAP) {
+		link->capabilities |= DP_LINK_CAP_ALTERNATE_SCRAMBLER_RESET;
+
 		err = drm_dp_dpcd_readb(aux, DP_EDP_DPCD_REV, &value);
 		if (err < 0)
 			return err;
@@ -468,6 +470,13 @@ int drm_dp_link_configure(struct drm_dp_aux *aux, struct drm_dp_link *link)
 	if (err < 0)
 		return err;
 
+	if (link->capabilities & DP_LINK_CAP_ALTERNATE_SCRAMBLER_RESET) {
+		err = drm_dp_dpcd_writeb(aux, DP_EDP_CONFIGURATION_SET,
+					 DP_ALTERNATE_SCRAMBLER_RESET_ENABLE);
+		if (err < 0)
+			return err;
+	}
+
 	return 0;
 }
 EXPORT_SYMBOL(drm_dp_link_configure);
diff --git a/include/drm/drm_dp_helper.h b/include/drm/drm_dp_helper.h
index 2165b9ef8504..600347f8cdd4 100644
--- a/include/drm/drm_dp_helper.h
+++ b/include/drm/drm_dp_helper.h
@@ -758,6 +758,7 @@ int drm_dp_dpcd_read_link_status(struct drm_dp_aux *aux,
 #define DP_LINK_CAP_FAST_TRAINING (1 << 1)
 #define DP_LINK_CAP_ANSI_8B10B (1 << 2)
 #define DP_LINK_CAP_TPS3 (1 << 3)
+#define DP_LINK_CAP_ALTERNATE_SCRAMBLER_RESET (1 << 4)
 
 struct drm_dp_link {
 	unsigned char revision;
-- 
2.4.5

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

  parent reply	other threads:[~2015-08-12 15:08 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2015-08-12 15:06 [RFC 01/13] drm/dp: Read fast training capability from link Thierry Reding
2015-08-12 15:06 ` [RFC 02/13] drm/dp: Set channel coding on link configuration Thierry Reding
2015-08-12 15:06 ` [RFC 03/13] drm/dp: Read TPS3 capability from sink Thierry Reding
2015-08-12 15:06 ` [RFC 04/13] drm/dp: Enhanced framing capability is DP 1.1+ Thierry Reding
2015-08-14 10:21   ` Jani Nikula
2015-08-26 10:12   ` Jani Nikula
2015-08-12 15:06 ` [RFC 05/13] drm/dp: Fast link training " Thierry Reding
2015-08-12 15:06 ` [RFC 06/13] drm/dp: Read eDP version from DPCD Thierry Reding
2015-08-14 10:37   ` Jani Nikula
2015-08-12 15:06 ` [RFC 07/13] drm/dp: Read AUX read interval " Thierry Reding
2015-08-12 15:06 ` [RFC 08/13] drm/dp: Add helper to get post-cursor adjustments Thierry Reding
2015-08-12 15:06 ` Thierry Reding [this message]
2015-08-12 15:06 ` [RFC 10/13] drm/dp: Add link training helper Thierry Reding
2015-08-12 15:06 ` [RFC 11/13] drm/dp: Add helper to dump DPCD Thierry Reding
2015-08-14 11:56   ` Jani Nikula
2015-08-14 17:22     ` Rafael Antognolli
2015-08-17  7:02       ` Jani Nikula
2015-08-20 23:26         ` Rafael Antognolli
2015-09-03 17:49           ` Rafael Antognolli
2015-09-04  7:11             ` Daniel Vetter
2015-08-12 15:06 ` [RFC 12/13] drm/dp: link: Track capabilities alongside settings Thierry Reding
2015-08-12 15:06 ` [RFC 13/13] drm/dp: Add drm_dp_link_choose() helper Thierry Reding

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=1439392001-29637-9-git-send-email-thierry.reding@gmail.com \
    --to=thierry.reding@gmail.com \
    --cc=daniel.vetter@ffwll.ch \
    --cc=dri-devel@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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox