summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRoland Mainz <roland.mainz@nrubsig.org>2004-12-15 09:22:02 +0000
committerRoland Mainz <roland.mainz@nrubsig.org>2004-12-15 09:22:02 +0000
commitfa678e04f57b615f7507b5dd160ce1b32c877aa5 (patch)
tree8978640daeabc6da14ef53b2229027ff0f269380
parentdedca6594250056cc5a4fef74e715fc229602619 (diff)
Bug #1889 (https://bugs.freedesktop.org/show_bug.cgi?id=1889) attachment
#1330 (https://bugs.freedesktop.org/attachment.cgi?id=1330): Retry CCE idle commands until the (higher) timeout is reached, and properly stop the engine if we totally fail -- gets rid of serious performance issues and lockups with r128 DRI (see also Debian bug reports #223089, #236187, #236373, #243436). Patch by Daniel Jacobowitz.
-rw-r--r--src/r128_accel.c8
1 files changed, 7 insertions, 1 deletions
diff --git a/src/r128_accel.c b/src/r128_accel.c
index 90c5cb5..ded73d5 100644
--- a/src/r128_accel.c
+++ b/src/r128_accel.c
@@ -237,17 +237,23 @@ void R128CCEWaitForIdle(ScrnInfoPtr pScrn)
i = 0;
do {
ret = drmCommandNone(info->drmFD, DRM_R128_CCE_IDLE);
- } while ( ret && errno == EBUSY && i++ < R128_IDLE_RETRY );
+ } while ( ret && errno == EBUSY && i++ < (R128_IDLE_RETRY * R128_IDLE_RETRY) );
if (ret && ret != -EBUSY) {
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"%s: CCE idle %d\n", __FUNCTION__, ret);
}
+ if (i > R128_IDLE_RETRY) {
+ xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
+ "%s: (DEBUG) CCE idle took i = %d\n", __FUNCTION__, i);
+ }
+
if (ret == 0) return;
xf86DrvMsg(pScrn->scrnIndex, X_ERROR,
"Idle timed out, resetting engine...\n");
+ R128CCE_STOP(pScrn, info);
R128EngineReset(pScrn);
/* Always restart the engine when doing CCE 2D acceleration */