aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm
diff options
context:
space:
mode:
authorJesse Barnes <jbarnes@virtuousgeek.org>2010-10-07 19:01:21 -0400
committerChris Wilson <chris@chris-wilson.co.uk>2010-10-08 05:28:26 -0400
commit896673836b8c55b75e7d7d2741aaaadff0c6a038 (patch)
tree997f423cd95c1ec6d3e9fb3028b6493e81eec950 /drivers/gpu/drm
parent8088699f029b2a27af9bc5431ef7542c84195760 (diff)
drm/i915/dp: cache eDP DPCD data
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> Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu/drm')
-rw-r--r--drivers/gpu/drm/i915/i915_drv.h1
-rw-r--r--drivers/gpu/drm/i915/intel_dp.c20
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 6d49a9f5c2b1..84e33aeececd 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 {
350 int bpp; 350 int bpp;
351 struct edp_power_seq pps; 351 struct edp_power_seq pps;
352 } edp; 352 } edp;
353 bool no_aux_handshake;
353 354
354 struct notifier_block lid_notifier; 355 struct notifier_block lid_notifier;
355 356
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c
index 944dfe199f6e..7fa828275e4a 100644
--- a/drivers/gpu/drm/i915/intel_dp.c
+++ b/drivers/gpu/drm/i915/intel_dp.c
@@ -1724,6 +1724,26 @@ intel_dp_init(struct drm_device *dev, int output_reg)
1724 1724
1725 intel_dp_i2c_init(intel_dp, intel_connector, name); 1725 intel_dp_i2c_init(intel_dp, intel_connector, name);
1726 1726
1727 /* Cache some DPCD data in the eDP case */
1728 if (is_edp(intel_dp)) {
1729 int ret;
1730 bool was_on;
1731
1732 was_on = ironlake_edp_panel_on(intel_dp);
1733 ret = intel_dp_aux_native_read(intel_dp, DP_DPCD_REV,
1734 intel_dp->dpcd,
1735 sizeof(intel_dp->dpcd));
1736 if (ret == sizeof(intel_dp->dpcd)) {
1737 if (intel_dp->dpcd[0] >= 0x11)
1738 dev_priv->no_aux_handshake = intel_dp->dpcd[3] &
1739 DP_NO_AUX_HANDSHAKE_LINK_TRAINING;
1740 } else {
1741 DRM_ERROR("failed to retrieve link info\n");
1742 }
1743 if (!was_on)
1744 ironlake_edp_panel_off(dev);
1745 }
1746
1727 intel_encoder->hot_plug = intel_dp_hot_plug; 1747 intel_encoder->hot_plug = intel_dp_hot_plug;
1728 1748
1729 if (is_edp(intel_dp)) { 1749 if (is_edp(intel_dp)) {