diff options
author | Marek Olšák <[email protected]> | 2016-07-29 21:53:23 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-08-06 13:56:14 +0200 |
commit | c5ff0d3e65d499dcb466c151ed48cdf67e43cdbb (patch) | |
tree | bd999e295394f4a002d5d539907288b19e0afa44 /src/gallium/winsys | |
parent | 076db67217741aa820feadccc66067516d4cf4ca (diff) |
gallium/radeon: move radeon_winsys::cs_memory_below_limit to drivers
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 18 | ||||
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 16 |
2 files changed, 0 insertions, 34 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c index b3c5d6e2645..ab6bca89602 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_cs.c @@ -782,23 +782,6 @@ static bool amdgpu_cs_check_space(struct radeon_winsys_cs *rcs, unsigned dw) return true; } -static bool amdgpu_cs_memory_below_limit(struct radeon_winsys_cs *rcs, - uint64_t vram, uint64_t gtt) -{ - struct amdgpu_cs *cs = amdgpu_cs(rcs); - struct amdgpu_winsys *ws = cs->ctx->ws; - - vram += cs->main.base.used_vram; - gtt += cs->main.base.used_gart; - - /* Anything that goes above the VRAM size should go to GTT. */ - if (vram > ws->info.vram_size) - gtt += vram - ws->info.vram_size; - - /* Now we just need to check if we have enough GTT. */ - return gtt < ws->info.gart_size * 0.7; -} - static unsigned amdgpu_cs_get_buffer_list(struct radeon_winsys_cs *rcs, struct radeon_bo_list_item *list) { @@ -1112,7 +1095,6 @@ void amdgpu_cs_init_functions(struct amdgpu_winsys *ws) ws->base.cs_lookup_buffer = amdgpu_cs_lookup_buffer; ws->base.cs_validate = amdgpu_cs_validate; ws->base.cs_check_space = amdgpu_cs_check_space; - ws->base.cs_memory_below_limit = amdgpu_cs_memory_below_limit; ws->base.cs_get_buffer_list = amdgpu_cs_get_buffer_list; ws->base.cs_flush = amdgpu_cs_flush; ws->base.cs_is_buffer_referenced = amdgpu_bo_is_referenced; diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c index 15eeb40cb15..e06a01d5cac 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_cs.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_cs.c @@ -389,21 +389,6 @@ static bool radeon_drm_cs_check_space(struct radeon_winsys_cs *rcs, unsigned dw) return rcs->current.max_dw - rcs->current.cdw >= dw; } -static bool radeon_drm_cs_memory_below_limit(struct radeon_winsys_cs *rcs, uint64_t vram, uint64_t gtt) -{ - struct radeon_drm_cs *cs = radeon_drm_cs(rcs); - - vram += cs->base.used_vram; - gtt += cs->base.used_gart; - - /* Anything that goes above the VRAM size should go to GTT. */ - if (vram > cs->ws->info.vram_size) - gtt += vram - cs->ws->info.vram_size; - - /* Now we just need to check if we have enough GTT. */ - return gtt < cs->ws->info.gart_size * 0.7; -} - static unsigned radeon_drm_cs_get_buffer_list(struct radeon_winsys_cs *rcs, struct radeon_bo_list_item *list) { @@ -676,7 +661,6 @@ void radeon_drm_cs_init_functions(struct radeon_drm_winsys *ws) ws->base.cs_lookup_buffer = radeon_drm_cs_lookup_buffer; ws->base.cs_validate = radeon_drm_cs_validate; ws->base.cs_check_space = radeon_drm_cs_check_space; - ws->base.cs_memory_below_limit = radeon_drm_cs_memory_below_limit; ws->base.cs_get_buffer_list = radeon_drm_cs_get_buffer_list; ws->base.cs_flush = radeon_drm_cs_flush; ws->base.cs_is_buffer_referenced = radeon_bo_is_referenced; |