aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
diff options
context:
space:
mode:
authorChristian König <christian.koenig@amd.com>2019-03-21 11:34:18 -0400
committerAlex Deucher <alexander.deucher@amd.com>2019-03-27 23:40:50 -0400
commitecf96b52bf98a22f14bd33c7deee0aad8eb6b569 (patch)
treed10af6d29f2407c86b97b4fd2118529b286a2b7e /drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
parentdf399b064118bf9a5b9a3faaa67feb1cbb34e9d4 (diff)
drm/amdgpu: move VM table mapping into the backend as well
Clean that up further and also fix another case where the BO wasn't kmapped for CPU based updates. Signed-off-by: Christian König <christian.koenig@amd.com> Reviewed-by: Felix Kuehling <Felix.Kuehling@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
Diffstat (limited to 'drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c')
-rw-r--r--drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c11
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
index 9d53982021de..5222d165abfc 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm_cpu.c
@@ -25,6 +25,16 @@
25#include "amdgpu_trace.h" 25#include "amdgpu_trace.h"
26 26
27/** 27/**
28 * amdgpu_vm_cpu_map_table - make sure new PDs/PTs are kmapped
29 *
30 * @table: newly allocated or validated PD/PT
31 */
32static int amdgpu_vm_cpu_map_table(struct amdgpu_bo *table)
33{
34 return amdgpu_bo_kmap(table, NULL);
35}
36
37/**
28 * amdgpu_vm_cpu_prepare - prepare page table update with the CPU 38 * amdgpu_vm_cpu_prepare - prepare page table update with the CPU
29 * 39 *
30 * @p: see amdgpu_vm_update_params definition 40 * @p: see amdgpu_vm_update_params definition
@@ -110,6 +120,7 @@ static int amdgpu_vm_cpu_commit(struct amdgpu_vm_update_params *p,
110} 120}
111 121
112const struct amdgpu_vm_update_funcs amdgpu_vm_cpu_funcs = { 122const struct amdgpu_vm_update_funcs amdgpu_vm_cpu_funcs = {
123 .map_table = amdgpu_vm_cpu_map_table,
113 .prepare = amdgpu_vm_cpu_prepare, 124 .prepare = amdgpu_vm_cpu_prepare,
114 .update = amdgpu_vm_cpu_update, 125 .update = amdgpu_vm_cpu_update,
115 .commit = amdgpu_vm_cpu_commit 126 .commit = amdgpu_vm_cpu_commit