v3d/simulator: create GEM BOs in GTT memory for AMD GPUs

As the BOs created in GPU needs to be accessible from the simulator,
create them in GTT memory, with CPU access.

Signed-off-by: Juan A. Suarez Romero <jasuarez@igalia.com>
Reviewed-by: Jose Maria Casanova Crespo <jmcasanova@igalia.com>
Reviewed-by: Iago Toral Quiroga <itoral@igalia.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/37887>
This commit is contained in:
Juan A. Suarez Romero 2025-10-24 13:55:44 +02:00 committed by Marge Bot
parent 977d4f34dd
commit 5947eae0af

View file

@ -568,6 +568,9 @@ v3d_simulator_create_bo_ioctl(int fd, struct drm_v3d_create_bo *args)
{
union drm_amdgpu_gem_create create = { 0 };
create.in.bo_size = args->size;
create.in.domains = AMDGPU_GEM_DOMAIN_GTT;
create.in.domain_flags =
AMDGPU_GEM_CREATE_CPU_ACCESS_REQUIRED;
ret = drmIoctl(fd, DRM_IOCTL_AMDGPU_GEM_CREATE, &create);