drm/amdgpu: invalidate parent bo when shadow bo was invalidated
Subsystems (2)
PATCH 1/1 drm/amdgpu: invalidate parent bo when shadow bo was invalidated
Shadow BO is located on GTT and its parent (PT and PD) BO could located on VRAM. In some case, the BO on GTT could be evicted but the parent did not. This may cause the shadow BO not be put in the evict list and could not be invalidate correctly.
v2: suggested by Christian
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4 -0
@@ -2252,6 +2252,10 @@ void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev, {struct amdgpu_vm_bo_base *bo_base; +/* shadow bo doesn't have bo base, its validation needs its parent */ +if (bo->parent && bo->parent->shadow == bo) + bo = bo->parent; +list_for_each_entry (bo_base, &bo->va, bo_list) {struct amdgpu_vm *vm = bo_base->vm;
Signature · 6 lines
2.14.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): [email protected]
Zhang, Jerry (Junwei)
Reviewed-by Junwei ZhangQuoted 9 lines · Chunming Zhou
Shadow BO is located on GTT and its parent (PT and PD) BO could located on VRAM. In some case, the BO on GTT could be evicted but the parent did not. This may cause the shadow BO not be put in the evict list and could not be invalidate correctly.
v2: suggested by ChristianChange-Id Iad10d9a3031fa2b243879b9e58ee4d8c527eb433Signed-off-by Chunming Zhou <[email protected]>Reported-by Shaoyun Liu <[email protected]>
Quoted 10 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev, · line 2261
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4
-0@@ -2252,6 +2252,10 @@ void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev, {struct amdgpu_vm_bo_base *bo_base; +/* shadow bo doesn't have bo base, its validation needs its parent */ +if (bo->parent && bo->parent->shadow == bo) + bo = bo->parent; +list_for_each_entry (bo_base, &bo->va, bo_list) {struct amdgpu_vm *vm = bo_base->vm;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
Christian König
Reviewed-byAm 04.05.2018 um 08:44 schrieb Chunming Zhou:
Quoted 9 lines
Shadow BO is located on GTT and its parent (PT and PD) BO could located on VRAM. In some case, the BO on GTT could be evicted but the parent did not. This may cause the shadow BO not be put in the evict list and could not be invalidate correctly.
v2: suggested by ChristianChange-Id Iad10d9a3031fa2b243879b9e58ee4d8c527eb433Signed-off-by Chunming Zhou <[email protected]>Reported-by Shaoyun Liu <[email protected]>
Quoted 9 lines
--- drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +0
-0
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev, · line 2261
Quoted 10 lines
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c +4
-0@@ -2252,6 +2252,10 @@ void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev, {struct amdgpu_vm_bo_base *bo_base; +/* shadow bo doesn't have bo base, its validation needs its parent */ +if (bo->parent && bo->parent->shadow == bo) + bo = bo->parent; +list_for_each_entry (bo_base, &bo->va, bo_list) {struct amdgpu_vm *vm = bo_base->vm;
_______________________________________________
amd-gfx mailing list
[email protected]
https://lists.freedesktop.org/mailman/listinfo/amd-gfx