Refuse to allocate LIFETIME_FIXED objects in buffer objects.

We can't guarantee the offset will stay the same using the current DRM
interface, but the correct solution is fixing our code to allow these objects
to move.  Breaks TTM mode of the DRI driver for now.
This commit is contained in:
Eric Anholt 2007-10-05 11:51:55 -07:00
parent 0de747f7d2
commit 8fc4e30782
1 changed files with 3 additions and 1 deletions

View File

@ -758,7 +758,9 @@ i830_allocate_memory(ScrnInfoPtr pScrn, const char *name,
I830Ptr pI830 = I830PTR(pScrn);
i830_memory *mem;
if (pI830->memory_manager && !(flags & NEED_PHYSICAL_ADDR)) {
if (pI830->memory_manager && !(flags & NEED_PHYSICAL_ADDR) &&
!(flags & NEED_LIFETIME_FIXED))
{
return i830_allocate_memory_bo(pScrn, name, size, alignment, flags);
} else {
mem = i830_allocate_aperture(pScrn, name, size, alignment, flags);