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/radeon | |
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/radeon')
-rw-r--r-- | drivers/gpu/drm/radeon/radeon_connectors.c | 20 |
1 files changed, 15 insertions, 5 deletions
diff --git a/drivers/gpu/drm/radeon/radeon_connectors.c b/drivers/gpu/drm/radeon/radeon_connectors.c index a9dd7847d96e..31d309a8e75b 100644 --- a/drivers/gpu/drm/radeon/radeon_connectors.c +++ b/drivers/gpu/drm/radeon/radeon_connectors.c | |||
@@ -481,7 +481,9 @@ static int radeon_lvds_mode_valid(struct drm_connector *connector, | |||
481 | return MODE_OK; | 481 | return MODE_OK; |
482 | } | 482 | } |
483 | 483 | ||
484 | static enum drm_connector_status radeon_lvds_detect(struct drm_connector *connector) | 484 | static enum drm_connector_status |
485 | radeon_lvds_detect(struct drm_connector *connector, | ||
486 | bool nondestructive) | ||
485 | { | 487 | { |
486 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); | 488 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
487 | struct drm_encoder *encoder = radeon_best_single_encoder(connector); | 489 | struct drm_encoder *encoder = radeon_best_single_encoder(connector); |
@@ -594,7 +596,9 @@ static int radeon_vga_mode_valid(struct drm_connector *connector, | |||
594 | return MODE_OK; | 596 | return MODE_OK; |
595 | } | 597 | } |
596 | 598 | ||
597 | static enum drm_connector_status radeon_vga_detect(struct drm_connector *connector) | 599 | static enum drm_connector_status |
600 | radeon_vga_detect(struct drm_connector *connector, | ||
601 | bool nondestructive) | ||
598 | { | 602 | { |
599 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); | 603 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
600 | struct drm_encoder *encoder; | 604 | struct drm_encoder *encoder; |
@@ -691,7 +695,9 @@ static int radeon_tv_mode_valid(struct drm_connector *connector, | |||
691 | return MODE_OK; | 695 | return MODE_OK; |
692 | } | 696 | } |
693 | 697 | ||
694 | static enum drm_connector_status radeon_tv_detect(struct drm_connector *connector) | 698 | static enum drm_connector_status |
699 | radeon_tv_detect(struct drm_connector *connector, | ||
700 | bool nondestructive) | ||
695 | { | 701 | { |
696 | struct drm_encoder *encoder; | 702 | struct drm_encoder *encoder; |
697 | struct drm_encoder_helper_funcs *encoder_funcs; | 703 | struct drm_encoder_helper_funcs *encoder_funcs; |
@@ -748,7 +754,9 @@ static int radeon_dvi_get_modes(struct drm_connector *connector) | |||
748 | * we have to check if this analog encoder is shared with anyone else (TV) | 754 | * we have to check if this analog encoder is shared with anyone else (TV) |
749 | * if its shared we have to set the other connector to disconnected. | 755 | * if its shared we have to set the other connector to disconnected. |
750 | */ | 756 | */ |
751 | static enum drm_connector_status radeon_dvi_detect(struct drm_connector *connector) | 757 | static enum drm_connector_status |
758 | radeon_dvi_detect(struct drm_connector *connector, | ||
759 | bool nondestructive) | ||
752 | { | 760 | { |
753 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); | 761 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
754 | struct drm_encoder *encoder = NULL; | 762 | struct drm_encoder *encoder = NULL; |
@@ -972,7 +980,9 @@ static int radeon_dp_get_modes(struct drm_connector *connector) | |||
972 | return ret; | 980 | return ret; |
973 | } | 981 | } |
974 | 982 | ||
975 | static enum drm_connector_status radeon_dp_detect(struct drm_connector *connector) | 983 | static enum drm_connector_status |
984 | radeon_dp_detect(struct drm_connector *connector, | ||
985 | bool nondestructive) | ||
976 | { | 986 | { |
977 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); | 987 | struct radeon_connector *radeon_connector = to_radeon_connector(connector); |
978 | enum drm_connector_status ret = connector_status_disconnected; | 988 | enum drm_connector_status ret = connector_status_disconnected; |