summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2008-12-17 16:37:28 +0100
committerLuc Verhaegen <libv@skynet.be>2008-12-29 19:53:45 +0100
commit07cd91b6f11b2b616dcb4fc297b20b51e3c498a5 (patch)
treeb2781cc161057664b1185bb40d566c6463bdcef0
parent83fca4e4d11917d5fb7e37074ccfc8ee329852f4 (diff)
Accel: Stop syncing when no acceleration is enabled.
This stops a huge slowdown when engine is not initialised properly. Warns very verbosely so that callers can eventually be fixed.
-rw-r--r--src/via_accel.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/via_accel.c b/src/via_accel.c
index f52875d..4abb843 100644
--- a/src/via_accel.c
+++ b/src/via_accel.c
@@ -665,6 +665,12 @@ VIAAccelSync(ScrnInfoPtr pScrn)
VIAPtr pVia = VIAPTR(pScrn);
int loop = 0;
+ if (!pVia->AccelInfoRec) {
+ xf86DrvMsg(pScrn->scrnIndex, X_WARNING,
+ "%s: Called without Accel enabled.\n", __func__);
+ return;
+ }
+
mem_barrier();
while (!(VIAGETREG(VIA_REG_STATUS) & VIA_VR_QUEUE_BUSY) && (loop++ < MAXLOOP))