summaryrefslogtreecommitdiff
path: root/src/radeon_legacy_memory.c
diff options
context:
space:
mode:
authorPauli Nieminen <suokkos@gmail.com>2010-02-15 13:40:37 +0200
committerMichel Dänzer <michel@daenzer.net>2010-02-15 17:10:06 +0100
commit78e7047c5235b09858b66dd3688d39aaa27d7589 (patch)
tree9eebea9c29c1cf4b2b0648a64c220fdc4d2ad63a /src/radeon_legacy_memory.c
parent3ec25e59854b6b03ad763bc374d3475a50f562d8 (diff)
Allocate Xv buffers to GTT.
KMS doesn't have acceleration for upload to vram. memcpy/memmove to VRAM directly is very slow (40M/s in benchmark) which causes visible problems to video. Allocating video buffer in GTT will give good performance (350-450M/s) for memmove operation. This is nice performance boost for Xv under KMS. Signed-off-by: Pauli Nieminen <suokkos@gmail.com>
Diffstat (limited to 'src/radeon_legacy_memory.c')
-rw-r--r--src/radeon_legacy_memory.c5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/radeon_legacy_memory.c b/src/radeon_legacy_memory.c
index 02b95edc..bdf8ca26 100644
--- a/src/radeon_legacy_memory.c
+++ b/src/radeon_legacy_memory.c
@@ -15,7 +15,8 @@ uint32_t
radeon_legacy_allocate_memory(ScrnInfoPtr pScrn,
void **mem_struct,
int size,
- int align)
+ int align,
+ int domain)
{
ScreenPtr pScreen = screenInfo.screens[pScrn->scrnIndex];
RADEONInfoPtr info = RADEONPTR(pScrn);
@@ -25,7 +26,7 @@ radeon_legacy_allocate_memory(ScrnInfoPtr pScrn,
if (info->cs) {
struct radeon_bo *video_bo;
- video_bo = radeon_bo_open(info->bufmgr, 0, size, 4096, 0, 0);
+ video_bo = radeon_bo_open(info->bufmgr, 0, size, 4096, domain, 0);
*mem_struct = video_bo;