aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/i915/intel_crt.c
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2011-04-19 18:10:58 -0400
committerKeith Packard <keithp@keithp.com>2011-05-10 16:19:13 -0400
commit7173188d5d5e50b95c588dbae3b3bc78fde4138e (patch)
tree2659db8e43421bdc75e0406796a446b12fd82708 /drivers/gpu/drm/i915/intel_crt.c
parentb259f6730c09bc356df932ba9188f291de816808 (diff)
drm/i915: Simplify return value from intel_get_load_detect_pipe
... and so remove the confusion as to whether to use the returned crtc or intel_encoder->base.crtc with the subsequent load-detection. Even though they were the same, the two instances of load-detection code disagreed over which was the more correct. Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk> Signed-off-by: Keith Packard <keithp@keithp.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_crt.c')
-rw-r--r--drivers/gpu/drm/i915/intel_crt.c17
1 files changed, 7 insertions, 10 deletions
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c
index d03fc05b39c0..2eb60cd47b33 100644
--- a/drivers/gpu/drm/i915/intel_crt.c
+++ b/drivers/gpu/drm/i915/intel_crt.c
@@ -305,13 +305,11 @@ static bool intel_crt_detect_ddc(struct drm_connector *connector)
305} 305}
306 306
307static enum drm_connector_status 307static enum drm_connector_status
308intel_crt_load_detect(struct drm_crtc *crtc, struct intel_crt *crt) 308intel_crt_load_detect(struct intel_crt *crt)
309{ 309{
310 struct drm_encoder *encoder = &crt->base.base; 310 struct drm_device *dev = crt->base.base.dev;
311 struct drm_device *dev = encoder->dev;
312 struct drm_i915_private *dev_priv = dev->dev_private; 311 struct drm_i915_private *dev_priv = dev->dev_private;
313 struct intel_crtc *intel_crtc = to_intel_crtc(crtc); 312 uint32_t pipe = to_intel_crtc(crt->base.base.crtc)->pipe;
314 uint32_t pipe = intel_crtc->pipe;
315 uint32_t save_bclrpat; 313 uint32_t save_bclrpat;
316 uint32_t save_vtotal; 314 uint32_t save_vtotal;
317 uint32_t vtotal, vactive; 315 uint32_t vtotal, vactive;
@@ -454,15 +452,14 @@ intel_crt_detect(struct drm_connector *connector, bool force)
454 /* for pre-945g platforms use load detect */ 452 /* for pre-945g platforms use load detect */
455 crtc = crt->base.base.crtc; 453 crtc = crt->base.base.crtc;
456 if (crtc && crtc->enabled) { 454 if (crtc && crtc->enabled) {
457 status = intel_crt_load_detect(crtc, crt); 455 status = intel_crt_load_detect(crt);
458 } else { 456 } else {
459 crtc = intel_get_load_detect_pipe(&crt->base, connector, 457 if (intel_get_load_detect_pipe(&crt->base, connector,
460 NULL, &dpms_mode); 458 NULL, &dpms_mode)) {
461 if (crtc) {
462 if (intel_crt_detect_ddc(connector)) 459 if (intel_crt_detect_ddc(connector))
463 status = connector_status_connected; 460 status = connector_status_connected;
464 else 461 else
465 status = intel_crt_load_detect(crtc, crt); 462 status = intel_crt_load_detect(crt);
466 intel_release_load_detect_pipe(&crt->base, 463 intel_release_load_detect_pipe(&crt->base,
467 connector, dpms_mode); 464 connector, dpms_mode);
468 } else 465 } else