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/radeon | |
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/radeon')
-rw-r--r-- | src/gallium/winsys/radeon/drm/radeon_drm_cs.c | 16 |
1 files changed, 0 insertions, 16 deletions
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; |