OSDN Git Service

DRM: Don't re-poll connector for disconnect
authorJosef Holzmayr <holzmayr@rsi-elektrotechnik.de>
Thu, 16 Apr 2015 12:16:29 +0000 (14:16 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Mon, 20 Apr 2015 16:38:58 +0000 (09:38 -0700)
DRM probe should not repoll a connector if it is already
connected and the DRM_CONNECTOR_POLL_DISCONNECT flag is not set.

Signed-off-by: Josef Holzmayr <holzmayr@rsi-elektrotechnik.de>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/drm_probe_helper.c

index d44437f..2fb2fbe 100644 (file)
@@ -322,8 +322,6 @@ static void output_poll_execute(struct work_struct *work)
                if (!connector->polled || connector->polled == DRM_CONNECTOR_POLL_HPD)
                        continue;
 
-               repoll = true;
-
                old_status = connector->status;
                /* if we are connected and don't want to poll for disconnect
                   skip it */
@@ -331,6 +329,8 @@ static void output_poll_execute(struct work_struct *work)
                    !(connector->polled & DRM_CONNECTOR_POLL_DISCONNECT))
                        continue;
 
+               repoll = true;
+
                connector->status = connector->funcs->detect(connector, false);
                if (old_status != connector->status) {
                        const char *old, *new;