summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/radeon.h3
-rw-r--r--src/radeon_crtc.c3
-rw-r--r--src/radeon_cursor.c3
-rw-r--r--src/radeon_legacy_memory.c5
-rw-r--r--src/radeon_textured_video.c9
-rw-r--r--src/radeon_video.c9
6 files changed, 21 insertions, 11 deletions
diff --git a/src/radeon.h b/src/radeon.h
index 59c2282c..f9c78ab2 100644
--- a/src/radeon.h
+++ b/src/radeon.h
@@ -1331,7 +1331,8 @@ extern uint32_t
radeon_legacy_allocate_memory(ScrnInfoPtr pScrn,
void **mem_struct,
int size,
- int align);
+ int align,
+ int domain);
extern void
radeon_legacy_free_memory(ScrnInfoPtr pScrn,
void *mem_struct);
diff --git a/src/radeon_crtc.c b/src/radeon_crtc.c
index 556b4612..764839c0 100644
--- a/src/radeon_crtc.c
+++ b/src/radeon_crtc.c
@@ -564,7 +564,8 @@ radeon_crtc_shadow_allocate (xf86CrtcPtr crtc, int width, int height)
* setter for offscreen area locking in EXA currently. So, we just
* allocate offscreen memory and fake up a pixmap header for it.
*/
- rotate_offset = radeon_legacy_allocate_memory(pScrn, &radeon_crtc->crtc_rotate_mem, size, align);
+ rotate_offset = radeon_legacy_allocate_memory(pScrn, &radeon_crtc->crtc_rotate_mem,
+ size, align, RADEON_GEM_DOMAIN_VRAM);
if (rotate_offset == 0)
return NULL;
diff --git a/src/radeon_cursor.c b/src/radeon_cursor.c
index 2e607108..4a171ff3 100644
--- a/src/radeon_cursor.c
+++ b/src/radeon_cursor.c
@@ -420,7 +420,8 @@ Bool RADEONCursorInit(ScreenPtr pScreen)
int align = IS_AVIVO_VARIANT ? 4096 : 256;
radeon_crtc->cursor_offset =
- radeon_legacy_allocate_memory(pScrn, &radeon_crtc->cursor_mem, size_bytes, align);
+ radeon_legacy_allocate_memory(pScrn, &radeon_crtc->cursor_mem,
+ size_bytes, align, RADEON_GEM_DOMAIN_VRAM);
if (radeon_crtc->cursor_offset == 0)
return FALSE;
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;
diff --git a/src/radeon_textured_video.c b/src/radeon_textured_video.c
index fdc077e7..29910d0f 100644
--- a/src/radeon_textured_video.c
+++ b/src/radeon_textured_video.c
@@ -318,14 +318,16 @@ RADEONPutImageTextured(ScrnInfoPtr pScrn,
if (pPriv->video_memory == NULL) {
pPriv->video_offset = radeon_legacy_allocate_memory(pScrn,
&pPriv->video_memory,
- size, hw_align + 1);
+ size, hw_align + 1,
+ RADEON_GEM_DOMAIN_GTT);
if (pPriv->video_offset == 0)
return BadAlloc;
if (info->cs) {
pPriv->src_bo[0] = pPriv->video_memory;
radeon_legacy_allocate_memory(pScrn, (void*)&pPriv->src_bo[1], size,
- hw_align + 1);
+ hw_align + 1,
+ RADEON_GEM_DOMAIN_GTT);
}
}
@@ -709,7 +711,8 @@ Bool radeon_load_bicubic_texture(ScrnInfoPtr pScrn)
/* Bicubic filter loading */
info->bicubic_offset = radeon_legacy_allocate_memory(pScrn,
&info->bicubic_memory,
- sizeof(bicubic_tex_512), 64);
+ sizeof(bicubic_tex_512), 64,
+ RADEON_GEM_DOMAIN_VRAM);
if (info->bicubic_offset == 0)
return FALSE;
diff --git a/src/radeon_video.c b/src/radeon_video.c
index d7700fa0..92f65a6e 100644
--- a/src/radeon_video.c
+++ b/src/radeon_video.c
@@ -2949,7 +2949,8 @@ RADEONPutImage(
}
pPriv->video_offset = radeon_legacy_allocate_memory(pScrn, &pPriv->video_memory,
(pPriv->doubleBuffer ?
- (new_size * 2) : new_size), 64);
+ (new_size * 2) : new_size), 64,
+ RADEON_GEM_DOMAIN_GTT);
if (pPriv->video_offset == 0)
return BadAlloc;
@@ -3179,7 +3180,8 @@ RADEONAllocateSurface(
pitch = ((w << 1) + 15) & ~15;
size = pitch * h;
- offset = radeon_legacy_allocate_memory(pScrn, &surface_memory, size, 64);
+ offset = radeon_legacy_allocate_memory(pScrn, &surface_memory, size, 64,
+ RADEON_GEM_DOMAIN_GTT);
if (offset == 0)
return BadAlloc;
@@ -3517,7 +3519,8 @@ RADEONPutVideo(
pPriv->video_offset = radeon_legacy_allocate_memory(pScrn, &pPriv->video_memory,
(pPriv->doubleBuffer ?
- (new_size * 2) : new_size), 64);
+ (new_size * 2) : new_size), 64,
+ RADEON_GEM_DOMAIN_GTT);
if (pPriv->video_offset == 0)
return BadAlloc;