diff options
author | Paulo Zanoni <paulo.r.zanoni@intel.com> | 2013-07-12 13:19:36 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-07-19 02:53:18 -0400 |
commit | 0ff066a9e4a29481226a6d46eab6bd9499aeaddb (patch) | |
tree | ffa8d4cdea6cfd307a79943c3cea532be45d427c /drivers/gpu/drm/i915/intel_display.c | |
parent | 7984211ee8e1fa03cd4bc9ef3d347f94f8a2c8a8 (diff) |
drm/i915: remove SDV support from lpt_pch_init_refclk
The machines that fall in the "is_sdv" case are some very early
pre-production steppings. This patch may break VGA output after
suspend/resume on these machines.
Even the documentation for the is_sdv cases was removed from BSpec.
Signed-off-by: Paulo Zanoni <paulo.r.zanoni@intel.com>
Reviewed-by: Ben Widawsky <ben@bwidawsk.net>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_display.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 104 |
1 files changed, 34 insertions, 70 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 94cb0ad604d7..46c4dff92900 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -5177,7 +5177,6 @@ static void lpt_init_pch_refclk(struct drm_device *dev) | |||
5177 | struct drm_mode_config *mode_config = &dev->mode_config; | 5177 | struct drm_mode_config *mode_config = &dev->mode_config; |
5178 | struct intel_encoder *encoder; | 5178 | struct intel_encoder *encoder; |
5179 | bool has_vga = false; | 5179 | bool has_vga = false; |
5180 | bool is_sdv = false; | ||
5181 | u32 tmp; | 5180 | u32 tmp; |
5182 | 5181 | ||
5183 | list_for_each_entry(encoder, &mode_config->encoder_list, base.head) { | 5182 | list_for_each_entry(encoder, &mode_config->encoder_list, base.head) { |
@@ -5193,10 +5192,6 @@ static void lpt_init_pch_refclk(struct drm_device *dev) | |||
5193 | 5192 | ||
5194 | mutex_lock(&dev_priv->dpio_lock); | 5193 | mutex_lock(&dev_priv->dpio_lock); |
5195 | 5194 | ||
5196 | /* XXX: Rip out SDV support once Haswell ships for real. */ | ||
5197 | if (IS_HASWELL(dev) && (dev->pci_device & 0xFF00) == 0x0C00) | ||
5198 | is_sdv = true; | ||
5199 | |||
5200 | tmp = intel_sbi_read(dev_priv, SBI_SSCCTL, SBI_ICLK); | 5195 | tmp = intel_sbi_read(dev_priv, SBI_SSCCTL, SBI_ICLK); |
5201 | tmp &= ~SBI_SSCCTL_DISABLE; | 5196 | tmp &= ~SBI_SSCCTL_DISABLE; |
5202 | tmp |= SBI_SSCCTL_PATHALT; | 5197 | tmp |= SBI_SSCCTL_PATHALT; |
@@ -5208,36 +5203,27 @@ static void lpt_init_pch_refclk(struct drm_device *dev) | |||
5208 | tmp &= ~SBI_SSCCTL_PATHALT; | 5203 | tmp &= ~SBI_SSCCTL_PATHALT; |
5209 | intel_sbi_write(dev_priv, SBI_SSCCTL, tmp, SBI_ICLK); | 5204 | intel_sbi_write(dev_priv, SBI_SSCCTL, tmp, SBI_ICLK); |
5210 | 5205 | ||
5211 | if (!is_sdv) { | 5206 | tmp = I915_READ(SOUTH_CHICKEN2); |
5212 | tmp = I915_READ(SOUTH_CHICKEN2); | 5207 | tmp |= FDI_MPHY_IOSFSB_RESET_CTL; |
5213 | tmp |= FDI_MPHY_IOSFSB_RESET_CTL; | 5208 | I915_WRITE(SOUTH_CHICKEN2, tmp); |
5214 | I915_WRITE(SOUTH_CHICKEN2, tmp); | ||
5215 | 5209 | ||
5216 | if (wait_for_atomic_us(I915_READ(SOUTH_CHICKEN2) & | 5210 | if (wait_for_atomic_us(I915_READ(SOUTH_CHICKEN2) & |
5217 | FDI_MPHY_IOSFSB_RESET_STATUS, 100)) | 5211 | FDI_MPHY_IOSFSB_RESET_STATUS, 100)) |
5218 | DRM_ERROR("FDI mPHY reset assert timeout\n"); | 5212 | DRM_ERROR("FDI mPHY reset assert timeout\n"); |
5219 | 5213 | ||
5220 | tmp = I915_READ(SOUTH_CHICKEN2); | 5214 | tmp = I915_READ(SOUTH_CHICKEN2); |
5221 | tmp &= ~FDI_MPHY_IOSFSB_RESET_CTL; | 5215 | tmp &= ~FDI_MPHY_IOSFSB_RESET_CTL; |
5222 | I915_WRITE(SOUTH_CHICKEN2, tmp); | 5216 | I915_WRITE(SOUTH_CHICKEN2, tmp); |
5223 | 5217 | ||
5224 | if (wait_for_atomic_us((I915_READ(SOUTH_CHICKEN2) & | 5218 | if (wait_for_atomic_us((I915_READ(SOUTH_CHICKEN2) & |
5225 | FDI_MPHY_IOSFSB_RESET_STATUS) == 0, | 5219 | FDI_MPHY_IOSFSB_RESET_STATUS) == 0, 100)) |
5226 | 100)) | 5220 | DRM_ERROR("FDI mPHY reset de-assert timeout\n"); |
5227 | DRM_ERROR("FDI mPHY reset de-assert timeout\n"); | ||
5228 | } | ||
5229 | 5221 | ||
5230 | tmp = intel_sbi_read(dev_priv, 0x8008, SBI_MPHY); | 5222 | tmp = intel_sbi_read(dev_priv, 0x8008, SBI_MPHY); |
5231 | tmp &= ~(0xFF << 24); | 5223 | tmp &= ~(0xFF << 24); |
5232 | tmp |= (0x12 << 24); | 5224 | tmp |= (0x12 << 24); |
5233 | intel_sbi_write(dev_priv, 0x8008, tmp, SBI_MPHY); | 5225 | intel_sbi_write(dev_priv, 0x8008, tmp, SBI_MPHY); |
5234 | 5226 | ||
5235 | if (is_sdv) { | ||
5236 | tmp = intel_sbi_read(dev_priv, 0x800C, SBI_MPHY); | ||
5237 | tmp |= 0x7FFF; | ||
5238 | intel_sbi_write(dev_priv, 0x800C, tmp, SBI_MPHY); | ||
5239 | } | ||
5240 | |||
5241 | tmp = intel_sbi_read(dev_priv, 0x2008, SBI_MPHY); | 5227 | tmp = intel_sbi_read(dev_priv, 0x2008, SBI_MPHY); |
5242 | tmp |= (1 << 11); | 5228 | tmp |= (1 << 11); |
5243 | intel_sbi_write(dev_priv, 0x2008, tmp, SBI_MPHY); | 5229 | intel_sbi_write(dev_priv, 0x2008, tmp, SBI_MPHY); |
@@ -5246,24 +5232,6 @@ static void lpt_init_pch_refclk(struct drm_device *dev) | |||
5246 | tmp |= (1 << 11); | 5232 | tmp |= (1 << 11); |
5247 | intel_sbi_write(dev_priv, 0x2108, tmp, SBI_MPHY); | 5233 | intel_sbi_write(dev_priv, 0x2108, tmp, SBI_MPHY); |
5248 | 5234 | ||
5249 | if (is_sdv) { | ||
5250 | tmp = intel_sbi_read(dev_priv, 0x2038, SBI_MPHY); | ||
5251 | tmp |= (0x3F << 24) | (0xF << 20) | (0xF << 16); | ||
5252 | intel_sbi_write(dev_priv, 0x2038, tmp, SBI_MPHY); | ||
5253 | |||
5254 | tmp = intel_sbi_read(dev_priv, 0x2138, SBI_MPHY); | ||
5255 | tmp |= (0x3F << 24) | (0xF << 20) | (0xF << 16); | ||
5256 | intel_sbi_write(dev_priv, 0x2138, tmp, SBI_MPHY); | ||
5257 | |||
5258 | tmp = intel_sbi_read(dev_priv, 0x203C, SBI_MPHY); | ||
5259 | tmp |= (0x3F << 8); | ||
5260 | intel_sbi_write(dev_priv, 0x203C, tmp, SBI_MPHY); | ||
5261 | |||
5262 | tmp = intel_sbi_read(dev_priv, 0x213C, SBI_MPHY); | ||
5263 | tmp |= (0x3F << 8); | ||
5264 | intel_sbi_write(dev_priv, 0x213C, tmp, SBI_MPHY); | ||
5265 | } | ||
5266 | |||
5267 | tmp = intel_sbi_read(dev_priv, 0x206C, SBI_MPHY); | 5235 | tmp = intel_sbi_read(dev_priv, 0x206C, SBI_MPHY); |
5268 | tmp |= (1 << 24) | (1 << 21) | (1 << 18); | 5236 | tmp |= (1 << 24) | (1 << 21) | (1 << 18); |
5269 | intel_sbi_write(dev_priv, 0x206C, tmp, SBI_MPHY); | 5237 | intel_sbi_write(dev_priv, 0x206C, tmp, SBI_MPHY); |
@@ -5272,17 +5240,15 @@ static void lpt_init_pch_refclk(struct drm_device *dev) | |||
5272 | tmp |= (1 << 24) | (1 << 21) | (1 << 18); | 5240 | tmp |= (1 << 24) | (1 << 21) | (1 << 18); |
5273 | intel_sbi_write(dev_priv, 0x216C, tmp, SBI_MPHY); | 5241 | intel_sbi_write(dev_priv, 0x216C, tmp, SBI_MPHY); |
5274 | 5242 | ||
5275 | if (!is_sdv) { | 5243 | tmp = intel_sbi_read(dev_priv, 0x2080, SBI_MPHY); |
5276 | tmp = intel_sbi_read(dev_priv, 0x2080, SBI_MPHY); | 5244 | tmp &= ~(7 << 13); |
5277 | tmp &= ~(7 << 13); | 5245 | tmp |= (5 << 13); |
5278 | tmp |= (5 << 13); | 5246 | intel_sbi_write(dev_priv, 0x2080, tmp, SBI_MPHY); |
5279 | intel_sbi_write(dev_priv, 0x2080, tmp, SBI_MPHY); | ||
5280 | 5247 | ||
5281 | tmp = intel_sbi_read(dev_priv, 0x2180, SBI_MPHY); | 5248 | tmp = intel_sbi_read(dev_priv, 0x2180, SBI_MPHY); |
5282 | tmp &= ~(7 << 13); | 5249 | tmp &= ~(7 << 13); |
5283 | tmp |= (5 << 13); | 5250 | tmp |= (5 << 13); |
5284 | intel_sbi_write(dev_priv, 0x2180, tmp, SBI_MPHY); | 5251 | intel_sbi_write(dev_priv, 0x2180, tmp, SBI_MPHY); |
5285 | } | ||
5286 | 5252 | ||
5287 | tmp = intel_sbi_read(dev_priv, 0x208C, SBI_MPHY); | 5253 | tmp = intel_sbi_read(dev_priv, 0x208C, SBI_MPHY); |
5288 | tmp &= ~0xFF; | 5254 | tmp &= ~0xFF; |
@@ -5304,25 +5270,23 @@ static void lpt_init_pch_refclk(struct drm_device *dev) | |||
5304 | tmp |= (0x1C << 16); | 5270 | tmp |= (0x1C << 16); |
5305 | intel_sbi_write(dev_priv, 0x2198, tmp, SBI_MPHY); | 5271 | intel_sbi_write(dev_priv, 0x2198, tmp, SBI_MPHY); |
5306 | 5272 | ||
5307 | if (!is_sdv) { | 5273 | tmp = intel_sbi_read(dev_priv, 0x20C4, SBI_MPHY); |
5308 | tmp = intel_sbi_read(dev_priv, 0x20C4, SBI_MPHY); | 5274 | tmp |= (1 << 27); |
5309 | tmp |= (1 << 27); | 5275 | intel_sbi_write(dev_priv, 0x20C4, tmp, SBI_MPHY); |
5310 | intel_sbi_write(dev_priv, 0x20C4, tmp, SBI_MPHY); | ||
5311 | 5276 | ||
5312 | tmp = intel_sbi_read(dev_priv, 0x21C4, SBI_MPHY); | 5277 | tmp = intel_sbi_read(dev_priv, 0x21C4, SBI_MPHY); |
5313 | tmp |= (1 << 27); | 5278 | tmp |= (1 << 27); |
5314 | intel_sbi_write(dev_priv, 0x21C4, tmp, SBI_MPHY); | 5279 | intel_sbi_write(dev_priv, 0x21C4, tmp, SBI_MPHY); |
5315 | 5280 | ||
5316 | tmp = intel_sbi_read(dev_priv, 0x20EC, SBI_MPHY); | 5281 | tmp = intel_sbi_read(dev_priv, 0x20EC, SBI_MPHY); |
5317 | tmp &= ~(0xF << 28); | 5282 | tmp &= ~(0xF << 28); |
5318 | tmp |= (4 << 28); | 5283 | tmp |= (4 << 28); |
5319 | intel_sbi_write(dev_priv, 0x20EC, tmp, SBI_MPHY); | 5284 | intel_sbi_write(dev_priv, 0x20EC, tmp, SBI_MPHY); |
5320 | 5285 | ||
5321 | tmp = intel_sbi_read(dev_priv, 0x21EC, SBI_MPHY); | 5286 | tmp = intel_sbi_read(dev_priv, 0x21EC, SBI_MPHY); |
5322 | tmp &= ~(0xF << 28); | 5287 | tmp &= ~(0xF << 28); |
5323 | tmp |= (4 << 28); | 5288 | tmp |= (4 << 28); |
5324 | intel_sbi_write(dev_priv, 0x21EC, tmp, SBI_MPHY); | 5289 | intel_sbi_write(dev_priv, 0x21EC, tmp, SBI_MPHY); |
5325 | } | ||
5326 | 5290 | ||
5327 | /* ULT uses SBI_GEN0, but ULT doesn't have VGA, so we don't care. */ | 5291 | /* ULT uses SBI_GEN0, but ULT doesn't have VGA, so we don't care. */ |
5328 | tmp = intel_sbi_read(dev_priv, SBI_DBUFF0, SBI_ICLK); | 5292 | tmp = intel_sbi_read(dev_priv, SBI_DBUFF0, SBI_ICLK); |