diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-03-28 05:41:59 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-04-03 05:31:26 -0400 |
commit | 8b47047bd103c9fdb50440790a2ef17fa69a35c4 (patch) | |
tree | 560242ebe935643b536b0214d04bf31195f93659 /drivers/gpu/drm/i915/intel_display.c | |
parent | 947978fa64e6550766f3a890fcba977f7b04c448 (diff) |
drm/i915: rip out superflous is_dp&is_cpu_edp tracking
The only exception left is is_cpu_edp in the haswell modeset code.
We need that to assign the cpu transcoder, but we might want to
move that eventually into the encoder, too.
\o/-by: Jesse Barnes <jbarnes@virtuousgeek.org>
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 | 37 |
1 files changed, 7 insertions, 30 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 3875a5cbac66..b804523b2faf 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -4552,7 +4552,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, | |||
4552 | intel_clock_t clock, reduced_clock; | 4552 | intel_clock_t clock, reduced_clock; |
4553 | u32 dspcntr, pipeconf; | 4553 | u32 dspcntr, pipeconf; |
4554 | bool ok, has_reduced_clock = false, is_sdvo = false; | 4554 | bool ok, has_reduced_clock = false, is_sdvo = false; |
4555 | bool is_lvds = false, is_tv = false, is_dp = false; | 4555 | bool is_lvds = false, is_tv = false; |
4556 | struct intel_encoder *encoder; | 4556 | struct intel_encoder *encoder; |
4557 | const intel_limit_t *limit; | 4557 | const intel_limit_t *limit; |
4558 | int ret; | 4558 | int ret; |
@@ -4571,9 +4571,6 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, | |||
4571 | case INTEL_OUTPUT_TVOUT: | 4571 | case INTEL_OUTPUT_TVOUT: |
4572 | is_tv = true; | 4572 | is_tv = true; |
4573 | break; | 4573 | break; |
4574 | case INTEL_OUTPUT_DISPLAYPORT: | ||
4575 | is_dp = true; | ||
4576 | break; | ||
4577 | } | 4574 | } |
4578 | 4575 | ||
4579 | num_connectors++; | 4576 | num_connectors++; |
@@ -4656,7 +4653,7 @@ static int i9xx_crtc_mode_set(struct drm_crtc *crtc, | |||
4656 | 4653 | ||
4657 | /* default to 8bpc */ | 4654 | /* default to 8bpc */ |
4658 | pipeconf &= ~(PIPECONF_BPC_MASK | PIPECONF_DITHER_EN); | 4655 | pipeconf &= ~(PIPECONF_BPC_MASK | PIPECONF_DITHER_EN); |
4659 | if (is_dp) { | 4656 | if (intel_crtc->config.has_dp_encoder) { |
4660 | if (intel_crtc->config.dither) { | 4657 | if (intel_crtc->config.dither) { |
4661 | pipeconf |= PIPECONF_6BPC | | 4658 | pipeconf |= PIPECONF_6BPC | |
4662 | PIPECONF_DITHER_EN | | 4659 | PIPECONF_DITHER_EN | |
@@ -5456,7 +5453,6 @@ static uint32_t ironlake_compute_dpll(struct intel_crtc *intel_crtc, | |||
5456 | uint32_t dpll; | 5453 | uint32_t dpll; |
5457 | int factor, num_connectors = 0; | 5454 | int factor, num_connectors = 0; |
5458 | bool is_lvds = false, is_sdvo = false, is_tv = false; | 5455 | bool is_lvds = false, is_sdvo = false, is_tv = false; |
5459 | bool is_dp = false, is_cpu_edp = false; | ||
5460 | 5456 | ||
5461 | for_each_encoder_on_crtc(dev, crtc, intel_encoder) { | 5457 | for_each_encoder_on_crtc(dev, crtc, intel_encoder) { |
5462 | switch (intel_encoder->type) { | 5458 | switch (intel_encoder->type) { |
@@ -5472,14 +5468,6 @@ static uint32_t ironlake_compute_dpll(struct intel_crtc *intel_crtc, | |||
5472 | case INTEL_OUTPUT_TVOUT: | 5468 | case INTEL_OUTPUT_TVOUT: |
5473 | is_tv = true; | 5469 | is_tv = true; |
5474 | break; | 5470 | break; |
5475 | case INTEL_OUTPUT_DISPLAYPORT: | ||
5476 | is_dp = true; | ||
5477 | break; | ||
5478 | case INTEL_OUTPUT_EDP: | ||
5479 | is_dp = true; | ||
5480 | if (!intel_encoder_is_pch_edp(&intel_encoder->base)) | ||
5481 | is_cpu_edp = true; | ||
5482 | break; | ||
5483 | } | 5471 | } |
5484 | 5472 | ||
5485 | num_connectors++; | 5473 | num_connectors++; |
@@ -5511,7 +5499,8 @@ static uint32_t ironlake_compute_dpll(struct intel_crtc *intel_crtc, | |||
5511 | } | 5499 | } |
5512 | dpll |= DPLL_DVO_HIGH_SPEED; | 5500 | dpll |= DPLL_DVO_HIGH_SPEED; |
5513 | } | 5501 | } |
5514 | if (is_dp && !is_cpu_edp) | 5502 | if (intel_crtc->config.has_dp_encoder && |
5503 | intel_crtc->config.has_pch_encoder) | ||
5515 | dpll |= DPLL_DVO_HIGH_SPEED; | 5504 | dpll |= DPLL_DVO_HIGH_SPEED; |
5516 | 5505 | ||
5517 | /* compute bitmask from p1 value */ | 5506 | /* compute bitmask from p1 value */ |
@@ -5564,7 +5553,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc, | |||
5564 | intel_clock_t clock, reduced_clock; | 5553 | intel_clock_t clock, reduced_clock; |
5565 | u32 dpll, fp = 0, fp2 = 0; | 5554 | u32 dpll, fp = 0, fp2 = 0; |
5566 | bool ok, has_reduced_clock = false; | 5555 | bool ok, has_reduced_clock = false; |
5567 | bool is_lvds = false, is_dp = false, is_cpu_edp = false; | 5556 | bool is_lvds = false; |
5568 | struct intel_encoder *encoder; | 5557 | struct intel_encoder *encoder; |
5569 | int ret; | 5558 | int ret; |
5570 | bool dither, fdi_config_ok; | 5559 | bool dither, fdi_config_ok; |
@@ -5574,14 +5563,6 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc, | |||
5574 | case INTEL_OUTPUT_LVDS: | 5563 | case INTEL_OUTPUT_LVDS: |
5575 | is_lvds = true; | 5564 | is_lvds = true; |
5576 | break; | 5565 | break; |
5577 | case INTEL_OUTPUT_DISPLAYPORT: | ||
5578 | is_dp = true; | ||
5579 | break; | ||
5580 | case INTEL_OUTPUT_EDP: | ||
5581 | is_dp = true; | ||
5582 | if (!intel_encoder_is_pch_edp(&encoder->base)) | ||
5583 | is_cpu_edp = true; | ||
5584 | break; | ||
5585 | } | 5566 | } |
5586 | 5567 | ||
5587 | num_connectors++; | 5568 | num_connectors++; |
@@ -5618,7 +5599,7 @@ static int ironlake_crtc_mode_set(struct drm_crtc *crtc, | |||
5618 | drm_mode_debug_printmodeline(mode); | 5599 | drm_mode_debug_printmodeline(mode); |
5619 | 5600 | ||
5620 | /* CPU eDP is the only output that doesn't need a PCH PLL of its own. */ | 5601 | /* CPU eDP is the only output that doesn't need a PCH PLL of its own. */ |
5621 | if (!is_cpu_edp) { | 5602 | if (intel_crtc->config.has_pch_encoder) { |
5622 | struct intel_pch_pll *pll; | 5603 | struct intel_pch_pll *pll; |
5623 | 5604 | ||
5624 | pll = intel_get_pch_pll(intel_crtc, dpll, fp); | 5605 | pll = intel_get_pch_pll(intel_crtc, dpll, fp); |
@@ -5731,18 +5712,14 @@ static int haswell_crtc_mode_set(struct drm_crtc *crtc, | |||
5731 | int pipe = intel_crtc->pipe; | 5712 | int pipe = intel_crtc->pipe; |
5732 | int plane = intel_crtc->plane; | 5713 | int plane = intel_crtc->plane; |
5733 | int num_connectors = 0; | 5714 | int num_connectors = 0; |
5734 | bool is_dp = false, is_cpu_edp = false; | 5715 | bool is_cpu_edp = false; |
5735 | struct intel_encoder *encoder; | 5716 | struct intel_encoder *encoder; |
5736 | int ret; | 5717 | int ret; |
5737 | bool dither; | 5718 | bool dither; |
5738 | 5719 | ||
5739 | for_each_encoder_on_crtc(dev, crtc, encoder) { | 5720 | for_each_encoder_on_crtc(dev, crtc, encoder) { |
5740 | switch (encoder->type) { | 5721 | switch (encoder->type) { |
5741 | case INTEL_OUTPUT_DISPLAYPORT: | ||
5742 | is_dp = true; | ||
5743 | break; | ||
5744 | case INTEL_OUTPUT_EDP: | 5722 | case INTEL_OUTPUT_EDP: |
5745 | is_dp = true; | ||
5746 | if (!intel_encoder_is_pch_edp(&encoder->base)) | 5723 | if (!intel_encoder_is_pch_edp(&encoder->base)) |
5747 | is_cpu_edp = true; | 5724 | is_cpu_edp = true; |
5748 | break; | 5725 | break; |