diff options
author | Francisco Jerez <currojerez@riseup.net> | 2010-10-25 20:17:56 -0400 |
---|---|---|
committer | Ben Skeggs <bskeggs@redhat.com> | 2010-11-17 23:38:49 -0500 |
commit | 84b8081c2baf84b52ac9bf79f07edcea975ab0b5 (patch) | |
tree | 8cf6f9c6e6cea86869c7ac7826bf551459b7a2cb /drivers/gpu | |
parent | 63d6fd32889c46fa40cd1631fb2a0162187311ab (diff) |
drm/nouveau: Don't use load detection for connector polling.
Analog output polling makes GL programs jerky when pageflip is being
used because it's carried out with the mode_config mutex held.
Signed-off-by: Francisco Jerez <currojerez@riseup.net>
Signed-off-by: Ben Skeggs <bskeggs@redhat.com>
Diffstat (limited to 'drivers/gpu')
-rw-r--r-- | drivers/gpu/drm/nouveau/nouveau_connector.c | 25 |
1 files changed, 2 insertions, 23 deletions
diff --git a/drivers/gpu/drm/nouveau/nouveau_connector.c b/drivers/gpu/drm/nouveau/nouveau_connector.c index 1dd52dbfad46..52c356e9a3d1 100644 --- a/drivers/gpu/drm/nouveau/nouveau_connector.c +++ b/drivers/gpu/drm/nouveau/nouveau_connector.c | |||
@@ -213,24 +213,6 @@ nouveau_connector_set_encoder(struct drm_connector *connector, | |||
213 | } | 213 | } |
214 | } | 214 | } |
215 | 215 | ||
216 | static bool | ||
217 | nouveau_connector_poll_allowed(struct drm_connector *connector) | ||
218 | { | ||
219 | struct drm_device *dev = connector->dev; | ||
220 | struct drm_nouveau_private *dev_priv = dev->dev_private; | ||
221 | struct drm_crtc *crtc; | ||
222 | bool spare_crtc = false; | ||
223 | |||
224 | if (dev_priv->card_type >= NV_50) { | ||
225 | return true; | ||
226 | } else { | ||
227 | list_for_each_entry(crtc, &dev->mode_config.crtc_list, head) | ||
228 | spare_crtc |= !crtc->enabled; | ||
229 | |||
230 | return spare_crtc; | ||
231 | } | ||
232 | } | ||
233 | |||
234 | static enum drm_connector_status | 216 | static enum drm_connector_status |
235 | nouveau_connector_detect(struct drm_connector *connector, bool force) | 217 | nouveau_connector_detect(struct drm_connector *connector, bool force) |
236 | { | 218 | { |
@@ -299,8 +281,7 @@ detect_analog: | |||
299 | nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG); | 281 | nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG); |
300 | if (!nv_encoder && !nouveau_tv_disable) | 282 | if (!nv_encoder && !nouveau_tv_disable) |
301 | nv_encoder = find_encoder_by_type(connector, OUTPUT_TV); | 283 | nv_encoder = find_encoder_by_type(connector, OUTPUT_TV); |
302 | if (nv_encoder && | 284 | if (nv_encoder && force) { |
303 | (force || nouveau_connector_poll_allowed(connector))) { | ||
304 | struct drm_encoder *encoder = to_drm_encoder(nv_encoder); | 285 | struct drm_encoder *encoder = to_drm_encoder(nv_encoder); |
305 | struct drm_encoder_helper_funcs *helper = | 286 | struct drm_encoder_helper_funcs *helper = |
306 | encoder->helper_private; | 287 | encoder->helper_private; |
@@ -868,14 +849,12 @@ nouveau_connector_create(struct drm_device *dev, int index) | |||
868 | dev->mode_config.scaling_mode_property, | 849 | dev->mode_config.scaling_mode_property, |
869 | nv_connector->scaling_mode); | 850 | nv_connector->scaling_mode); |
870 | } | 851 | } |
852 | connector->polled = DRM_CONNECTOR_POLL_CONNECT; | ||
871 | /* fall-through */ | 853 | /* fall-through */ |
872 | case DCB_CONNECTOR_TV_0: | 854 | case DCB_CONNECTOR_TV_0: |
873 | case DCB_CONNECTOR_TV_1: | 855 | case DCB_CONNECTOR_TV_1: |
874 | case DCB_CONNECTOR_TV_3: | 856 | case DCB_CONNECTOR_TV_3: |
875 | nv_connector->scaling_mode = DRM_MODE_SCALE_NONE; | 857 | nv_connector->scaling_mode = DRM_MODE_SCALE_NONE; |
876 | |||
877 | if (nv_gf4_disp_arch(dev)) | ||
878 | connector->polled = DRM_CONNECTOR_POLL_CONNECT; | ||
879 | break; | 858 | break; |
880 | default: | 859 | default: |
881 | nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN; | 860 | nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN; |