summaryrefslogtreecommitdiff
path: root/src/i830_memory.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-10-11 10:36:01 -0700
committerEric Anholt <eric@anholt.net>2007-10-11 12:17:14 -0700
commit0de747f7d219a56434dad49a8a6d1d9d4c251ca7 (patch)
treee8761df1e21ff54b5bd592e75783027de531b9cf /src/i830_memory.c
parent0040bb95445e800af80ca9fa1b92f5db33f1b4ac (diff)
In i830_allocate_memory_bo, bind if we control the VT, not on lifetime-fixed.
Diffstat (limited to 'src/i830_memory.c')
-rw-r--r--src/i830_memory.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c
index cdb7c47d..85a78f56 100644
--- a/src/i830_memory.c
+++ b/src/i830_memory.c
@@ -709,14 +709,17 @@ i830_allocate_memory_bo(ScrnInfoPtr pScrn, const char *name,
mem->offset = -1;
mem->end = -1;
mem->size = size;
- if (flags & NEED_LIFETIME_FIXED) {
+ if (flags & NEED_LIFETIME_FIXED)
+ mem->lifetime_fixed_offset = TRUE;
+
+ /* Bind it if we currently control the VT */
+ if (pScrn->vtSema) {
if (!i830_bind_memory(pScrn, mem)) {
drmBOUnReference(pI830->drmSubFD, &mem->bo);
xfree(mem->name);
xfree(mem);
return NULL;
}
- mem->lifetime_fixed_offset = TRUE;
}
/* Insert new allocation into the list */