CHROMIUM: drm/anx7808: anx7808 disconnect handling
authorJeremy Thorpe <jeremyt@chromium.org>
Wed, 15 May 2013 16:00:16 +0000 (09:00 -0700)
committerChromeBot <chrome-bot@google.com>
Wed, 15 May 2013 19:12:21 +0000 (12:12 -0700)
Currently, if the analogix dongle is disconnected during setup, the setup
function will get stuck.  Handle this by checking for polling error even during
connection process.

BUG=chrome-os-partner:19436
TEST=Plug in a MyDP dongle without connecting to any monitor, then disconnect.
Following that, plug in with connection to monitor.  See that connection is
established.

Change-Id: Ib531547b744d9bd8d07b933448fefc7af6158c4e
Signed-off-by: Jeremy Thorpe <jeremyt@chromium.org>
Reviewed-on: https://gerrit.chromium.org/gerrit/51301
Reviewed-by: Stéphane Marchesin <marcheu@chromium.org>
drivers/gpu/drm/bridge/anx7808.c

index f2b08c9..b715390 100644 (file)
@@ -523,12 +523,10 @@ static void anx7808_play_video(struct work_struct *work)
                }
 
                /* Check for failures */
-               if (state == STATE_PLAY) {
-                       ret = anx7808_check_polling_err(anx7808);
-                       if (ret) {
-                               DRM_INFO("Polling error: %02x", ret);
-                               state = STATE_INIT;
-                       }
+               ret = anx7808_check_polling_err(anx7808);
+               if (ret) {
+                       DRM_INFO("Polling error: %02x", ret);
+                       state = STATE_INIT;
                }
 
                msleep(300);