All of lore.kernel.org
 help / color / mirror / Atom feed
From: Jesse Barnes <jbarnes@virtuousgeek.org>
To: intel-gfx@lists.freedesktop.org
Subject: [PATCH 16/20] drm/i915/dp: cache eDP DPCD data
Date: Thu,  7 Oct 2010 16:01:21 -0700	[thread overview]
Message-ID: <1286492485-18145-17-git-send-email-jbarnes@virtuousgeek.org> (raw)
In-Reply-To: <1286492485-18145-1-git-send-email-jbarnes@virtuousgeek.org>

Cache the first 4 bytes of DPCD data in the eDP case.  It's unlikely to
change and can save us some trouble at link training time.

Signed-off-by: Jesse Barnes <jbarnes@virtuousgeek.org>
---
 drivers/gpu/drm/i915/i915_drv.h |    1 +
 drivers/gpu/drm/i915/intel_dp.c |   20 ++++++++++++++++++++
 2 files changed, 21 insertions(+), 0 deletions(-)

diff --git a/drivers/gpu/drm/i915/i915_drv.h b/drivers/gpu/drm/i915/i915_drv.h
index 6d49a9f..84e33ae 100644
--- a/drivers/gpu/drm/i915/i915_drv.h
+++ b/drivers/gpu/drm/i915/i915_drv.h
@@ -350,6 +350,7 @@ typedef struct drm_i915_private {
 		int bpp;
 		struct edp_power_seq pps;
 	} edp;
+	bool no_aux_handshake;
 
 	struct notifier_block lid_notifier;
 
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index e5f183f..5ea1d8d 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1725,6 +1725,26 @@ intel_dp_init(struct drm_device *dev, int output_reg)
 
 	intel_dp_i2c_init(intel_dp, intel_connector, name);
 
+	/* Cache some DPCD data in the eDP case */
+	if (is_edp(intel_dp)) {
+		int ret;
+		bool was_on;
+
+		was_on = ironlake_edp_panel_on(intel_dp);
+		ret = intel_dp_aux_native_read(intel_dp, DP_DPCD_REV,
+					       intel_dp->dpcd,
+					       sizeof (intel_dp->dpcd));
+		if (ret == sizeof (intel_dp->dpcd)) {
+			if (intel_dp->dpcd[0] >= 0x11)
+				dev_priv->no_aux_handshake = intel_dp->dpcd[3] &
+					DP_NO_AUX_HANDSHAKE_LINK_TRAINING;
+		} else {
+			DRM_ERROR("failed to retrieve link info\n");
+		}
+		if (!was_on)
+			ironlake_edp_panel_off(dev);
+	}
+
 	intel_encoder->hot_plug = intel_dp_hot_plug;
 
 	if (is_edp(intel_dp)) {
-- 
1.7.0.4

  parent reply	other threads:[~2010-10-07 23:39 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-10-07 23:01 PCH eDP fixes Jesse Barnes
2010-10-07 23:01 ` [PATCH 01/20] drm/i915/dp: convert eDP checks to functions and document Jesse Barnes
2010-10-07 23:01 ` [PATCH 02/20] drm/i915/dp: remove redundant is_pch_edp checks Jesse Barnes
2010-10-07 23:01 ` [PATCH 03/20] drm/i915/dp: correct eDP lane count and bpp Jesse Barnes
2010-10-07 23:01 ` [PATCH 04/20] drm/i915: add eDP checking functions for the display code Jesse Barnes
2010-10-07 23:01 ` [PATCH 05/20] drm/i915: remove broken intel_pch_has_edp function Jesse Barnes
2010-10-07 23:01 ` [PATCH 06/20] drm/i915: fix CPU vs PCH eDP confusion Jesse Barnes
2010-10-07 23:01 ` [PATCH 07/20] drm/i915/dp: eDP power sequencing fixes Jesse Barnes
2010-10-07 23:01 ` [PATCH 08/20] drm/i915: add _DSM support Jesse Barnes
2010-10-07 23:01 ` [PATCH 09/20] drm/i915: fetch eDP configuration data from the VBT Jesse Barnes
2010-10-07 23:01 ` [PATCH 10/20] drm/i915: add Ironlake clock gating workaround for FDI link training Jesse Barnes
2010-10-07 23:01 ` [PATCH 11/20] drm/i915: fix PCH eDP SSC support Jesse Barnes
2010-10-07 23:01 ` [PATCH 12/20] drm/i915: use 120MHz refclk in PCH eDP case too Jesse Barnes
2010-10-07 23:01 ` [PATCH 13/20] drm/i915: use DPLL_DVO_HIGH_SPEED for PCH eDP Jesse Barnes
2010-10-07 23:01 ` [PATCH 14/20] drm/i915: fix ironlake CRTC enable/disable Jesse Barnes
2010-10-07 23:01 ` [PATCH 15/20] drm/i915: don't program FDI RX/TX in mode_set Jesse Barnes
2010-10-07 23:01 ` Jesse Barnes [this message]
2010-10-07 23:01 ` [PATCH 17/20] drm/i915/dp: use VBT provided eDP params if available Jesse Barnes
2010-10-07 23:01 ` [PATCH 18/20] drm/i915/dp: don't bother with DP PLL for PCH attached eDP Jesse Barnes
2010-10-07 23:01 ` [PATCH 19/20] drm/i915/dp: make eDP PLL functions work as advertised Jesse Barnes
2010-10-07 23:01 ` [PATCH 20/20] drm/i915: diasable clock gating for the panel power sequencer Jesse Barnes
2010-10-08  9:50 ` PCH eDP fixes Jim Gettys
2010-10-08 10:00 ` Chris Wilson
2010-10-08 16:24   ` Jesse Barnes

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=1286492485-18145-17-git-send-email-jbarnes@virtuousgeek.org \
    --to=jbarnes@virtuousgeek.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.