radv: disable implicit sync for radv allocated bos v3
authorAndres Rodriguez <andresx7@gmail.com>
Fri, 20 Oct 2017 22:42:13 +0000 (18:42 -0400)
committerBas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
Fri, 20 Oct 2017 23:15:54 +0000 (01:15 +0200)
commita2c6fbb3ee16a58a9098b031a6382618d570bee8
tree03bd156ec4504db1eac4eefeb79e20910a16613e
parenteff2bdbd8272ceec723dcc1643dd3d5f77020d1f
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 <andresx7@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/radv_device.c
src/amd/vulkan/radv_radeon_winsys.h
src/amd/vulkan/radv_wsi.c
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c