From b0b4b5e8f7a25dd11c1662d339d68c9733e9b2dc Mon Sep 17 00:00:00 2001 From: =?utf8?q?Nicolai=20H=C3=A4hnle?= Date: Tue, 27 Jun 2017 09:50:32 +0200 Subject: [PATCH] winsys/radeon: only call pb_slabs_reclaim when slabs are actually used MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit 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 --- src/gallium/winsys/radeon/drm/radeon_drm_bo.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) 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); -- 2.30.2