From: Nicolai Hähnle Date: Tue, 27 Jun 2017 07:50:32 +0000 (+0200) Subject: winsys/radeon: only call pb_slabs_reclaim when slabs are actually used X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=b0b4b5e8f7a25dd11c1662d339d68c9733e9b2dc;p=mesa.git 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 Reviewed-by: Samuel Pitoiset Reviewed-by: Marek Olšák --- diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c index 9bbf1b32501..2700c6f2543 100644 --- a/src/gallium/winsys/radeon/drm/radeon_drm_bo.c +++ b/src/gallium/winsys/radeon/drm/radeon_drm_bo.c @@ -1027,7 +1027,8 @@ no_slab: 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);