Skip to content

Commit

Permalink
drm/radeon: sync PT updates as shared v2
Browse files Browse the repository at this point in the history
Only invalidating PTEs needs to be executed synchronized to using the PT.

v2: fix sync to uses

Signed-off-by: Christian König <[email protected]>
Signed-off-by: Alex Deucher <[email protected]>
  • Loading branch information
ChristianKoenigAMD authored and alexdeucher committed Nov 20, 2014
1 parent 43ac885 commit d1968e1
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion drivers/gpu/drm/radeon/radeon_vm.c
Original file line number Diff line number Diff line change
Expand Up @@ -820,7 +820,7 @@ static void radeon_vm_update_ptes(struct radeon_device *rdev,
unsigned nptes;
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))
nptes = end - addr;
Expand Down Expand Up @@ -980,6 +980,13 @@ int radeon_vm_bo_update(struct radeon_device *rdev,
return r;
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,
bo_va->it.last + 1, addr,
radeon_vm_page_flags(bo_va->flags));
Expand Down

0 comments on commit d1968e1

Please sign in to comment.