diff options
author | Christian König <[email protected]> | 2017-05-23 18:40:18 +0200 |
---|---|---|
committer | Christian König <[email protected]> | 2017-05-24 10:32:19 +0200 |
commit | 5318870f5457104aae87d7cd81b347e1aea231ea (patch) | |
tree | 39e62483c10463cbd1530162d07109bdbbae36e9 /src/gallium/winsys | |
parent | 51dc5e3df38b2be0549c96b52548df1c92e36e96 (diff) |
winsys/amdgpu: align VA allocations to fragment size v2
BOs larger than the minimum fragment size should have their VA
alignet to at least the fragment size for optimal performance.
v2: drop unused leftover from initial implementation
Signed-off-by: Christian König <[email protected]>
Reviewed-by: Marek Olšák <[email protected]>
Diffstat (limited to 'src/gallium/winsys')
-rw-r--r-- | src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c index 6bdcce53dc8..401741167a3 100644 --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c @@ -415,6 +415,8 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *ws, } va_gap_size = ws->check_vm ? MAX2(4 * alignment, 64 * 1024) : 0; + if (size > ws->info.pte_fragment_size) + alignment = MAX2(alignment, ws->info.pte_fragment_size); r = amdgpu_va_range_alloc(ws->dev, amdgpu_gpu_va_range_general, size + va_gap_size, alignment, 0, &va, &va_handle, 0); if (r) |