diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2011-04-20 07:25:26 +0100 |
---|---|---|
committer | Keith Packard <keithp@keithp.com> | 2011-05-10 13:19:17 -0700 |
commit | 6492711d05b85f9794809cb4a961ce8cdc6fa720 (patch) | |
tree | b366f0d6111df5ef38bb926d2fa33cc77dc44655 | |
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>
-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, struct drm_encoder *encoder = &intel_encoder->base; struct drm_crtc *crtc = NULL; struct drm_device *dev = encoder->dev; - struct drm_encoder_helper_funcs *encoder_funcs = encoder->helper_private; - struct drm_crtc_helper_funcs *crtc_funcs; int i = -1; /* @@ -5515,8 +5513,13 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder, /* Make sure the crtc and connector are running */ if (intel_crtc->dpms_mode != DRM_MODE_DPMS_ON) { + struct drm_encoder_helper_funcs *encoder_funcs; + struct drm_crtc_helper_funcs *crtc_funcs; + crtc_funcs = crtc->helper_private; crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON); + + encoder_funcs = encoder->helper_private; encoder_funcs->dpms(encoder, DRM_MODE_DPMS_ON); } @@ -5549,23 +5552,12 @@ bool intel_get_load_detect_pipe(struct intel_encoder *intel_encoder, old->dpms_mode = intel_crtc->dpms_mode; old->load_detect_temp = true; - if (!crtc->enabled) { - if (!mode) - mode = &load_detect_mode; - - if (!drm_crtc_helper_set_mode(crtc, mode, 0, 0, crtc->fb)) { - DRM_DEBUG_KMS("failed to set mode on load-detect pipe\n"); - return false; - } - } else { - if (intel_crtc->dpms_mode != DRM_MODE_DPMS_ON) { - crtc_funcs = crtc->helper_private; - crtc_funcs->dpms(crtc, DRM_MODE_DPMS_ON); - } + if (!mode) + mode = &load_detect_mode; - /* Add this connector to the crtc */ - encoder_funcs->mode_set(encoder, &crtc->mode, &crtc->hwmode); - encoder_funcs->commit(encoder); + if (!drm_crtc_helper_set_mode(crtc, mode, 0, 0, crtc->fb)) { + DRM_DEBUG_KMS("failed to set mode on load-detect pipe\n"); + return false; } /* let the connector get through one full cycle before testing */ |