summaryrefslogtreecommitdiff
path: root/src/i830_exa.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-09-21 17:14:44 -0700
committerEric Anholt <eric@anholt.net>2007-09-21 17:20:15 -0700
commit130f79613bfe6a8cfa7f431c8cce06cbb93cc91a (patch)
treebb89c0b263d689a661d325ce8bf23794ea1f29c2 /src/i830_exa.c
parentb73235f40497cfb10792ba191d4f6eac3a5df009 (diff)
parent126031655c3c1db9881ad17d712461533eb59632 (diff)
Merge branch 'buffer-objects'
This branch changes i830_memory.c's allocator to use TTM when available to allocate memory, which also allows TTM to control almost the entire aperture. As a result, our front/back/depth buffers are created as real buffer objects, which may be used by the DRI driver instead of the fake buffer type in TTM. The updated DRM with bo_set_pin ioctl is required, to allow us to pin and unpin our buffers as needed.
Diffstat (limited to 'src/i830_exa.c')
-rw-r--r--src/i830_exa.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/src/i830_exa.c b/src/i830_exa.c
index 88503829..56bc15ef 100644
--- a/src/i830_exa.c
+++ b/src/i830_exa.c
@@ -482,9 +482,14 @@ I830EXAInit(ScreenPtr pScreen)
"performance may suffer\n");
#endif
pI830->EXADriverPtr->memoryBase = pI830->FbBase;
- pI830->EXADriverPtr->offScreenBase = pI830->exa_offscreen->offset;
- pI830->EXADriverPtr->memorySize = pI830->exa_offscreen->offset +
+ if (pI830->exa_offscreen) {
+ pI830->EXADriverPtr->offScreenBase = pI830->exa_offscreen->offset;
+ pI830->EXADriverPtr->memorySize = pI830->exa_offscreen->offset +
pI830->exa_offscreen->size;
+ } else {
+ pI830->EXADriverPtr->offScreenBase = pI830->FbMapSize;
+ pI830->EXADriverPtr->memorySize = pI830->FbMapSize;
+ }
pI830->EXADriverPtr->flags = EXA_OFFSCREEN_PIXMAPS;
DPRINTF(PFX, "EXA Mem: memoryBase 0x%x, end 0x%x, offscreen base 0x%x, "