Mesa (master): Revert "winsys/amdgpu: overallocate buffers for faster address translation on Gfx9"
GitLab Mirror
gitlab-mirror at kemper.freedesktop.org
Thu Nov 29 19:46:23 UTC 2018
Module: Mesa
Branch: master
Commit: 39b20b7d4f464fbbd181af19ab419d1e488af2e5
URL: http://cgit.freedesktop.org/mesa/mesa/commit/?id=39b20b7d4f464fbbd181af19ab419d1e488af2e5
Author: Marek Olšák <marek.olsak at amd.com>
Date: Thu Nov 29 14:45:42 2018 -0500
Revert "winsys/amdgpu: overallocate buffers for faster address translation on Gfx9"
I didn't mean to push this. I don't think it makes any difference.
This reverts commit f737fe00a047ae1ae9ec4e15a4ea8b578389f2f6.
---
src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 24 ------------------------
1 file changed, 24 deletions(-)
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
index b24f90674d..58979bd4ea 100644
--- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
+++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
@@ -466,30 +466,6 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *ws,
RADEON_DOMAIN_GDS |
RADEON_DOMAIN_OA)) == 1);
- /* Gfx9: Overallocate the size to the next power of two for faster address
- * translation if we don't waste too much memory.
- */
- if (ws->info.chip_class >= GFX9) {
- uint64_t next_pot_size = util_next_power_of_two64(size);
-
- /* For slightly lower than 4 GB allocations, at most 32 MB are wasted.
- * For slightly lower than 256 MB allocations, at most 2 MB are wasted.
- * For slightly lower than 64 MB allocations, at most 512 KB are wasted.
- *
- * Waste at most 0.79% (1/127) of the size if we decide to overallocate.
- */
- uint64_t max_overalloc = next_pot_size >> 7;
-
- /* If the next power-of-two size is <= the page size, waste up to
- * 6.25% (1/16) of the size if we decide to overallocate.
- */
- if (next_pot_size <= ws->info.pte_fragment_size)
- max_overalloc = next_pot_size >> 4;
-
- if (size + max_overalloc >= next_pot_size)
- size = next_pot_size;
- }
-
bo = CALLOC_STRUCT(amdgpu_winsys_bo);
if (!bo) {
return NULL;
More information about the mesa-commit
mailing list