diff options
author | Dave Airlie <airlied@linux.ie> | 2007-07-16 14:45:47 +1000 |
---|---|---|
committer | Dave Airlie <airlied@linux.ie> | 2007-07-16 14:45:47 +1000 |
commit | 0be629a914129446b353881f7d92aae707137047 (patch) | |
tree | ba83b3e378790ca27788cf35d46f87328be61d08 | |
parent | ead9cd64bd767a30235860e9cfca25d937784bee (diff) |
drm/radeon/ttm: more VRAM fixes
-rw-r--r-- | linux-core/radeon_buffer.c | 8 | ||||
-rw-r--r-- | linux-core/radeon_drv.c | 4 |
2 files changed, 8 insertions, 4 deletions
diff --git a/linux-core/radeon_buffer.c b/linux-core/radeon_buffer.c index 611d0d6a..5b10c24a 100644 --- a/linux-core/radeon_buffer.c +++ b/linux-core/radeon_buffer.c @@ -71,6 +71,11 @@ uint32_t radeon_evict_mask(drm_buffer_object_t *bo) case DRM_BO_MEM_LOCAL: case DRM_BO_MEM_TT: return DRM_BO_FLAG_MEM_LOCAL; + case DRM_BO_MEM_VRAM: + if (bo->mem.num_pages > 128) + return DRM_BO_MEM_TT; + else + return DRM_BO_MEM_LOCAL; default: return DRM_BO_FLAG_MEM_TT | DRM_BO_FLAG_CACHED; } @@ -88,8 +93,7 @@ int radeon_init_mem_type(drm_device_t * dev, uint32_t type, man->drm_bus_maptype = 0; break; case DRM_BO_MEM_VRAM: - man->flags = _DRM_FLAG_MEMTYPE_MAPPABLE | - _DRM_FLAG_MEMTYPE_FIXED | _DRM_FLAG_NEEDS_IOREMAP; + man->flags = _DRM_FLAG_MEMTYPE_MAPPABLE | _DRM_FLAG_NEEDS_IOREMAP; man->io_addr = NULL; man->drm_bus_maptype = _DRM_FRAME_BUFFER; man->io_offset = drm_get_resource_start(dev, 0); diff --git a/linux-core/radeon_drv.c b/linux-core/radeon_drv.c index d0995b5b..079971d5 100644 --- a/linux-core/radeon_drv.c +++ b/linux-core/radeon_drv.c @@ -71,8 +71,8 @@ static drm_fence_driver_t radeon_fence_driver = { #endif #ifdef RADEON_HAVE_BUFFER -static uint32_t radeon_mem_prios[] = {DRM_BO_MEM_PRIV0, DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL}; -static uint32_t radeon_busy_prios[] = {DRM_BO_MEM_TT, DRM_BO_MEM_PRIV0, DRM_BO_MEM_LOCAL}; +static uint32_t radeon_mem_prios[] = {DRM_BO_MEM_VRAM, DRM_BO_MEM_TT, DRM_BO_MEM_LOCAL}; +static uint32_t radeon_busy_prios[] = {DRM_BO_MEM_TT, DRM_BO_MEM_VRAM, DRM_BO_MEM_LOCAL}; static drm_bo_driver_t radeon_bo_driver = { .mem_type_prio = radeon_mem_prios, |