diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-20 02:25:26 -0400 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-05-10 16:19:17 -0400 |
commit | 6492711d05b85f9794809cb4a961ce8cdc6fa720 (patch) | |
tree | b366f0d6111df5ef38bb926d2fa33cc77dc44655 /drivers/gpu | |
parent | 4fbf69138ab3aa28a8f92512b7417d3d1829a086 (diff) |
drm/i915: Remove dead code from intel_get_load_detect_pipe()
As we only allow the use of a disabled CRTC, we don't need to handle the
case where we are reusing an already enabled pipe.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Reviewed-by: Keith Packard <keithp@keithp.com>
Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/i915/intel_display.c | 28 |
1 files changed, 10 insertions, 18 deletions
diff --git a/drivers/gpu/drm/i915/intel_display.c b/drivers/gpu/drm/i915/intel_display.c index e857a832efeb..7413a070bf16 100644 --- a/drivers/gpu/drm/i915/intel_display.c +++ b/drivers/gpu/drm/i915/intel_display.c | |||
@@ -5491,8 +5491,6 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder, | |||
5491 | struct drm_encoder *encoder = &intel_encoder->base; | 5491 | struct drm_encoder *encoder = &intel_encoder->base; |
5492 | struct drm_crtc *crtc = NULL; | 5492 | struct drm_crtc *crtc = NULL; |
5493 | struct drm_device *dev = encoder->dev; | 5493 | struct drm_device *dev = encoder->dev; |
5494 | struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; | ||
5495 | struct drm_crtc_helper_funcs *crtc_funcs; | ||
5496 | int i = -1; | 5494 | int i = -1; |
5497 | 5495 | ||
5498 | /* | 5496 | /* |
@@ -5515,8 +5513,13 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder, | |||
5515 | 5513 | ||
5516 | /* Make sure the crtc and connector are running */ | 5514 | /* Make sure the crtc and connector are running */ |
5517 | if (intel_crtc->dpms_mode != DRM_MODE_DPMS_ON) { | 5515 | if (intel_crtc->dpms_mode != DRM_MODE_DPMS_ON) { |
5516 | struct drm_encoder_helper_funcs *encoder_funcs; | ||
5517 | struct drm_crtc_helper_funcs *crtc_funcs; | ||
5518 | |||
5518 | crtc_funcs = crtc->helper_private; | 5519 | crtc_funcs = crtc->helper_private; |
5519 | crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON); | 5520 | crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON); |
5521 | |||
5522 | encoder_funcs = encoder->helper_private; | ||
5520 | encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON); | 5523 | encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON); |
5521 | } | 5524 | } |
5522 | 5525 | ||
@@ -5549,23 +5552,12 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder, | |||
5549 | old->dpms_mode = intel_crtc->dpms_mode; | 5552 | old->dpms_mode = intel_crtc->dpms_mode; |
5550 | old->load_detect_temp = true; | 5553 | old->load_detect_temp = true; |
5551 | 5554 | ||
5552 | if (!crtc->enabled) { | 5555 | if (!mode) |
5553 | if (!mode) | 5556 | mode = &load_detect_mode; |
5554 | mode = &load_detect_mode; | ||
5555 | |||
5556 | if (!drm_crtc_helper_set_mode(crtc, mode, 0, 0, crtc->fb)) { | ||
5557 | DRM_DEBUG_KMS("failed to set mode on load-detect pipe\n"); | ||
5558 | return false; | ||
5559 | } | ||
5560 | } else { | ||
5561 | if (intel_crtc->dpms_mode != DRM_MODE_DPMS_ON) { | ||
5562 | crtc_funcs = crtc->helper_private; | ||
5563 | crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON); | ||
5564 | } | ||
5565 | 5557 | ||
5566 | /* Add this connector to the crtc */ | 5558 | if (!drm_crtc_helper_set_mode(crtc, mode, 0, 0, crtc->fb)) { |
5567 | encoder_funcs->mode_set(encoder, &crtc->mode, &crtc->hwmode); | 5559 | DRM_DEBUG_KMS("failed to set mode on load-detect pipe\n"); |
5568 | encoder_funcs->commit(encoder); | 5560 | return false; |
5569 | } | 5561 | } |
5570 | 5562 | ||
5571 | /* let the connector get through one full cycle before testing */ | 5563 | /* let the connector get through one full cycle before testing */ |