diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-06-05 07:34:04 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-06-10 13:45:26 -0400 |
commit | d925c59a8174c8c150da7e0a38e35d89a8e7149c (patch) | |
tree | 599293da20ec65ad3aa303bd59afad5208b6342b /drivers/gpu/drm/i915/intel_display.c | |
parent | cdbd2316a03f68b25a135a34d1d24f01ddef0c53 (diff) |
drm/i915: conditionally disable pch resources in ilk_crtc_disable
Simlar to how disable already works on haswell. This is possible
since we now carefully track the pch state in the pipe config.
Reviewed-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
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 | 69 |
1 files changed, 37 insertions, 32 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 1d0aa24bb899..39984fb07fa9 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -3436,7 +3436,9 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc) | |||
3436 | intel_disable_planes(crtc); | 3436 | intel_disable_planes(crtc); |
3437 | intel_disable_plane(dev_priv, plane, pipe); | 3437 | intel_disable_plane(dev_priv, plane, pipe); |
3438 | 3438 | ||
3439 | intel_set_pch_fifo_underrun_reporting(dev, pipe, false); | 3439 | if (intel_crtc->config.has_pch_encoder) |
3440 | intel_set_pch_fifo_underrun_reporting(dev, pipe, false); | ||
3441 | |||
3440 | intel_disable_pipe(dev_priv, pipe); | 3442 | intel_disable_pipe(dev_priv, pipe); |
3441 | 3443 | ||
3442 | ironlake_pfit_disable(intel_crtc); | 3444 | ironlake_pfit_disable(intel_crtc); |
@@ -3445,42 +3447,45 @@ static void ironlake_crtc_disable(struct drm_crtc *crtc) | |||
3445 | if (encoder->post_disable) | 3447 | if (encoder->post_disable) |
3446 | encoder->post_disable(encoder); | 3448 | encoder->post_disable(encoder); |
3447 | 3449 | ||
3448 | ironlake_fdi_disable(crtc); | 3450 | if (intel_crtc->config.has_pch_encoder) { |
3451 | ironlake_fdi_disable(crtc); | ||
3449 | 3452 | ||
3450 | ironlake_disable_pch_transcoder(dev_priv, pipe); | 3453 | ironlake_disable_pch_transcoder(dev_priv, pipe); |
3451 | intel_set_pch_fifo_underrun_reporting(dev, pipe, true); | 3454 | intel_set_pch_fifo_underrun_reporting(dev, pipe, true); |
3452 | 3455 | ||
3453 | if (HAS_PCH_CPT(dev)) { | 3456 | if (HAS_PCH_CPT(dev)) { |
3454 | /* disable TRANS_DP_CTL */ | 3457 | /* disable TRANS_DP_CTL */ |
3455 | reg = TRANS_DP_CTL(pipe); | 3458 | reg = TRANS_DP_CTL(pipe); |
3456 | temp = I915_READ(reg); | 3459 | temp = I915_READ(reg); |
3457 | temp &= ~(TRANS_DP_OUTPUT_ENABLE | TRANS_DP_PORT_SEL_MASK); | 3460 | temp &= ~(TRANS_DP_OUTPUT_ENABLE | |
3458 | temp |= TRANS_DP_PORT_SEL_NONE; | 3461 | TRANS_DP_PORT_SEL_MASK); |
3459 | I915_WRITE(reg, temp); | 3462 | temp |= TRANS_DP_PORT_SEL_NONE; |
3460 | 3463 | I915_WRITE(reg, temp); | |
3461 | /* disable DPLL_SEL */ | 3464 | |
3462 | temp = I915_READ(PCH_DPLL_SEL); | 3465 | /* disable DPLL_SEL */ |
3463 | switch (pipe) { | 3466 | temp = I915_READ(PCH_DPLL_SEL); |
3464 | case 0: | 3467 | switch (pipe) { |
3465 | temp &= ~(TRANSA_DPLL_ENABLE | TRANSA_DPLLB_SEL); | 3468 | case 0: |
3466 | break; | 3469 | temp &= ~(TRANSA_DPLL_ENABLE | TRANSA_DPLLB_SEL); |
3467 | case 1: | 3470 | break; |
3468 | temp &= ~(TRANSB_DPLL_ENABLE | TRANSB_DPLLB_SEL); | 3471 | case 1: |
3469 | break; | 3472 | temp &= ~(TRANSB_DPLL_ENABLE | TRANSB_DPLLB_SEL); |
3470 | case 2: | 3473 | break; |
3471 | /* C shares PLL A or B */ | 3474 | case 2: |
3472 | temp &= ~(TRANSC_DPLL_ENABLE | TRANSC_DPLLB_SEL); | 3475 | /* C shares PLL A or B */ |
3473 | break; | 3476 | temp &= ~(TRANSC_DPLL_ENABLE | TRANSC_DPLLB_SEL); |
3474 | default: | 3477 | break; |
3475 | BUG(); /* wtf */ | 3478 | default: |
3479 | BUG(); /* wtf */ | ||
3480 | } | ||
3481 | I915_WRITE(PCH_DPLL_SEL, temp); | ||
3476 | } | 3482 | } |
3477 | I915_WRITE(PCH_DPLL_SEL, temp); | ||
3478 | } | ||
3479 | 3483 | ||
3480 | /* disable PCH DPLL */ | 3484 | /* disable PCH DPLL */ |
3481 | intel_disable_pch_pll(intel_crtc); | 3485 | intel_disable_pch_pll(intel_crtc); |
3482 | 3486 | ||
3483 | ironlake_fdi_pll_disable(intel_crtc); | 3487 | ironlake_fdi_pll_disable(intel_crtc); |
3488 | } | ||
3484 | 3489 | ||
3485 | intel_crtc->active = false; | 3490 | intel_crtc->active = false; |
3486 | intel_update_watermarks(dev); | 3491 | intel_update_watermarks(dev); |