From: Todd Previte <tprevite@gmail.com>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 3/5] drm/i915: Displayport - Add function to enable/disable scrambling on the main link
Date: Tue, 8 Apr 2014 10:47:41 -0700 [thread overview]
Message-ID: <1396979263-3245-4-git-send-email-tprevite@gmail.com> (raw)
In-Reply-To: <1396979263-3245-1-git-send-email-tprevite@gmail.com>
Adds a function to enable and disable scrambling directly for the main link.
This is functionality required to establish more fine-grained control over
the Displayport interface, both for operational reliability and
compliance testing.
Signed-off-by: Todd Previte <tprevite@gmail.com>
---
drivers/gpu/drm/i915/intel_dp.c | 27 +++++++++++++++++++++++++++
1 file changed, 27 insertions(+)
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index c865c32..1209de8 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -2372,6 +2372,33 @@ intel_dp_set_signal_levels(struct intel_dp *intel_dp, uint32_t *DP)
*DP = (*DP & ~mask) | signal_levels;
}
+void intel_dp_scrambler_disable(bool disable, struct intel_dp *intel_dp)
+{
+ struct intel_digital_port *intel_dig_port = dp_to_dig_port(intel_dp);
+ struct drm_device *dev = intel_dig_port->base.base.dev;
+ struct drm_i915_private *dev_priv = dev->dev_private;
+
+ // SNB is 0x40000. ILK is 0x4400
+ // IVB is 0x64000, HSW+ is 0x64040/0x64140
+ uint32_t ctrl_reg, reg_value;
+
+ if (HAS_DDI(dev))
+ ctrl_reg = DP_TP_CTL(intel_dig_port->port);
+ else
+ ctrl_reg = intel_dp->output_reg;
+
+ reg_value = I915_READ(ctrl_reg);
+
+ // Scrambling is bit 7 (scrambling on == 0)
+ if (disable)
+ reg_value |= DP_TP_CTL_SCRAMBLE_DISABLE;
+ else
+ reg_value &= ~DP_TP_CTL_SCRAMBLE_DISABLE;
+
+ I915_WRITE(ctrl_reg, reg_value);
+ POSTING_READ(ctrl_reg);
+}
+
bool
intel_dp_verify_link_status(DPLinkTrainingState state,
uint8_t lane_count,
--
1.8.3.2
next prev parent reply other threads:[~2014-04-08 17:48 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-04-08 17:47 [PATCH 0/5] RFC: Displayport Link Policy Maker Update Todd Previte
2014-04-08 17:47 ` [PATCH 1/5] dmr/i915: Displayport - Add a function to set the training pattern Todd Previte
2014-04-08 19:52 ` Paulo Zanoni
2014-04-08 17:47 ` [PATCH 2/5] drm/i915: Displayport - Add function to check link status Todd Previte
2014-04-08 17:47 ` Todd Previte [this message]
2014-04-08 17:47 ` [PATCH 4/5] drm/i915: Displayport - Add function for executing a single iteration of clock recovery Todd Previte
2014-04-08 17:47 ` [PATCH 5/5] drm/i915: Displayport - Add function to execute a single iteration of channel equalization Todd Previte
2014-04-09 13:26 ` [PATCH 0/5] RFC: Displayport Link Policy Maker Update Daniel Vetter
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=1396979263-3245-4-git-send-email-tprevite@gmail.com \
--to=tprevite@gmail.com \
--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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox