radv/winsys: allow local BOs on APUs
authorSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Apr 2018 13:11:24 +0000 (15:11 +0200)
committerSamuel Pitoiset <samuel.pitoiset@gmail.com>
Fri, 20 Apr 2018 14:18:24 +0000 (16:18 +0200)
Ported from RadeonSI.

Local BOs ignore BO priorities, and we don't need those on APUs.

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/vulkan/winsys/amdgpu/radv_amdgpu_bo.c

index 32f263adddcbdcd4e54051a59d23a0c2996d3ba6..e2060651e489a6f275517d46c79f7930221786db 100644 (file)
@@ -347,7 +347,8 @@ radv_amdgpu_winsys_bo_create(struct radeon_winsys *_ws,
                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;
-       if (flags & RADEON_FLAG_NO_INTERPROCESS_SHARING && ws->info.drm_minor >= 20 && ws->use_local_bos) {
+       if (flags & RADEON_FLAG_NO_INTERPROCESS_SHARING &&
+           ws->info.has_local_buffers && ws->use_local_bos) {
                bo->base.is_local = true;
                request.flags |= AMDGPU_GEM_CREATE_VM_ALWAYS_VALID;
        }