drm/amdgpu: export reservation_object from dmabuf to ttm (v2)
Adds an extra argument to amdgpu_bo_create, which is only used in amdgpu_prime.c.
Port of radeon commit 831b6966a6.
v2: fix up kfd.
Signed-off-by: Christian König <christian.koenig@amd.com>
Reviewed-by: Jammy Zhou <Jammy.Zhou@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
committed by
Alex Deucher
parent
b7d698d7fd
commit
72d7668b5b
@@ -86,7 +86,7 @@ static int amdgpu_cgs_gmap_kmem(void *cgs_device, void *kmem,
|
||||
|
||||
struct sg_table *sg = drm_prime_pages_to_sg(&kmem_page, npages);
|
||||
ret = amdgpu_bo_create(adev, size, PAGE_SIZE, false,
|
||||
AMDGPU_GEM_DOMAIN_GTT, 0, sg, &bo);
|
||||
AMDGPU_GEM_DOMAIN_GTT, 0, sg, NULL, &bo);
|
||||
if (ret)
|
||||
return ret;
|
||||
ret = amdgpu_bo_reserve(bo, false);
|
||||
@@ -197,7 +197,8 @@ static int amdgpu_cgs_alloc_gpu_mem(void *cgs_device,
|
||||
|
||||
ret = amdgpu_bo_create_restricted(adev, size, PAGE_SIZE,
|
||||
true, domain, flags,
|
||||
NULL, &placement, &obj);
|
||||
NULL, &placement, NULL,
|
||||
&obj);
|
||||
if (ret) {
|
||||
DRM_ERROR("(%d) bo create failed\n", ret);
|
||||
return ret;
|
||||
|
||||
Reference in New Issue
Block a user