drm/amdgpu: fix clear_all and replace handling in the VM (v2)
Subsystems (2)
PATCH 1/1 drm/amdgpu: fix clear_all and replace handling in the VM (v2)
From: Christian König <[email protected]>
(comments: I cannot receive amdgfx mail recently and reply the mail directly, so send it out with my update v2, tested with Unigine Heaven, glmark2, gputest, some cases from vulkan PRT test)
v2: store 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.
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4 -2
@@ -2172,7 +2172,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 */
@@ -2182,7 +2183,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); }list_del (&tmp->list);
Signature · 6 lines
1.9.1 _______________________________________________ amd-gfx mailing list [email protected] https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 1528186178-15257-1-git-send-email-Jerry.Zhang-5C7GfCeVMHo@public.gmane.org
Am 05.06.2018 um 10:09 schrieb Junwei Zhang:
Quoted 6 lines
From: Christian König <[email protected]>
(comments: I cannot receive amdgfx mail recently and reply the mail directly, so send it out with my update v2, tested with Unigine Heaven, glmark2, gputest, some cases from vulkan PRT test)
Quoted 7 lines
v2: store
bo_vaas wellWe 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 Christian König <[email protected]>Signed-off-by Junwei Zhang <[email protected]>
Good catch that assigning the bo_va is also missing. David can you take a look and give a review?
Since I'm a co-author I can't do it myself.
Thanks,
Christian.
Quoted 19 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2
-1@@ -2172,7 +2172,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 */
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, · line 2190
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2
-1@@ -2182,7 +2183,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); }list_del (&tmp->list);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 55e7af64-9289-a7be-cd61-9b48f25593f0-5C7GfCeVMHo@public.gmane.org
Quoted 9 lines · Christian König
Am 05.06.2018 um 10:09 schrieb Junwei Zhang:
Quoted 8 lines
From: Christian König <[email protected]>
(comments: I cannot receive amdgfx mail recently and reply the mail directly, so send it out with my update v2, tested with Unigine Heaven, glmark2, gputest, some cases from vulkan PRT test)
v2: store
bo_vaas well
Quoted 7 lines
Quoted 5 lines
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 Christian König <[email protected]>Signed-off-by Junwei Zhang <[email protected]>Good catch that assigning the
bo_vais also missing. David can you take a look and give a review?
Feel free add my RB on it, it looks very good.
Regards,
David Zhou
Quoted 26 lines
Since I'm a co-author I can't do it myself.
Thanks,
Christian.Quoted 20 lines
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c| 6 ++++--1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2
-1@@ -2172,7 +2172,8 @@ int amdgpu_vm_bo_clear_mappings(structamdgpu_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 */@@ -2182,7 +2183,8 @@ int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev,
Quoted 9 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c int amdgpu_vm_bo_clear_mappings(struct amdgpu_device *adev, · line 2190
Quoted 8 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +2
-1after->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); } list_del(&tmp->list);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
A message that is not in the archive (sent off-list or not yet received): 988ffafd-f335-c6ed-14fc-da91211c306d-5C7GfCeVMHo@public.gmane.org
Quoted 15 lines · On 06/05/2018 04:20 PM, zhoucm1 wrote:
Quoted 12 lines · Christian König
Am 05.06.2018 um 10:09 schrieb Junwei Zhang:
Quoted 11 lines
From: Christian König <[email protected]>
(comments: I cannot receive amdgfx mail recently and reply the mail directly, so send it out with my update v2, tested with Unigine Heaven, glmark2, gputest, some cases from vulkan PRT test)
v2: store
bo_vaas wellWe need to put the lose ends on the invalid list because it is possible that we need to split up huge pages for them.
Quoted 6 lines
Quoted 5 lines
Quoted 2 lines
Signed-off-by Christian König <[email protected]>Signed-off-by Junwei Zhang <[email protected]>Good catch that assigning the
bo_vais also missing. David can you take a look and give a review?Feel free add my RB on it, it looks very good.
Thanks you all.
I will apply the patch.
Jerry
Quoted 40 lines
Regards,
David ZhouQuoted 36 lines
Since I'm a co-author I can't do it myself.
Thanks,
Christian.Quoted 29 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4
-2@@ -2172,7 +2172,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 */ @@ -2182,7 +2183,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); }list_del (&tmp->list);
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx