diff options
author | Andres Rodriguez <[email protected]> | 2017-10-20 18:42:13 -0400 |
---|---|---|
committer | Bas Nieuwenhuizen <[email protected]> | 2017-10-21 01:15:54 +0200 |
commit | a2c6fbb3ee16a58a9098b031a6382618d570bee8 (patch) | |
tree | 03bd156ec4504db1eac4eefeb79e20910a16613e /src/amd/vulkan/winsys | |
parent | eff2bdbd8272ceec723dcc1643dd3d5f77020d1f (diff) |
radv: disable implicit sync for radv allocated bos v3
Implicit sync kicks in when a buffer is used by two different amdgpu
contexts simultaneously. Jobs that use explicit synchronization
mechanisms end up needlessly waiting to be scheduled for long periods
of time in order to achieve serialized execution.
This patch disables implicit synchronization for all radv allocations
except for wsi bos. The only systems that require implicit
synchronization are DRI2/3 and PRIME.
v2: mark wsi bos as RADV_MEM_IMPLICIT_SYNC
v3: Add drm version check (Bas)
Signed-off-by: Andres Rodriguez <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Diffstat (limited to 'src/amd/vulkan/winsys')
-rw-r--r-- | src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c index bffb76bb331..15099b318e7 100644 --- a/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c +++ b/src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c @@ -330,6 +330,8 @@ radv_amdgpu_winsys_bo_create(struct radeon_winsys *_ws, request.flags |= AMDGPU_GEM_CREATE_NO_CPU_ACCESS; if (flags & RADEON_FLAG_GTT_WC) request.flags |= AMDGPU_GEM_CREATE_CPU_GTT_USWC; + if (!(flags & RADEON_FLAG_IMPLICIT_SYNC) && ws->info.drm_minor >= 22) + request.flags |= AMDGPU_GEM_CREATE_EXPLICIT_SYNC; /* this won't do anything on pre 4.9 kernels */ if (ws->zero_all_vram_allocs && (initial_domain & RADEON_DOMAIN_VRAM)) |