Hi Alejandro,
yes I've implemented this, but I'm still hunting down some bugs with the
new locks.
I will send out the patches on Monday even if I can't narrow that
problem down further.
Regards,
Christian.
Am 03.01.20 um 05:20 schrieb Sierra Guiza, Alejandro (Alex):
[AMD Official Use Only - Internal Distribution Only]
Hi Christian,
I wonder if you had a chance to look into this warning.
Please let me know if there's something we could help with.
Regards,
Alejandro
-----Original Message-----
From: Christian König <ckoenig.leichtzumerken@xxxxxxxxx>
Sent: Thursday, December 12, 2019 2:52 AM
To: Kuehling, Felix <Felix.Kuehling@xxxxxxx>; amd-gfx@xxxxxxxxxxxxxxxxxxxxx; Yang, Philip <Philip.Yang@xxxxxxx>; Sierra Guiza, Alejandro (Alex) <Alex.Sierra@xxxxxxx>
Subject: Re: [PATCH 5/5] drm/amdgpu: immedially invalidate PTEs
[CAUTION: External Email]
Hi Felix,
yeah, I've also found a corner case which would raise a warning now.
Need to rework how dependencies for the PTE update are generated.
Going to take care of this in the next few days, Christian.
Am 12.12.19 um 01:20 schrieb Felix Kuehling:
Hi Christian,
Alex started trying to invalidate PTEs in the MMU notifiers and we're
finding that we still need to reserve the VM reservation for
amdgpu_sync_resv in amdgpu_vm_sdma_prepare. Is that sync_resv still
needed now, given that VM fences aren't in that reservation object any
more?
Regards,
Felix
On 2019-12-05 5:39, Christian König wrote:
When a BO is evicted immedially invalidate the mapped PTEs.
Signed-off-by: Christian König <christian.koenig@xxxxxxx>
---
drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 17 ++++++++++++++++-
1 file changed, 16 insertions(+), 1 deletion(-)
diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 839d6df394fc..e578113bfd55 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -2565,6 +2565,7 @@ void amdgpu_vm_bo_invalidate(struct
amdgpu_device *adev,
struct amdgpu_bo *bo, bool evicted)
{
struct amdgpu_vm_bo_base *bo_base;
+ int r;
/* shadow bo doesn't have bo base, its validation needs its
parent */
if (bo->parent && bo->parent->shadow == bo) @@ -2572,8 +2573,22
@@ void amdgpu_vm_bo_invalidate(struct amdgpu_device *adev,
for (bo_base = bo->vm_bo; bo_base; bo_base = bo_base->next) {
struct amdgpu_vm *vm = bo_base->vm;
+ struct dma_resv *resv = vm->root.base.bo->tbo.base.resv;
+
+ if (bo->tbo.type != ttm_bo_type_kernel) {
+ struct amdgpu_bo_va *bo_va;
+
+ bo_va = container_of(bo_base, struct amdgpu_bo_va,
+ base);
+ r = amdgpu_vm_bo_update(adev, bo_va,
+ bo->tbo.base.resv != resv);
+ if (!r) {
+ amdgpu_vm_bo_idle(bo_base);
+ continue;
+ }
+ }
- if (evicted && bo->tbo.base.resv ==
vm->root.base.bo->tbo.base.resv) {
+ if (evicted && bo->tbo.base.resv == resv) {
amdgpu_vm_bo_evicted(bo_base);
continue;
}
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx
_______________________________________________
amd-gfx mailing list
amd-gfx@xxxxxxxxxxxxxxxxxxxxx
https://lists.freedesktop.org/mailman/listinfo/amd-gfx