diff options
author | Eric Anholt <eric@anholt.net> | 2011-03-30 16:01:05 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-05-10 16:56:35 -0400 |
commit | c713bb087e714f01082e6b8a85e98552e7bc6c3a (patch) | |
tree | 7fd00c70a790b4e55f1611e7f8de8d3a59ff2c60 /drivers/gpu | |
parent | 929c77fb38aa1e5f028f1b59dfb641b25fffea8b (diff) |
drm/i915: Drop the eDP paths from the pre-Ironlake crtc_mode_set.
While g4x had DP, eDP came with Ironlake, so we don't need that code here.
Signed-off-by: Eric Anholt <eric@anholt.net>
Reviewed-by: Jesse Barnes <jbarnes@virtuousgeek.org>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 57 |
1 files changed, 24 insertions, 33 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 622820b6a236..08ff2f0b9322 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4533,7 +4533,6 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, | |||
4533 | u32 dpll, fp = 0, fp2 = 0, dspcntr, pipeconf; | 4533 | u32 dpll, fp = 0, fp2 = 0, dspcntr, pipeconf; |
4534 | bool ok, has_reduced_clock = false, is_sdvo = false, is_dvo = false; | 4534 | bool ok, has_reduced_clock = false, is_sdvo = false, is_dvo = false; |
4535 | bool is_crt = false, is_lvds = false, is_tv = false, is_dp = false; | 4535 | bool is_crt = false, is_lvds = false, is_tv = false, is_dp = false; |
4536 | struct intel_encoder *has_edp_encoder = NULL; | ||
4537 | struct drm_mode_config *mode_config = &dev->mode_config; | 4536 | struct drm_mode_config *mode_config = &dev->mode_config; |
4538 | struct intel_encoder *encoder; | 4537 | struct intel_encoder *encoder; |
4539 | const intel_limit_t *limit; | 4538 | const intel_limit_t *limit; |
@@ -4567,9 +4566,6 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, | |||
4567 | case INTEL_OUTPUT_DISPLAYPORT: | 4566 | case INTEL_OUTPUT_DISPLAYPORT: |
4568 | is_dp = true; | 4567 | is_dp = true; |
4569 | break; | 4568 | break; |
4570 | case INTEL_OUTPUT_EDP: | ||
4571 | has_edp_encoder = encoder; | ||
4572 | break; | ||
4573 | } | 4569 | } |
4574 | 4570 | ||
4575 | num_connectors++; | 4571 | num_connectors++; |
@@ -4750,14 +4746,11 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, | |||
4750 | fp_reg = FP0(pipe); | 4746 | fp_reg = FP0(pipe); |
4751 | dpll_reg = DPLL(pipe); | 4747 | dpll_reg = DPLL(pipe); |
4752 | 4748 | ||
4753 | /* PCH eDP needs FDI, but CPU eDP does not */ | 4749 | I915_WRITE(fp_reg, fp); |
4754 | if (!has_edp_encoder) { | 4750 | I915_WRITE(dpll_reg, dpll & ~DPLL_VCO_ENABLE); |
4755 | I915_WRITE(fp_reg, fp); | ||
4756 | I915_WRITE(dpll_reg, dpll & ~DPLL_VCO_ENABLE); | ||
4757 | 4751 | ||
4758 | POSTING_READ(dpll_reg); | 4752 | POSTING_READ(dpll_reg); |
4759 | udelay(150); | 4753 | udelay(150); |
4760 | } | ||
4761 | 4754 | ||
4762 | /* The LVDS pin pair needs to be on before the DPLLs are enabled. | 4755 | /* The LVDS pin pair needs to be on before the DPLLs are enabled. |
4763 | * This is an exception to the general rule that mode_set doesn't turn | 4756 | * This is an exception to the general rule that mode_set doesn't turn |
@@ -4817,31 +4810,29 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, | |||
4817 | intel_dp_set_m_n(crtc, mode, adjusted_mode); | 4810 | intel_dp_set_m_n(crtc, mode, adjusted_mode); |
4818 | } | 4811 | } |
4819 | 4812 | ||
4820 | if (!has_edp_encoder) { | 4813 | I915_WRITE(dpll_reg, dpll); |
4821 | I915_WRITE(dpll_reg, dpll); | ||
4822 | 4814 | ||
4823 | /* Wait for the clocks to stabilize. */ | 4815 | /* Wait for the clocks to stabilize. */ |
4824 | POSTING_READ(dpll_reg); | 4816 | POSTING_READ(dpll_reg); |
4825 | udelay(150); | 4817 | udelay(150); |
4826 | 4818 | ||
4827 | if (INTEL_INFO(dev)->gen >= 4) { | 4819 | if (INTEL_INFO(dev)->gen >= 4) { |
4828 | temp = 0; | 4820 | temp = 0; |
4829 | if (is_sdvo) { | 4821 | if (is_sdvo) { |
4830 | temp = intel_mode_get_pixel_multiplier(adjusted_mode); | 4822 | temp = intel_mode_get_pixel_multiplier(adjusted_mode); |
4831 | if (temp > 1) | 4823 | if (temp > 1) |
4832 | temp = (temp - 1) << DPLL_MD_UDI_MULTIPLIER_SHIFT; | 4824 | temp = (temp - 1) << DPLL_MD_UDI_MULTIPLIER_SHIFT; |
4833 | else | 4825 | else |
4834 | temp = 0; | 4826 | temp = 0; |
4835 | } | ||
4836 | I915_WRITE(DPLL_MD(pipe), temp); | ||
4837 | } else { | ||
4838 | /* The pixel multiplier can only be updated once the | ||
4839 | * DPLL is enabled and the clocks are stable. | ||
4840 | * | ||
4841 | * So write it again. | ||
4842 | */ | ||
4843 | I915_WRITE(dpll_reg, dpll); | ||
4844 | } | 4827 | } |
4828 | I915_WRITE(DPLL_MD(pipe), temp); | ||
4829 | } else { | ||
4830 | /* The pixel multiplier can only be updated once the | ||
4831 | * DPLL is enabled and the clocks are stable. | ||
4832 | * | ||
4833 | * So write it again. | ||
4834 | */ | ||
4835 | I915_WRITE(dpll_reg, dpll); | ||
4845 | } | 4836 | } |
4846 | 4837 | ||
4847 | intel_crtc->lowfreq_avail = false; | 4838 | intel_crtc->lowfreq_avail = false; |