X-Git-Url: https://git.cworth.org/git?a=blobdiff_plain;f=src%2Fexa%2Fi965%2Fsynchronous_composite%2F0001-Elminate-gettimeofday-as-a-hotspot-in-I830WaitLpRing.patch;fp=src%2Fexa%2Fi965%2Fsynchronous_composite%2F0001-Elminate-gettimeofday-as-a-hotspot-in-I830WaitLpRing.patch;h=98d4dec67367ce1e7bf1fa1cb1754d26ae73199d;hb=382a50b3aa2fc58cbeaa1a9974939b67d1ccd5f1;hp=0000000000000000000000000000000000000000;hpb=232c6811797d74870904f2112ac02cb9b25e72b0;p=cworth.org diff --git a/src/exa/i965/synchronous_composite/0001-Elminate-gettimeofday-as-a-hotspot-in-I830WaitLpRing.patch b/src/exa/i965/synchronous_composite/0001-Elminate-gettimeofday-as-a-hotspot-in-I830WaitLpRing.patch new file mode 100644 index 0000000..98d4dec --- /dev/null +++ b/src/exa/i965/synchronous_composite/0001-Elminate-gettimeofday-as-a-hotspot-in-I830WaitLpRing.patch @@ -0,0 +1,77 @@ +From e8c946cb56a9789ce707888a8198a8dd092cca85 Mon Sep 17 00:00:00 2001 +From: Carl Worth +Date: Tue, 10 Jul 2007 00:45:55 -0700 +Subject: [PATCH] Elminate gettimeofday as a hotspot in I830WaitLpRing + +--- + src/i830_accel.c | 47 ++++++++++++++++++++++++----------------------- + 1 files changed, 24 insertions(+), 23 deletions(-) + +diff --git a/src/i830_accel.c b/src/i830_accel.c +index 5cbad44..714af5a 100644 +--- a/src/i830_accel.c ++++ b/src/i830_accel.c +@@ -120,36 +120,37 @@ I830WaitLpRing(ScrnInfoPtr pScrn, int n, int timeout_millis) + ring->space += ring->mem->size; + + iters++; +- now = GetTimeInMillis(); +- if (start == 0 || now < start || ring->head != last_head) { +- if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) +- if (now > start) +- ErrorF("space: %d wanted %d\n", ring->space, n); +- start = now; +- last_head = ring->head; +- } else if (now - start > timeout_millis) { +- ErrorF("Error in I830WaitLpRing(), timeout for %d seconds\n", +- timeout_millis/1000); +- if (IS_I965G(pI830)) +- i965_dump_error_state(pScrn); +- else +- i830_dump_error_state(pScrn); +- ErrorF("space: %d wanted %d\n", ring->space, n); ++ if ((iters & 0xfff) == 0) { ++ now = GetTimeInMillis(); ++ if (start == 0 || now < start || ring->head != last_head) { ++ if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) ++ if (now > start) ++ ErrorF("space: %d wanted %d\n", ring->space, n); ++ start = now; ++ last_head = ring->head; ++ } else if (now - start > timeout_millis) { ++ ErrorF("Error in I830WaitLpRing(), timeout for %d seconds\n", ++ timeout_millis/1000); ++ if (IS_I965G(pI830)) ++ i965_dump_error_state(pScrn); ++ else ++ i830_dump_error_state(pScrn); ++ ErrorF("space: %d wanted %d\n", ring->space, n); + #ifdef XF86DRI +- if (pI830->directRenderingEnabled) { +- DRIUnlock(screenInfo.screens[pScrn->scrnIndex]); +- DRICloseScreen(screenInfo.screens[pScrn->scrnIndex]); +- } ++ if (pI830->directRenderingEnabled) { ++ DRIUnlock(screenInfo.screens[pScrn->scrnIndex]); ++ DRICloseScreen(screenInfo.screens[pScrn->scrnIndex]); ++ } + #endif + #ifdef I830_USE_XAA +- pI830->AccelInfoRec = NULL; /* Stops recursive behavior */ ++ pI830->AccelInfoRec = NULL; /* Stops recursive behavior */ + #endif + #ifdef I830_USE_EXA +- pI830->EXADriverPtr = NULL; ++ pI830->EXADriverPtr = NULL; + #endif +- FatalError("lockup\n"); ++ FatalError("lockup\n"); ++ } + } +- + DELAY(10); + } + +-- +1.5.2 +