aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/drm_crtc_helper.c
diff options
context:
space:
mode:
authorDaniel Vetter <daniel.vetter@ffwll.ch>2012-10-24 09:35:50 -0400
committerDave Airlie <airlied@redhat.com>2012-11-20 01:06:42 -0500
commita4f968d8e50cb7810e08ebb9bf4c8f2b769fdac7 (patch)
treec61adfd3be0ec10b9487883d84ca022e71df6f25 /drivers/gpu/drm/drm_crtc_helper.c
parent9499c82da27cf4ce7e919fc26bd26187a71fe664 (diff)
drm: don't unnecessarily enable the polling work
... by properly checking connector->polled. This doesn't matter too much because the polling work itself gets this slightly more right and doesn't set repoll if there's nothing to do. But we can do better. v2: Chris Wilson noticed that I broke polling, since repoll will never ever be set true. Fix this up, and simplify the logic a bit while at it. Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch> Signed-off-by: Dave Airlie <airlied@redhat.com>
Diffstat (limited to 'drivers/gpu/drm/drm_crtc_helper.c')
-rw-r--r--drivers/gpu/drm/drm_crtc_helper.c6
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/gpu/drm/drm_crtc_helper.c b/drivers/gpu/drm/drm_crtc_helper.c
index 6437bb9ed81c..1fe719fb32e8 100644
--- a/drivers/gpu/drm/drm_crtc_helper.c
+++ b/drivers/gpu/drm/drm_crtc_helper.c
@@ -974,8 +974,7 @@ static void output_poll_execute(struct work_struct *work)
974 if (!connector->polled || connector->polled == DRM_CONNECTOR_POLL_HPD) 974 if (!connector->polled || connector->polled == DRM_CONNECTOR_POLL_HPD)
975 continue; 975 continue;
976 976
977 else if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT)) 977 repoll = true;
978 repoll = true;
979 978
980 old_status = connector->status; 979 old_status = connector->status;
981 /* if we are connected and don't want to poll for disconnect 980 /* if we are connected and don't want to poll for disconnect
@@ -1019,7 +1018,8 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
1019 return; 1018 return;
1020 1019
1021 list_for_each_entry(connector, &dev->mode_config.connector_list, head) { 1020 list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
1022 if (connector->polled) 1021 if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT |
1022 DRM_CONNECTOR_POLL_DISCONNECT))
1023 poll = true; 1023 poll = true;
1024 } 1024 }
1025 1025