diff options
author | Daniel Stone <daniel@fooishbar.org> | 2004-12-04 22:24:06 +0000 |
---|---|---|
committer | Daniel Stone <daniel@fooishbar.org> | 2004-12-04 22:24:06 +0000 |
commit | 4706dfb7804a46e3cc5aafc3644f5a1134ab3d19 (patch) | |
tree | dff37e9184d6b449a328e606990e900fd98c8ee3 /src | |
parent | bce508a288d6b95708dbbfc6b235e2d95b6b96ad (diff) |
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.
Diffstat (limited to 'src')
-rw-r--r-- | src/r128_accel.c | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/src/r128_accel.c b/src/r128_accel.c index 90c5cb5f..ded73d5a 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 */ |