From dc83195175c6b2f70dc46325601555902b5fed0a Mon Sep 17 00:00:00 2001 From: Pierre-Eric Pelloux-Prayer Date: Mon, 22 Apr 2024 12:12:29 +0200 Subject: [PATCH] ac/virtio: disable userptr and local buffers MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit They're not supported yet so let's not pretend they are. In particular use_local_buffers can cause VM_ALWAYS_VALID to be used, which then prevents the creation of a dmabuf. Acked-by: Samuel Pitoiset Tested-by: Dmitry Osipenko Reviewed-by: Dmitry Osipenko Reviewed-by: Marek Olšák Part-of: --- src/amd/common/ac_gpu_info.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index 906653ac804..a71336fb02f 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -1003,11 +1003,11 @@ bool ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info, info->memory_freq_mhz_effective *= ac_memory_ops_per_clock(info->vram_type); - info->has_userptr = true; + info->has_userptr = !info->is_virtio; info->has_syncobj = true; info->has_timeline_syncobj = has_timeline_syncobj(fd); info->has_fence_to_handle = true; - info->has_local_buffers = true; + info->has_local_buffers = !info->is_virtio; info->has_bo_metadata = true; info->has_eqaa_surface_allocator = info->gfx_level < GFX11; /* Disable sparse mappings on GFX6 due to VM faults in CP DMA. Enable them once