diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2010-09-09 18:51:02 -0400 |
---|---|---|
committer | Dave Airlie <airlied@redhat.com> | 2010-09-13 06:29:11 -0400 |
commit | 7b334fcb45b757ffb093696ca3de1b0c8b4a33f1 (patch) | |
tree | fe56259639b9f1c993d742e27468087c46e51f05 /drivers/gpu/drm/i915/intel_crt.c | |
parent | 27849044ca6ff9c52f63271b511282acf6d1c251 (diff) |
drm: Use a nondestructive mode for output detect when polling
Destructive load-detection is very expensive and due to failings
elsewhere can trigger system wide stalls of up to 600ms. A simple
first step to correcting this is not to invoke such an expensive
and destructive load-detection operation automatically.
Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=29536
Bugzilla: https://bugzilla.kernel.org/show_bug.cgi?id=16265
Reported-by: Bruno Prémont <bonbons@linux-vserver.org>
Tested-by: Sitsofe Wheeler <sitsofe@yahoo.com>
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Cc: stable@kernel.org
Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/i915/intel_crt.c')
-rw-r--r-- | drivers/gpu/drm/i915/intel_crt.c | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/drivers/gpu/drm/i915/intel_crt.c b/drivers/gpu/drm/i915/intel_crt.c index 4b7735196cd5..0350e5d711f8 100644 --- a/drivers/gpu/drm/i915/intel_crt.c +++ b/drivers/gpu/drm/i915/intel_crt.c | |||
@@ -400,7 +400,9 @@ intel_crt_load_detect(struct drm_crtc *crtc, struct intel_encoder *intel_encoder | |||
400 | return status; | 400 | return status; |
401 | } | 401 | } |
402 | 402 | ||
403 | static enum drm_connector_status intel_crt_detect(struct drm_connector *connector) | 403 | static enum drm_connector_status |
404 | intel_crt_detect(struct drm_connector *connector, | ||
405 | bool nondestructive) | ||
404 | { | 406 | { |
405 | struct drm_device *dev = connector->dev; | 407 | struct drm_device *dev = connector->dev; |
406 | struct drm_encoder *encoder = intel_attached_encoder(connector); | 408 | struct drm_encoder *encoder = intel_attached_encoder(connector); |
@@ -419,6 +421,9 @@ static enum drm_connector_status intel_crt_detect(struct drm_connector *connecto | |||
419 | if (intel_crt_detect_ddc(encoder)) | 421 | if (intel_crt_detect_ddc(encoder)) |
420 | return connector_status_connected; | 422 | return connector_status_connected; |
421 | 423 | ||
424 | if (nondestructive) | ||
425 | return connector->status; | ||
426 | |||
422 | /* for pre-945g platforms use load detect */ | 427 | /* for pre-945g platforms use load detect */ |
423 | if (encoder->crtc && encoder->crtc->enabled) { | 428 | if (encoder->crtc && encoder->crtc->enabled) { |
424 | status = intel_crt_load_detect(encoder->crtc, intel_encoder); | 429 | status = intel_crt_load_detect(encoder->crtc, intel_encoder); |