diff options
author | Ville Syrjälä <ville.syrjala@linux.intel.com> | 2015-03-11 12:52:30 -0400 |
---|---|---|
committer | Daniel Vetter <daniel.vetter@ffwll.ch> | 2015-03-17 17:30:28 -0400 |
commit | 251cc67c7a28c216c9d4377ff5bf435c4248679e (patch) | |
tree | 2fb9bb225380333806523e65d4291b215a72ac1c /drivers/gpu/drm/i915/intel_display.c | |
parent | 4c2a8897bc7662f0ab4148185cfb65153e4095b9 (diff) |
drm/i915: Rewrite some some of the FDI lane checks
The logic in the FDI lane checks is very hard for my poor brain to
grasp. Rewrite it in a more straightforward way.
Cc: Ander Conselvan de Oliveira <ander.conselvan.de.oliveira@intel.com>
Cc: Daniel Vetter <daniel@ffwll.ch>
Signed-off-by: Ville Syrjälä <ville.syrjala@linux.intel.com>
Reviewed-by: Ander Conselvan de Oliveira <conselvan2@gmail.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 | 15 |
1 files changed, 7 insertions, 8 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index 7580d3fe845a..b7de04c96f88 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -5580,14 +5580,13 @@ static bool ironlake_check_fdi_lanes(struct drm_device *dev, enum pipe pipe, | |||
5580 | } | 5580 | } |
5581 | return true; | 5581 | return true; |
5582 | case PIPE_C: | 5582 | case PIPE_C: |
5583 | if (!pipe_has_enabled_pch(pipe_B_crtc) || | 5583 | if (pipe_config->fdi_lanes > 2) { |
5584 | pipe_B_crtc->config->fdi_lanes <= 2) { | 5584 | DRM_DEBUG_KMS("only 2 lanes on pipe %c: required %i lanes\n", |
5585 | if (pipe_config->fdi_lanes > 2) { | 5585 | pipe_name(pipe), pipe_config->fdi_lanes); |
5586 | DRM_DEBUG_KMS("invalid shared fdi lane config on pipe %c: %i lanes\n", | 5586 | return false; |
5587 | pipe_name(pipe), pipe_config->fdi_lanes); | 5587 | } |
5588 | return false; | 5588 | if (pipe_has_enabled_pch(pipe_B_crtc) && |
5589 | } | 5589 | pipe_B_crtc->config->fdi_lanes > 2) { |
5590 | } else { | ||
5591 | DRM_DEBUG_KMS("fdi link B uses too many lanes to enable link C\n"); | 5590 | DRM_DEBUG_KMS("fdi link B uses too many lanes to enable link C\n"); |
5592 | return false; | 5591 | return false; |
5593 | } | 5592 | } |