i915: Fix SDVO potentially turning off randomly
authorGuillaume Clement <gclement@baobob.org>
Sat, 10 Aug 2013 19:57:57 +0000 (21:57 +0200)
committerDaniel Vetter <daniel.vetter@ffwll.ch>
Thu, 22 Aug 2013 11:31:36 +0000 (13:31 +0200)
Some Poulsbo cards seem to incorrectly report
SDVO_CMD_STATUS_TARGET_NOT_SPECIFIED instead of
SDVO_CMD_STATUS_PENDING, which causes the display to be turned off.

This could also happen to i915.

Signed-off-by: Guillaume Clement <gclement@baobob.org>
Signed-off-by: Daniel Vetter <daniel.vetter@ffwll.ch>
drivers/gpu/drm/i915/intel_sdvo.c

index 02f220b4e4a114acdff7d0a6e765400736d76ccc..317e058fb3cf1205563c3a57079ae99e4bc0d3dc 100644 (file)
@@ -538,7 +538,8 @@ static bool intel_sdvo_read_response(struct intel_sdvo *intel_sdvo,
                                  &status))
                goto log_fail;
 
-       while (status == SDVO_CMD_STATUS_PENDING && --retry) {
+       while ((status == SDVO_CMD_STATUS_PENDING ||
+                       status == SDVO_CMD_STATUS_TARGET_NOT_SPECIFIED) && --retry) {
                if (retry < 10)
                        msleep(15);
                else