Commit d1968e1d authored by Christian König's avatar Christian König Committed by Alex Deucher

drm/radeon: sync PT updates as shared v2

Only invalidating PTEs needs to be executed synchronized to using the PT.

v2: fix sync to uses
Signed-off-by: default avatarChristian König <christian.koenig@amd.com>
Signed-off-by: default avatarAlex Deucher <alexander.deucher@amd.com>
parent 43ac8857
...@@ -820,7 +820,7 @@ static void radeon_vm_update_ptes(struct radeon_device *rdev, ...@@ -820,7 +820,7 @@ static void radeon_vm_update_ptes(struct radeon_device *rdev,
unsigned nptes; unsigned nptes;
uint64_t pte; uint64_t pte;
radeon_sync_resv(rdev, &ib->sync, pt->tbo.resv, false); radeon_sync_resv(rdev, &ib->sync, pt->tbo.resv, true);
if ((addr & ~mask) == (end & ~mask)) if ((addr & ~mask) == (end & ~mask))
nptes = end - addr; nptes = end - addr;
...@@ -980,6 +980,13 @@ int radeon_vm_bo_update(struct radeon_device *rdev, ...@@ -980,6 +980,13 @@ int radeon_vm_bo_update(struct radeon_device *rdev,
return r; return r;
ib.length_dw = 0; ib.length_dw = 0;
if (!(bo_va->flags & RADEON_VM_PAGE_VALID)) {
unsigned i;
for (i = 0; i < RADEON_NUM_RINGS; ++i)
radeon_sync_fence(&ib.sync, vm->ids[i].last_id_use);
}
radeon_vm_update_ptes(rdev, vm, &ib, bo_va->it.start, radeon_vm_update_ptes(rdev, vm, &ib, bo_va->it.start,
bo_va->it.last + 1, addr, bo_va->it.last + 1, addr,
radeon_vm_page_flags(bo_va->flags)); radeon_vm_page_flags(bo_va->flags));
......
Markdown is supported
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