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>
This commit is contained in:
parent
df399b0641
commit
ecf96b52bf
4 changed files with 37 additions and 27 deletions
|
|
@ -24,6 +24,16 @@
|
|||
#include "amdgpu_object.h"
|
||||
#include "amdgpu_trace.h"
|
||||
|
||||
/**
|
||||
* amdgpu_vm_cpu_map_table - make sure new PDs/PTs are kmapped
|
||||
*
|
||||
* @table: newly allocated or validated PD/PT
|
||||
*/
|
||||
static int amdgpu_vm_cpu_map_table(struct amdgpu_bo *table)
|
||||
{
|
||||
return amdgpu_bo_kmap(table, NULL);
|
||||
}
|
||||
|
||||
/**
|
||||
* amdgpu_vm_cpu_prepare - prepare page table update with the CPU
|
||||
*
|
||||
|
|
@ -110,6 +120,7 @@ static int amdgpu_vm_cpu_commit(struct amdgpu_vm_update_params *p,
|
|||
}
|
||||
|
||||
const struct amdgpu_vm_update_funcs amdgpu_vm_cpu_funcs = {
|
||||
.map_table = amdgpu_vm_cpu_map_table,
|
||||
.prepare = amdgpu_vm_cpu_prepare,
|
||||
.update = amdgpu_vm_cpu_update,
|
||||
.commit = amdgpu_vm_cpu_commit
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue