Files
linux/drivers/gpu/drm/amd/amdgpu
Arvind Yadav 70773bef4e drm/amdgpu: update userqueue BOs and PDs
This patch updates the VM_IOCTL to allow userspace to synchronize
the mapping/unmapping of a BO in the page table.

The major changes are:
- it adds a drm_timeline object as an input parameter to the VM IOCTL.
- this object is used by the kernel to sync the update of the BO in
  the page table during the mapping of the object.
- the kernel also synchronizes the tlb flush of the page table entry of
  this object during the unmapping (Added in this series:
  https://patchwork.freedesktop.org/series/131276/ and
  https://patchwork.freedesktop.org/patch/584182/)
- the userspace can wait on this timeline, and then the BO is ready to
  be consumed by the GPU.

The UAPI for the same has been approved here:
https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/392

V2:
 - remove the eviction fence coupling

V3:
 - added the drm timeline support instead of input/output fence
   (Christian)

V4:
 - made timeline 64-bit (Christian)
 - bug fix (Arvind)

V5: GLCTS bug fix (Arvind)
V6: Rename syncobj_handle -> timeline_syncobj_out
    Rename point -> timeline_point_in (Marek)
V7: Addressed review comments from Christian:
    - do not send last_update fence in case of vm_clear_freed, instead
      return the fence from gen_va_update_vm
    - move the functions to update bo_mapping  to amdgpu_gem.c
    - do not use amdgpu_userq_update_vm anymore in userq_create()
V8: Addressed review comments from Christian:
    - Split amdgpu_gem_update_bo_mapping function.
    - amdgpu_gem_va_update_vm should return stub for error.
V9: Addressed review comments from Christian:
    - Rename the function amdgpu_gem_update_timeline_node.
    - amdgpu_gem_update_timeline_node should be void function.
    - when timeline_point is zero don't allocate a chain and
      call drm_syncobj_replace_fence() instead of
      drm_syncobj_add_point().
V11: rebase
V12: Fix 32-bit holes issue in sturct drm_amdgpu_gem_va.
V13: Fix the review comment by renaming timeline syncobj (Marek)

Cc: Alex Deucher <alexander.deucher@amd.com>
Cc: Felix Kuehling <felix.kuehling@amd.com>
Cc: Christian König <christian.koenig@amd.com>
Reviewed-by: Alex Deucher <alexander.deucher@amd.com>
Reviewed-by: Christian König <christian.koenig@amd.com>
Signed-off-by: Arvind Yadav <arvind.yadav@amd.com>
Signed-off-by: Shashank Sharma <shashank.sharma@amd.com>
Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
2025-04-08 16:48:16 -04:00
..
2025-04-07 15:18:34 -04:00
2025-04-08 16:48:14 -04:00
2024-07-24 17:30:23 -04:00
2025-04-08 16:48:15 -04:00
2025-04-08 16:48:15 -04:00
2025-04-08 16:48:14 -04:00
2025-03-26 17:44:34 -04:00
2024-11-03 01:28:06 -05:00
2025-02-25 11:45:12 -05:00
2025-02-12 21:05:50 -05:00
2024-01-15 18:35:37 -05:00
2024-01-15 18:35:37 -05:00
2024-01-15 18:35:37 -05:00
2025-04-08 16:48:13 -04:00
2025-04-08 16:48:13 -04:00
2024-07-24 17:30:23 -04:00
2024-07-24 17:30:23 -04:00
2025-04-07 15:18:34 -04:00
2025-04-07 15:18:34 -04:00
2025-04-07 15:18:34 -04:00
2023-08-07 16:35:38 -04:00
2023-03-15 18:45:26 -04:00
2023-03-15 18:45:26 -04:00
2025-04-08 16:48:15 -04:00
2025-04-08 16:48:15 -04:00
2023-08-30 15:00:27 -04:00
2025-03-13 23:08:51 -04:00
2025-04-08 16:48:14 -04:00
2025-04-08 16:48:14 -04:00
2025-03-26 17:44:34 -04:00
2025-03-05 10:37:13 -05:00
2025-03-05 10:37:13 -05:00
2023-08-31 16:34:05 -04:00