1
0
Fork 0

drm/amd/amdgpu: Update VM function pointer

When VM state changed and system in large bar mode,
make sure to use CPU update function, otherwise use
SDMA function.

Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Gang Ba <gaba@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
alistair/sunxi64-5.4-dsi
Gang Ba 2019-08-14 11:00:19 -04:00 committed by Alex Deucher
parent f40c6912d2
commit 108b4d928c
1 changed files with 7 additions and 0 deletions

View File

@ -2863,6 +2863,13 @@ int amdgpu_vm_make_compute(struct amdgpu_device *adev, struct amdgpu_vm *vm, uns
WARN_ONCE((vm->use_cpu_for_update && !amdgpu_gmc_vram_full_visible(&adev->gmc)),
"CPU update of VM recommended only for large BAR system\n");
if (vm->use_cpu_for_update)
vm->update_funcs = &amdgpu_vm_cpu_funcs;
else
vm->update_funcs = &amdgpu_vm_sdma_funcs;
dma_fence_put(vm->last_update);
vm->last_update = NULL;
if (vm->pasid) {
unsigned long flags;