winsys/radeon: only call pb_slabs_reclaim when slabs are actually used
authorNicolai Hähnle <nicolai.haehnle@amd.com>
Tue, 27 Jun 2017 07:50:32 +0000 (09:50 +0200)
committerNicolai Hähnle <nicolai.haehnle@amd.com>
Mon, 3 Jul 2017 10:39:41 +0000 (12:39 +0200)
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 <samuel.pitoiset@gmail.com>
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/winsys/radeon/drm/radeon_drm_bo.c

index 9bbf1b325012b884786e61d86c839e389a15aac2..2700c6f25436242710f0b6e7c641244b931b1e65 100644 (file)
@@ -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);