[Mesa-dev] [PATCH 9/9] winsys/amdgpu: pass the BO list via the CS ioctl on DRM >= 3.27.0
Michel Dänzer
michel at daenzer.net
Thu Jul 12 09:00:14 UTC 2018
On 2018-07-12 07:26 AM, Marek Olšák wrote:
> From: Marek Olšák <marek.olsak at amd.com>
>
> TODO: requires latest libdrm for amdgpu_bo_handle_type_kms_noimport
> ---
> src/gallium/winsys/amdgpu/drm/amdgpu_bo.c | 6 +++
> src/gallium/winsys/amdgpu/drm/amdgpu_bo.h | 2 +
> src/gallium/winsys/amdgpu/drm/amdgpu_cs.c | 54 +++++++++++++++++++++--
> 3 files changed, 58 insertions(+), 4 deletions(-)
>
> diff --git a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
> index e3d56613dfa..eba8d6e8b3d 100644
> --- a/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
> +++ b/src/gallium/winsys/amdgpu/drm/amdgpu_bo.c
> @@ -473,20 +473,22 @@ static struct amdgpu_winsys_bo *amdgpu_create_bo(struct amdgpu_winsys *ws,
> bo->u.real.va_handle = va_handle;
> bo->initial_domain = initial_domain;
> bo->unique_id = __sync_fetch_and_add(&ws->next_bo_unique_id, 1);
> bo->is_local = !!(request.flags & AMDGPU_GEM_CREATE_VM_ALWAYS_VALID);
>
> if (initial_domain & RADEON_DOMAIN_VRAM)
> ws->allocated_vram += align64(size, ws->info.gart_page_size);
> else if (initial_domain & RADEON_DOMAIN_GTT)
> ws->allocated_gtt += align64(size, ws->info.gart_page_size);
>
> + amdgpu_bo_export(bo->bo, amdgpu_bo_handle_type_kms_noimport, &bo->u.real.kms_handle);
How does using amdgpu_bo_handle_type_kms instead affect the numbers?
--
Earthling Michel Dänzer | http://www.amd.com
Libre software enthusiast | Mesa and X developer
More information about the mesa-dev
mailing list