commit 5462da85cf9200a7622a699fb8dd0eed00231af9 Author: Nicolai Hähnle Date: Tue Jun 27 09:50:32 2017 +0200 winsys/radeon: only call pb_slabs_reclaim when slabs are actually used Bugzilla: https://bugs.freedesktop.org/show_bug.cgi?id=100242 Fixes: fb827c055cb1 ("winsys/radeon: enable buffer allocation from slabs") Cc: mesa-stable@lists.freedesktop.org diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 9bbf1b3..2700c6f 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -1020,21 +1020,22 @@ no_slab: bo = radeon_bo(pb_cache_reclaim_buffer(&ws->bo_cache, size, alignment, usage, pb_cache_bucket)); if (bo) return &bo->base; bo = radeon_create_bo(ws, size, alignment, usage, domain, flags, pb_cache_bucket); if (!bo) { /* Clear the cache and try again. */ - pb_slabs_reclaim(&ws->bo_slabs); + if (ws->info.has_virtual_memory) + pb_slabs_reclaim(&ws->bo_slabs); pb_cache_release_all_buffers(&ws->bo_cache); bo = radeon_create_bo(ws, size, alignment, usage, domain, flags, pb_cache_bucket); if (!bo) return NULL; } bo->u.real.use_reusable_pool = true; mtx_lock(&ws->bo_handles_mutex);