Skip to contentSkip to conversation

uxa: fix getmsc to not fail hard

PATCH In review Dave Airlie 2 participants 2 messages May 21, 2014

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 uxa: fix getmsc to not fail hard

From: Dave Airlie <[email protected]>

If some outputs go away we race with this call and apps get X errors and fall over. Do what SNA does and don't bother trying.

---
 src/uxa/intel_dri.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
src/uxa/intel_dri.c +2 -1
index 0370034..5d1262a 100644
@@ -1351,6 +1351,7 @@ I830DRI2GetMSC(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
 
 	/* Drawable not displayed, make up a *monotonic* value */
 	if (pipe == -1) {
+fail:
 		*ust = gettime_us();
 		*msc = 0;
 		return TRUE;
@@ -1369,7 +1370,7 @@ I830DRI2GetMSC(DrawablePtr draw, CARD64 *ust, CARD64 *msc)
 				   strerror(errno));
 			limit--;
 		}
-		return FALSE;
+		goto fail;
 	}
 
 	*ust = ((CARD64)vbl.reply.tval_sec * 1000000) + vbl.reply.tval_usec;
Signature · 1 line
1.9.0
#1 lore raw
Quoted 5 lines · Dave Airlie

From: Dave Airlie <[email protected]>

If some outputs go away we race with this call and apps get X errors and fall over. Do what SNA does and don't bother trying.

Horrible clients is why I gave up trying to report BadMatch for the inactive pipe. Though it has been a long time since the kernel turned off CRTCs without intervention from userspace.

This is a useful safeguard, though it angers the OML sync proponents. Pushed, thanks.
-Chris

Signature · 1 line
Chris Wilson, Intel Open Source Technology Centre