]> git.proxmox.com Git - mirror_ubuntu-kernels.git/commitdiff
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 1345f7eba011bf49414b4d46f8123a1b36ec7126..9cdeb20fb6cd939da7e2bca7bb00b25eb8476fb8 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 973c88bdf37b5c5110554cfe4bf36eb34cc0b0bc..e0ec48d6a3fda493cfce054ce461fb01577e9ff1 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);