From 94b208d9e7d85e58d0a4c7803ba2c2a72ed73dd3 Mon Sep 17 00:00:00 2001 From: "Owain G. Ainsworth" Date: Mon, 31 May 2010 18:40:48 +0100 Subject: Remove all code that pretends to work if we lack drm and gem. It doesn't work, and just adds extra complexity for no real gain by this point. --- src/i830_accel.c | 69 -------------------------------------------------------- 1 file changed, 69 deletions(-) (limited to 'src/i830_accel.c') diff --git a/src/i830_accel.c b/src/i830_accel.c index 0b9195f3..74808fd8 100644 --- a/src/i830_accel.c +++ b/src/i830_accel.c @@ -46,80 +46,11 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. #include "i830_ring.h" #include "i915_drm.h" -unsigned long intel_get_pixmap_offset(PixmapPtr pixmap) -{ - ScreenPtr pScreen = pixmap->drawable.pScreen; - ScrnInfoPtr scrn = xf86Screens[pScreen->myNum]; - intel_screen_private *intel = intel_get_screen_private(scrn); - - return (unsigned long)pixmap->devPrivate.ptr - - (unsigned long)intel->FbBase; -} - unsigned long intel_get_pixmap_pitch(PixmapPtr pixmap) { return (unsigned long)pixmap->devKind; } -int -I830WaitLpRing(ScrnInfoPtr scrn, int n, int timeout_millis) -{ - intel_screen_private *intel = intel_get_screen_private(scrn); - I830RingBuffer *ring = &intel->ring; - int iters = 0; - unsigned int start = 0; - unsigned int now = 0; - int last_head = 0; - unsigned int first = 0; - - /* If your system hasn't moved the head pointer in 2 seconds, I'm going to - * call it crashed. - */ - if (timeout_millis == 0) - timeout_millis = 2000; - - if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) { - ErrorF("I830WaitLpRing %d\n", n); - first = GetTimeInMillis(); - } - - while (ring->space < n) { - ring->head = INREG(LP_RING + RING_HEAD) & I830_HEAD_MASK; - ring->space = ring->head - (ring->tail + 8); - - if (ring->space < 0) - 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); - ErrorF("space: %d wanted %d\n", ring->space, n); - intel->uxa_driver = NULL; - FatalError("lockup\n"); - } - - DELAY(10); - } - - if (I810_DEBUG & DEBUG_VERBOSE_ACCEL) { - now = GetTimeInMillis(); - if (now - first) { - ErrorF("Elapsed %u ms\n", now - first); - ErrorF("space: %d wanted %d\n", ring->space, n); - } - } - - return iters; -} - void i830_debug_flush(ScrnInfoPtr scrn) { intel_screen_private *intel = intel_get_screen_private(scrn); -- cgit v1.2.3 From e54b989fe98325338ef6601db21d5b1f7875eeb2 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Mon, 21 Jun 2010 21:45:04 +0100 Subject: Emit the flush after a potential draw from the BlockHandler. As the batch submit may not trigger further drawing through flushing the vertices, pass the requirement to emit the flush down to the submission routine so that the flush can be appended after the final commands. Signed-off-by: Chris Wilson (cherry picked from c942585098ac84ae461821cbb8f52dedce7a0da1) Signed-off-by: Owain G. Ainsworth --- src/i830_accel.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/i830_accel.c') diff --git a/src/i830_accel.c b/src/i830_accel.c index 74808fd8..df4f58db 100644 --- a/src/i830_accel.c +++ b/src/i830_accel.c @@ -59,7 +59,7 @@ void i830_debug_flush(ScrnInfoPtr scrn) intel_batch_emit_flush(scrn); if (intel->debug_flush & DEBUG_FLUSH_BATCHES) - intel_batch_submit(scrn); + intel_batch_submit(scrn, FALSE); } /* The following function sets up the supported acceleration. Call it -- cgit v1.2.3