From 8fc4e3078210f726c7c375faa2f2fd8d05017c09 Mon Sep 17 00:00:00 2001 From: Eric Anholt Date: Fri, 5 Oct 2007 11:51:55 -0700 Subject: [PATCH] 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. --- src/i830_memory.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/i830_memory.c b/src/i830_memory.c index 85a78f56..2ff1a0c2 100644 --- a/src/i830_memory.c +++ b/src/i830_memory.c @@ -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);