mirror of
https://github.com/checkpoint-restore/criu.git
synced 2026-07-23 01:59:04 +00:00
plugins/amdgpu: Use correct sizes to unmap sdma copy objects
Adjusted object sizes need to be used to unmap on the cleanup path so that the unmap operations match with map for the case sizes were adjusted in the function prologue. Signed-off-by: Tvrtko Ursulin <tvrtko.ursulin@igalia.com> --- v2: * Improve commit message and use adjusted size in error logs too.
This commit is contained in:
parent
26e8513130
commit
0269883c7e
1 changed files with 6 additions and 4 deletions
|
|
@ -769,9 +769,10 @@ err_ctx:
|
|||
err_bo_list:
|
||||
free_and_unmap(packets_per_buffer * 28, h_bo_ib, h_va_ib, gpu_addr_ib, ib);
|
||||
err_ib_gpu_alloc:
|
||||
err = amdgpu_bo_va_op(h_bo_dst, 0, size, gpu_addr_dst, 0, AMDGPU_VA_OP_UNMAP);
|
||||
err = amdgpu_bo_va_op(h_bo_dst, 0, dst_bo_size, gpu_addr_dst, 0, AMDGPU_VA_OP_UNMAP);
|
||||
if (err)
|
||||
pr_perror("failed to GPU unmap the dest BO %lx, size = %lx", gpu_addr_dst, size);
|
||||
pr_perror("failed to GPU unmap the dest BO %lx, size = %lx",
|
||||
gpu_addr_dst, dst_bo_size);
|
||||
err_dst_bo_map:
|
||||
err = amdgpu_va_range_free(h_va_dst);
|
||||
if (err)
|
||||
|
|
@ -782,9 +783,10 @@ err_dst_va:
|
|||
if (err)
|
||||
pr_perror("dest bo free failed");
|
||||
err_dst_bo_prep:
|
||||
err = amdgpu_bo_va_op(h_bo_src, 0, size, gpu_addr_src, 0, AMDGPU_VA_OP_UNMAP);
|
||||
err = amdgpu_bo_va_op(h_bo_src, 0, src_bo_size, gpu_addr_src, 0, AMDGPU_VA_OP_UNMAP);
|
||||
if (err)
|
||||
pr_perror("failed to GPU unmap the src BO %lx, size = %lx", gpu_addr_src, size);
|
||||
pr_perror("failed to GPU unmap the src BO %lx, size = %lx",
|
||||
gpu_addr_src, src_bo_size);
|
||||
err_src_bo_map:
|
||||
err = amdgpu_va_range_free(h_va_src);
|
||||
if (err)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue