diff options
author | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-02-19 16:31:57 -0500 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2013-04-29 15:51:16 -0400 |
commit | 1e833f40eb38b033ea185687daa72c073f1acc15 (patch) | |
tree | 0fffd268962fd7f1ff52082eee76823381d31f42 /drivers/gpu/drm/i915/intel_display.c | |
parent | 1857e1daa0695d45b2639ac9e3cfcdaede4a7f8a (diff) |
drm/i915: don't count cpu ports for fdi B/C lane sharing
This allows us to use all 4 fdi lanes on fdi B when the cpu eDP is
running on pipe C. Yay!
v2: Encapsulate test into a little helper function, as suggested by
Chris Wilson.
Reviewed-by: Imre Deak <imre.deak@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 | 18 |
1 files changed, 13 insertions, 5 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 1d157978f10b..1ef44b2a6952 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -2369,6 +2369,11 @@ static void intel_fdi_normal_train(struct drm_crtc *crtc) | |||
2369 | FDI_FE_ERRC_ENABLE); | 2369 | FDI_FE_ERRC_ENABLE); |
2370 | } | 2370 | } |
2371 | 2371 | ||
2372 | static bool pipe_has_enabled_pch(struct intel_crtc *intel_crtc) | ||
2373 | { | ||
2374 | return intel_crtc->base.enabled && intel_crtc->config.has_pch_encoder; | ||
2375 | } | ||
2376 | |||
2372 | static void ivb_modeset_global_resources(struct drm_device *dev) | 2377 | static void ivb_modeset_global_resources(struct drm_device *dev) |
2373 | { | 2378 | { |
2374 | struct drm_i915_private *dev_priv = dev->dev_private; | 2379 | struct drm_i915_private *dev_priv = dev->dev_private; |
@@ -2378,10 +2383,13 @@ static void ivb_modeset_global_resources(struct drm_device *dev) | |||
2378 | to_intel_crtc(dev_priv->pipe_to_crtc_mapping[PIPE_C]); | 2383 | to_intel_crtc(dev_priv->pipe_to_crtc_mapping[PIPE_C]); |
2379 | uint32_t temp; | 2384 | uint32_t temp; |
2380 | 2385 | ||
2381 | /* When everything is off disable fdi C so that we could enable fdi B | 2386 | /* |
2382 | * with all lanes. XXX: This misses the case where a pipe is not using | 2387 | * When everything is off disable fdi C so that we could enable fdi B |
2383 | * any pch resources and so doesn't need any fdi lanes. */ | 2388 | * with all lanes. Note that we don't care about enabled pipes without |
2384 | if (!pipe_B_crtc->base.enabled && !pipe_C_crtc->base.enabled) { | 2389 | * an enabled pch encoder. |
2390 | */ | ||
2391 | if (!pipe_has_enabled_pch(pipe_B_crtc) && | ||
2392 | !pipe_has_enabled_pch(pipe_C_crtc)) { | ||
2385 | WARN_ON(I915_READ(FDI_RX_CTL(PIPE_B)) & FDI_RX_ENABLE); | 2393 | WARN_ON(I915_READ(FDI_RX_CTL(PIPE_B)) & FDI_RX_ENABLE); |
2386 | WARN_ON(I915_READ(FDI_RX_CTL(PIPE_C)) & FDI_RX_ENABLE); | 2394 | WARN_ON(I915_READ(FDI_RX_CTL(PIPE_C)) & FDI_RX_ENABLE); |
2387 | 2395 | ||
@@ -4015,7 +4023,7 @@ static bool ironlake_check_fdi_lanes(struct drm_device *dev, enum pipe pipe, | |||
4015 | } | 4023 | } |
4016 | return true; | 4024 | return true; |
4017 | case PIPE_C: | 4025 | case PIPE_C: |
4018 | if (!pipe_B_crtc->base.enabled || | 4026 | if (!pipe_has_enabled_pch(pipe_B_crtc) || |
4019 | pipe_B_crtc->config.fdi_lanes <= 2) { | 4027 | pipe_B_crtc->config.fdi_lanes <= 2) { |
4020 | if (pipe_config->fdi_lanes > 2) { | 4028 | if (pipe_config->fdi_lanes > 2) { |
4021 | DRM_DEBUG_KMS("invalid shared fdi lane config on pipe %c: %i lanes\n", | 4029 | DRM_DEBUG_KMS("invalid shared fdi lane config on pipe %c: %i lanes\n", |