Re: [PATCH 2/2] drm/amdgpu: Use last_unlocked fence for unlocked update

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am 26.03.22 um 01:56 schrieb Philip Yang:
MMU callback update page table set unlocked flag, add callback tlb_cb to
vm->last_unlocked fence, and pass it back to upper layer to wait for
page table update done.

Signed-off-by: Philip Yang <Philip.Yang@xxxxxxx>
---
  drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c | 5 ++++-
  1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
index 48f326609976..aac1b625194f 100644
--- a/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
+++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_vm.c
@@ -927,7 +927,10 @@ int amdgpu_vm_bo_update_mapping(struct amdgpu_device *adev,
r = vm->update_funcs->commit(&params, fence); - if (!unlocked && (!(flags & AMDGPU_PTE_VALID) || params.table_freed)) {
+	if (!(flags & AMDGPU_PTE_VALID) || params.table_freed) {

Dropping the check for the unlocked flag here seems to be ok.

+		if (unlocked && fence)
+			*fence = dma_fence_get(vm->last_unlocked);
+

But that doesn't seems to make sense, fence should already contain the necessary fence object if any.

Regards,
Christian.


  		tlb_cb->vm = vm;
  		if (!fence || !*fence ||
  		    dma_fence_add_callback(*fence, &tlb_cb->cb,




[Index of Archives]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux