[PATCH] uxa: fix getmsc to not fail hard

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



From: Dave Airlie <airlied@xxxxxxxxxx>

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.

Signed-off-by: Dave Airlie <airlied@xxxxxxxxxx>
---
 src/uxa/intel_dri.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/src/uxa/intel_dri.c b/src/uxa/intel_dri.c
index 0370034..5d1262a 100644
--- a/src/uxa/intel_dri.c
+++ b/src/uxa/intel_dri.c
@@ -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;
-- 
1.9.0

_______________________________________________
Intel-gfx mailing list
Intel-gfx@xxxxxxxxxxxxxxxxxxxxx
http://lists.freedesktop.org/mailman/listinfo/intel-gfx




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]
  Powered by Linux