diff options
author | Eric Anholt <eric@anholt.net> | 2006-11-30 09:15:30 -0800 |
---|---|---|
committer | Eric Anholt <eric@anholt.net> | 2006-11-30 09:15:30 -0800 |
commit | b94b7c4bcfdb7ba59ed818f72309b5060a2ab7ee (patch) | |
tree | 7c7a6bbfa3d08660c0a986bf59d25a89a9260cee /src/i830_memory.c | |
parent | b6fc8df9a52f5fe1b4d26ae06bc4d48235b44a67 (diff) | |
parent | 25e6e497824a23eb231fc6fd6e483f601d612cee (diff) |
Merge branch 'exa' of ../xf86-video-intel into modesetting
Conflicts:
man/i810.man
src/Makefile.am
src/i830.h
src/i830_driver.c
src/i830_rotate.c
src/i830_video.c
Diffstat (limited to 'src/i830_memory.c')
-rw-r--r-- | src/i830_memory.c | 28 |
1 files changed, 28 insertions, 0 deletions
diff --git a/src/i830_memory.c b/src/i830_memory.c index 52131775..7b0c6fe4 100644 --- a/src/i830_memory.c +++ b/src/i830_memory.c @@ -870,6 +870,34 @@ I830Allocate2DMemory(ScrnInfoPtr pScrn, const int flags) } return FALSE; } +#ifdef I830_USE_EXA + size = lineSize * pScrn->virtualY; + size = ROUND_TO_PAGE(size); + + if (tileable) { + align = KB(512); + alignflags = ALIGN_BOTH_ENDS; + } else { + align = KB(64); + alignflags = 0; + } + + alloced = I830AllocVidMem(pScrn, &(pI830->Offscreen), + &(pI830->StolenPool), size, align, + flags | alignflags | + FROM_ANYWHERE | ALLOCATE_AT_BOTTOM); + if (alloced < size) { + if (!dryrun) { + xf86DrvMsg(pScrn->scrnIndex, X_ERROR, "Failed to allocate " + "offscreen memory. Not enough VRAM?\n"); + } + return FALSE; + } else { + xf86DrvMsg(pScrn->scrnIndex, X_INFO, "Successful allocate " + "offscreen memory at 0x%lx, size %ld KB\n", + pI830->Offscreen.Start, pI830->Offscreen.Size/1024); + } +#endif } else { long lineSize; long extra = 0; |