Commit 387f49e5 authored by Junwei Zhang's avatar Junwei Zhang Committed by Alex Deucher
Browse files

drm/amdgpu: fix clear_all and replace handling in the VM (v2)

v2: assign bo_va as well

We need to put the lose ends on the invalid list because it is possible
that we need to split up huge pages for them.

Signed-off-by: default avatarChristian König <>
Signed-off-by: Junwei Zhang <> (v2)
Reviewed-by: default avatarDavid Zhou <>
Signed-off-by: default avatarAlex Deucher <>
parent 23529390
......@@ -2123,7 +2123,8 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
before->last = saddr - 1;
before->offset = tmp->offset;
before->flags = tmp->flags;
list_add(&before->list, &tmp->list);
before->bo_va = tmp->bo_va;
list_add(&before->list, &tmp->bo_va->invalids);
/* Remember mapping split at the end */
......@@ -2133,7 +2134,8 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
after->offset = tmp->offset;
after->offset += after->start - tmp->start;
after->flags = tmp->flags;
list_add(&after->list, &tmp->list);
after->bo_va = tmp->bo_va;
list_add(&after->list, &tmp->bo_va->invalids);
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment