summaryrefslogtreecommitdiff
path: root/src/i830_video.c
diff options
context:
space:
mode:
authorEric Anholt <eric@anholt.net>2007-01-25 15:31:22 -0800
committerEric Anholt <eric@anholt.net>2007-01-25 15:31:22 -0800
commit5c1e27cdd243dc24dd2bfdeb46d757bbef6ba6af (patch)
tree7f5fe9402e38f5f902c6336a3819cb690ce70a73 /src/i830_video.c
parent83cc4601b27d871484a2408f31154e9387064b9e (diff)
Make rotated shadow buffer allocation dynamic.
For EXA, this requires version 2.1 of EXA to do rotation, as the VT switching issues were too complicated otherwise.
Diffstat (limited to 'src/i830_video.c')
-rw-r--r--src/i830_video.c22
1 files changed, 3 insertions, 19 deletions
diff --git a/src/i830_video.c b/src/i830_video.c
index 79f5a7c8..22f5bee4 100644
--- a/src/i830_video.c
+++ b/src/i830_video.c
@@ -2073,8 +2073,6 @@ I830AllocateMemory(ScrnInfoPtr pScrn, struct linear_alloc *linear, int size,
#endif /* I830_USE_EXA */
#ifdef I830_USE_XAA
if (!pI830->useEXA) {
- int max_size;
-
/* Converts an offset from XAA's linear allocator to an offset from the
* start of fb.
*/
@@ -2100,25 +2098,11 @@ I830AllocateMemory(ScrnInfoPtr pScrn, struct linear_alloc *linear, int size,
xf86FreeOffscreenLinear(linear->xaa);
}
- linear->xaa = xf86AllocateOffscreenLinear(pScreen, size, align,
- NULL, NULL, NULL);
- if (linear->xaa != NULL) {
- linear->offset = XAA_OFFSET_TO_OFFSET(linear->xaa->offset);
- return;
- }
-
- xf86QueryLargestOffscreenLinear(pScreen, &max_size, align,
- PRIORITY_EXTREME);
-
- if (max_size < size) {
- ErrorF("No memory available\n");
- linear->offset = 0;
+ linear->xaa = i830_xf86AllocateOffscreenLinear(pScreen, size, align,
+ NULL, NULL, NULL);
+ if (linear->xaa == NULL)
return;
- }
- xf86PurgeUnlockedOffscreenAreas(pScreen);
- linear->xaa = xf86AllocateOffscreenLinear(pScreen, size, align,
- NULL, NULL, NULL);
linear->offset = XAA_OFFSET_TO_OFFSET(linear->xaa->offset);
}
#endif /* I830_USE_XAA */