提交 04fe3fd1 编写于 作者: P Philip Yang 提交者: Alex Deucher

drm/amdkfd: handle errors returned by svm_migrate_copy_to_vram/ram

If migration copy failed because process is killed, or out of VRAM or
system memory, pass error code back to caller to handle error
gracefully.
Signed-off-by: NPhilip Yang <Philip.Yang@amd.com>
Reviewed-by: NFelix Kuehling <Felix.Kuehling@amd.com>
Signed-off-by: NAlex Deucher <alexander.deucher@amd.com>
上级 ef0d7d20
......@@ -460,8 +460,8 @@ svm_migrate_vma_to_vram(struct amdgpu_device *adev, struct svm_range *prange,
}
if (migrate.cpages) {
svm_migrate_copy_to_vram(adev, prange, &migrate, &mfence,
scratch);
r = svm_migrate_copy_to_vram(adev, prange, &migrate, &mfence,
scratch);
migrate_vma_pages(&migrate);
svm_migrate_copy_done(adev, mfence);
migrate_vma_finalize(&migrate);
......@@ -663,8 +663,8 @@ svm_migrate_vma_to_ram(struct amdgpu_device *adev, struct svm_range *prange,
pr_debug("cpages %ld\n", migrate.cpages);
if (migrate.cpages) {
svm_migrate_copy_to_ram(adev, prange, &migrate, &mfence,
scratch);
r = svm_migrate_copy_to_ram(adev, prange, &migrate, &mfence,
scratch);
migrate_vma_pages(&migrate);
svm_migrate_copy_done(adev, mfence);
migrate_vma_finalize(&migrate);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册