提交 108b4d92 编写于 作者: G Gang Ba 提交者: Alex Deucher

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: NChristian König <christian.koenig@amd.com>
Signed-off-by: NGang Ba <gaba@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 f40c6912
......@@ -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;
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册