diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-09-09 13:58:56 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2012-09-20 08:23:05 -0400 |
commit | b6f69c9a7f800c9f22cc94aa193f8451b3cc299c (patch) | |
tree | 325cbc5e7eb895b1b56dc89f171bae89065892ae /drivers/gpu/drm/i915/intel_dp.c | |
parent | ba7a64587bcff8d85666a70b0a515d5fbcaa000c (diff) |
drm/i915: rip out edp special case from dp_link_down
This has been tons of fun to figure out with git blame. The first
notion of this code block goes back to the original cpu edp enabling
for ilk in
commit 32f9d658aee5be09ebdd28fc730630e61d0b46db
Author: Zhenyu Wang <zhenyuw@linux.intel.com>
Date: Fri Jul 24 01:00:32 2009 +0800
drm/i915: Add eDP support on IGDNG mobile chip
Two things are notable in this commit wrt to the this edp special
case:
- The IS_eDP check _only_ fires for DP A, i.e. cpu edp ports.
- The cpu edp port is disabled at the top of the dp_link_down function.
My theory is that these hacks was added to work around the completely
different modeset sequence for cpu edp ports compared to pch edp
ports. With the cpu edp confusion on ilk (and snb/ivb) now fixed up,
this shouldn't be required any more.
The really interesting question is how this special cases survived
this long in the code. The first step is declaring the pch port D as
eDP if it's used for an internal panel:
commit b329530ca7cdf6bf014f2124efd983e01265d623
Author: Adam Jackson <ajax@redhat.com>
Date: Fri Jul 16 14:46:28 2010 -0400
drm/i915/dp: Correctly report eDP in the core connector type
This commit unfortunately failed to notice that not all edp ports are
created equal. Then follow a flurry of refactorings, culminating in a
patch from Keith Packard which resulted in the current logic (by
making it "correct" for all platforms that have edp):
commit 417e822deee1d2bcd8a8a60660c40a0903713f2b
Author: Keith Packard <keithp@keithp.com>
Date: Tue Nov 1 19:54:11 2011 -0700
drm/i915: Treat PCH eDP like DP in most places
None of these cleanups or refactorings supply any reason why we need
this code, they've simply carried it on as-is.
Hence presume it might be harmful with the current code and rip it
out. We do rewrite the link training bits completely anyway when
re-training the link.
Reviewed-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_dp.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_dp.c | 7 |
1 files changed, 0 insertions, 7 deletions
diff --git a/drivers/gpu/drm/i915/intel_dp.c b/drivers/gpu/drm/i915/intel_dp.c index a48c0260a9b0..a69d9a223162 100644 --- a/drivers/gpu/drm/i915/intel_dp.c +++ b/drivers/gpu/drm/i915/intel_dp.c | |||
@@ -1921,13 +1921,6 @@ intel_dp_link_down(struct intel_dp *intel_dp) | |||
1921 | 1921 | ||
1922 | msleep(17); | 1922 | msleep(17); |
1923 | 1923 | ||
1924 | if (is_edp(intel_dp)) { | ||
1925 | if (HAS_PCH_CPT(dev) && (IS_GEN7(dev) || !is_cpu_edp(intel_dp))) | ||
1926 | DP |= DP_LINK_TRAIN_OFF_CPT; | ||
1927 | else | ||
1928 | DP |= DP_LINK_TRAIN_OFF; | ||
1929 | } | ||
1930 | |||
1931 | if (HAS_PCH_IBX(dev) && | 1924 | if (HAS_PCH_IBX(dev) && |
1932 | I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) { | 1925 | I915_READ(intel_dp->output_reg) & DP_PIPEB_SELECT) { |
1933 | struct drm_crtc *crtc = intel_dp->base.base.crtc; | 1926 | struct drm_crtc *crtc = intel_dp->base.base.crtc; |