Commit 84b8081c authored by Francisco Jerez's avatar Francisco Jerez Committed by Ben Skeggs

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: default avatarFrancisco Jerez <currojerez@riseup.net>
Signed-off-by: default avatarBen Skeggs <bskeggs@redhat.com>
parent 63d6fd32
...@@ -213,24 +213,6 @@ nouveau_connector_set_encoder(struct drm_connector *connector, ...@@ -213,24 +213,6 @@ nouveau_connector_set_encoder(struct drm_connector *connector,
} }
} }
static bool
nouveau_connector_poll_allowed(struct drm_connector *connector)
{
struct drm_device *dev = connector->dev;
struct drm_nouveau_private *dev_priv = dev->dev_private;
struct drm_crtc *crtc;
bool spare_crtc = false;
if (dev_priv->card_type >= NV_50) {
return true;
} else {
list_for_each_entry(crtc, &dev->mode_config.crtc_list, head)
spare_crtc |= !crtc->enabled;
return spare_crtc;
}
}
static enum drm_connector_status static enum drm_connector_status
nouveau_connector_detect(struct drm_connector *connector, bool force) nouveau_connector_detect(struct drm_connector *connector, bool force)
{ {
...@@ -299,8 +281,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force) ...@@ -299,8 +281,7 @@ nouveau_connector_detect(struct drm_connector *connector, bool force)
nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG); nv_encoder = find_encoder_by_type(connector, OUTPUT_ANALOG);
if (!nv_encoder && !nouveau_tv_disable) if (!nv_encoder && !nouveau_tv_disable)
nv_encoder = find_encoder_by_type(connector, OUTPUT_TV); nv_encoder = find_encoder_by_type(connector, OUTPUT_TV);
if (nv_encoder && if (nv_encoder && force) {
(force || nouveau_connector_poll_allowed(connector))) {
struct drm_encoder *encoder = to_drm_encoder(nv_encoder); struct drm_encoder *encoder = to_drm_encoder(nv_encoder);
struct drm_encoder_helper_funcs *helper = struct drm_encoder_helper_funcs *helper =
encoder->helper_private; encoder->helper_private;
...@@ -868,14 +849,12 @@ nouveau_connector_create(struct drm_device *dev, int index) ...@@ -868,14 +849,12 @@ nouveau_connector_create(struct drm_device *dev, int index)
dev->mode_config.scaling_mode_property, dev->mode_config.scaling_mode_property,
nv_connector->scaling_mode); nv_connector->scaling_mode);
} }
connector->polled = DRM_CONNECTOR_POLL_CONNECT;
/* fall-through */ /* fall-through */
case DCB_CONNECTOR_TV_0: case DCB_CONNECTOR_TV_0:
case DCB_CONNECTOR_TV_1: case DCB_CONNECTOR_TV_1:
case DCB_CONNECTOR_TV_3: case DCB_CONNECTOR_TV_3:
nv_connector->scaling_mode = DRM_MODE_SCALE_NONE; nv_connector->scaling_mode = DRM_MODE_SCALE_NONE;
if (nv_gf4_disp_arch(dev))
connector->polled = DRM_CONNECTOR_POLL_CONNECT;
break; break;
default: default:
nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN; nv_connector->scaling_mode = DRM_MODE_SCALE_FULLSCREEN;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment