summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-10-05 11:51:55 -0700
committerEric Anholt <eric@anholt.net>2007-10-11 12:17:14 -0700
commit8fc4e3078210f726c7c375faa2f2fd8d05017c09 (patch)
treefdab5f4847469aeabe5da633a03f97d1255f04b0
parent0de747f7d219a56434dad49a8a6d1d9d4c251ca7 (diff)
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.
-rw-r--r--src/i830_memory.c4
1 files changed, 3 insertions, 1 deletions
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);