drm/amdgpu: expose amdgpu_bo_create_shadow()
authorNirmoy Das <nirmoy.das@amd.com>
Wed, 21 Apr 2021 15:27:46 +0000 (17:27 +0200)
committerAlex Deucher <alexander.deucher@amd.com>
Fri, 23 Apr 2021 21:18:10 +0000 (17:18 -0400)
Exposed amdgpu_bo_create_shadow() will be needed
for amdgpu_vm handling.

Signed-off-by: Nirmoy Das <nirmoy.das@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
drivers/gpu/drm/amd/amdgpu/amdgpu_object.c
drivers/gpu/drm/amd/amdgpu/amdgpu_object.h

index 1345f7e..9cdeb20 100644 (file)
@@ -625,9 +625,9 @@ fail_unreserve:
        return r;
 }
 
-static int amdgpu_bo_create_shadow(struct amdgpu_device *adev,
-                                  unsigned long size,
-                                  struct amdgpu_bo *bo)
+int amdgpu_bo_create_shadow(struct amdgpu_device *adev,
+                           unsigned long size,
+                           struct amdgpu_bo *bo)
 {
        struct amdgpu_bo_param bp;
        int r;
index 973c88b..e0ec48d 100644 (file)
@@ -271,6 +271,9 @@ int amdgpu_bo_create_user(struct amdgpu_device *adev,
                          struct amdgpu_bo_user **ubo_ptr);
 void amdgpu_bo_free_kernel(struct amdgpu_bo **bo, u64 *gpu_addr,
                           void **cpu_addr);
+int amdgpu_bo_create_shadow(struct amdgpu_device *adev,
+                           unsigned long size,
+                           struct amdgpu_bo *bo);
 int amdgpu_bo_kmap(struct amdgpu_bo *bo, void **ptr);
 void *amdgpu_bo_kptr(struct amdgpu_bo *bo);
 void amdgpu_bo_kunmap(struct amdgpu_bo *bo);