From: Jeremy Thorpe Date: Wed, 15 May 2013 16:00:16 +0000 (-0700) Subject: CHROMIUM: drm/anx7808: anx7808 disconnect handling X-Git-Url: http://git.cascardo.eti.br/?p=cascardo%2Flinux.git;a=commitdiff_plain;h=62511a7568539066439a1bdab7e575dbf6ea38ec CHROMIUM: drm/anx7808: anx7808 disconnect handling 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 Reviewed-on: https://gerrit.chromium.org/gerrit/51301 Reviewed-by: Stéphane Marchesin --- diff --git a/drivers/gpu/drm/bridge/anx7808.c b/drivers/gpu/drm/bridge/anx7808.c index f2b08c9d4974..b71539054b75 100644 --- a/drivers/gpu/drm/bridge/anx7808.c +++ b/drivers/gpu/drm/bridge/anx7808.c @@ -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);