diff options
Diffstat (limited to 'drivers/gpu/drm/i915/intel_crt.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_crt.c | 24 |
1 files changed, 11 insertions, 13 deletions
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index d03fc05b39c..e93f93cc7e7 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 | ||
307 | static enum drm_connector_status | 307 | static enum drm_connector_status |
308 | intel_crt_load_detect(struct drm_crtc *crtc, struct intel_crt *crt) | 308 | intel_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; |
@@ -432,7 +430,6 @@ intel_crt_detect(struct drm_connector *connector, bool force) | |||
432 | struct drm_device *dev = connector->dev; | 430 | struct drm_device *dev = connector->dev; |
433 | struct intel_crt *crt = intel_attached_crt(connector); | 431 | struct intel_crt *crt = intel_attached_crt(connector); |
434 | struct drm_crtc *crtc; | 432 | struct drm_crtc *crtc; |
435 | int dpms_mode; | ||
436 | enum drm_connector_status status; | 433 | enum drm_connector_status status; |
437 | 434 | ||
438 | if (I915_HAS_HOTPLUG(dev)) { | 435 | if (I915_HAS_HOTPLUG(dev)) { |
@@ -454,17 +451,18 @@ intel_crt_detect(struct drm_connector *connector, bool force) | |||
454 | /* for pre-945g platforms use load detect */ | 451 | /* for pre-945g platforms use load detect */ |
455 | crtc = crt->base.base.crtc; | 452 | crtc = crt->base.base.crtc; |
456 | if (crtc && crtc->enabled) { | 453 | if (crtc && crtc->enabled) { |
457 | status = intel_crt_load_detect(crtc, crt); | 454 | status = intel_crt_load_detect(crt); |
458 | } else { | 455 | } else { |
459 | crtc = intel_get_load_detect_pipe(&crt->base, connector, | 456 | struct intel_load_detect_pipe tmp; |
460 | NULL, &dpms_mode); | 457 | |
461 | if (crtc) { | 458 | if (intel_get_load_detect_pipe(&crt->base, connector, NULL, |
459 | &tmp)) { | ||
462 | if (intel_crt_detect_ddc(connector)) | 460 | if (intel_crt_detect_ddc(connector)) |
463 | status = connector_status_connected; | 461 | status = connector_status_connected; |
464 | else | 462 | else |
465 | status = intel_crt_load_detect(crtc, crt); | 463 | status = intel_crt_load_detect(crt); |
466 | intel_release_load_detect_pipe(&crt->base, | 464 | intel_release_load_detect_pipe(&crt->base, connector, |
467 | connector, dpms_mode); | 465 | &tmp); |
468 | } else | 466 | } else |
469 | status = connector_status_unknown; | 467 | status = connector_status_unknown; |
470 | } | 468 | } |