diff mbox

i915: Fix SDVO potentially turning off randomly

Message ID 1376164677-7323-1-git-send-email-gclement@baobob.org (mailing list archive)
State New, archived
Headers show

Commit Message

Guillaume Clement Aug. 10, 2013, 7:57 p.m. UTC
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>
---
 drivers/gpu/drm/i915/intel_sdvo.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

Daniel Vetter Aug. 11, 2013, 9:46 a.m. UTC | #1
On Sat, Aug 10, 2013 at 09:57:57PM +0200, Guillaume Clement wrote:
> 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>
Queued for -next, thanks for the patch. Let's see whether we're lucky and
this fixes something ;-)
-Daniel
diff mbox

Patch

diff --git a/drivers/gpu/drm/i915/intel_sdvo.c b/drivers/gpu/drm/i915/intel_sdvo.c
index 798df11..a5a2192 100644
--- a/drivers/gpu/drm/i915/intel_sdvo.c
+++ b/drivers/gpu/drm/i915/intel_sdvo.c
@@ -539,7 +539,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