Commit a4f968d8 authored by Daniel Vetter's avatar Daniel Vetter Committed by Dave Airlie

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: default avatarDaniel Vetter <daniel.vetter@ffwll.ch>
Signed-off-by: default avatarDave Airlie <airlied@redhat.com>
parent 9499c82d
...@@ -974,7 +974,6 @@ static void output_poll_execute(struct work_struct *work) ...@@ -974,7 +974,6 @@ static void output_poll_execute(struct work_struct *work)
if (!connector->polled || connector->polled == DRM_CONNECTOR_POLL_HPD) if (!connector->polled || connector->polled == DRM_CONNECTOR_POLL_HPD)
continue; continue;
else if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT | DRM_CONNECTOR_POLL_DISCONNECT))
repoll = true; repoll = true;
old_status = connector->status; old_status = connector->status;
...@@ -1019,7 +1018,8 @@ void drm_kms_helper_poll_enable(struct drm_device *dev) ...@@ -1019,7 +1018,8 @@ void drm_kms_helper_poll_enable(struct drm_device *dev)
return; return;
list_for_each_entry(connector, &dev->mode_config.connector_list, head) { list_for_each_entry(connector, &dev->mode_config.connector_list, head) {
if (connector->polled) if (connector->polled & (DRM_CONNECTOR_POLL_CONNECT |
DRM_CONNECTOR_POLL_DISCONNECT))
poll = true; poll = true;
} }
......
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