ac/info: rename has_local_buffers into has_vm_always_valid

The has_local_buffers name is based on the original name of this
feature (the GEM flag was AMDGPU_GEM_CREATE_LOCAL).

But in v3 the flag was renamed AMDGPU_GEM_CREATE_VM_ALWAYS_VALID,
so it's clearer to have the Mesa flag to match the kernel one.

Tested-by: Dmitry Osipenko <dmitry.osipenko@collabora.com>
Acked-by: Rob Clark <robdclark@chromium.org>
Acked-by: Marek Olšák <marek.olsak@amd.com>
Reviewed-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/34470>
This commit is contained in:
Pierre-Eric Pelloux-Prayer 2025-04-14 11:34:43 +02:00 committed by Marge Bot
parent bb12eebe2a
commit ffdf13bd48
4 changed files with 5 additions and 5 deletions

View file

@ -1005,7 +1005,7 @@ ac_query_gpu_info(int fd, void *dev_p, struct radeon_info *info,
info->has_syncobj = true;
info->has_timeline_syncobj = !info->is_virtio && has_timeline_syncobj(fd);
info->has_fence_to_handle = true;
info->has_local_buffers = !info->is_virtio;
info->has_vm_always_valid = !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
@ -2091,7 +2091,7 @@ void ac_print_gpu_info(const struct radeon_info *info, FILE *f)
fprintf(f, " drm = %i.%i.%i\n", info->drm_major, info->drm_minor, info->drm_patchlevel);
fprintf(f, " has_userptr = %i\n", info->has_userptr);
fprintf(f, " has_timeline_syncobj = %u\n", info->has_timeline_syncobj);
fprintf(f, " has_local_buffers = %u\n", info->has_local_buffers);
fprintf(f, " has_vm_always_valid = %u\n", info->has_vm_always_valid);
fprintf(f, " has_bo_metadata = %u\n", info->has_bo_metadata);
fprintf(f, " has_eqaa_surface_allocator = %u\n", info->has_eqaa_surface_allocator);
fprintf(f, " has_sparse_vm_mappings = %u\n", info->has_sparse_vm_mappings);

View file

@ -234,7 +234,7 @@ struct radeon_info {
bool has_syncobj;
bool has_timeline_syncobj;
bool has_fence_to_handle;
bool has_local_buffers;
bool has_vm_always_valid;
bool has_bo_metadata;
bool has_eqaa_surface_allocator;
bool has_sparse_vm_mappings;

View file

@ -624,7 +624,7 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *aws,
if (flags & RADEON_FLAG_GTT_WC)
request.flags |= AMDGPU_GEM_CREATE_CPU_GTT_USWC;
if (aws->info.has_local_buffers &&
if (aws->info.has_vm_always_valid &&
initial_domain & (RADEON_DOMAIN_VRAM_GTT | RADEON_DOMAIN_DOORBELL) &&
flags & RADEON_FLAG_NO_INTERPROCESS_SHARING)
request.flags |= AMDGPU_GEM_CREATE_VM_ALWAYS_VALID;

View file

@ -62,7 +62,7 @@ static bool do_winsys_init(struct amdgpu_winsys *aws,
/* TODO: Enable this once the kernel handles it efficiently. */
if (!aws->info.userq_ip_mask)
aws->info.has_local_buffers = false;
aws->info.has_vm_always_valid = false;
return true;