diff options
author | Eric Anholt <eric@anholt.net> | 2007-07-25 10:11:16 -0700 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2007-07-25 10:11:16 -0700 |
commit | 18c707a8c13ac5fffdd30d55e6f5926a68b367df (patch) | |
tree | 27e10e32ed902f033d76677cfb1d0b3ec1b15ae1 /src/i830_accel.c | |
parent | 45962eed51120ff77326c29d72cf8b6cd8a934b5 (diff) |
When TTM is available, use it instead of manual AGP allocations when possible.
This is a step towards being able to expose buffer objects through the screen
private to DRI clients, instead of having them have to use the fake buffer
object type.
This fails in two ways. First, the kernel memory manager is not currently
suitable for doing the physical allocations we need, so we still use AGP for
those. Additionally, the DRI lock can't be initialized early enough for us, so
these buffer object allocations fail. This will be fixed by improving the
DRM interface.
Diffstat (limited to 'src/i830_accel.c')
-rw-r--r-- | src/i830_accel.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/i830_accel.c b/src/i830_accel.c index 5cbad44e..4d9ea790 100644 --- a/src/i830_accel.c +++ b/src/i830_accel.c @@ -254,6 +254,12 @@ I830RefreshRing(ScrnInfoPtr pScrn) { I830Ptr pI830 = I830PTR(pScrn); + /* If we're reaching RefreshRing as a result of grabbing the DRI lock + * before we've set up the ringbuffer, don't bother. + */ + if (pI830->LpRing->mem == NULL) + return; + pI830->LpRing->head = INREG(LP_RING + RING_HEAD) & I830_HEAD_MASK; pI830->LpRing->tail = INREG(LP_RING + RING_TAIL); pI830->LpRing->space = pI830->LpRing->head - (pI830->LpRing->tail + 8); |