This patch adds input fences to VM_IOCTL for buffer object. The kernel will map/unmap the BO only when the fence is signaled. The UAPI for the same has been approved here: https://gitlab.freedesktop.org/mesa/drm/-/merge_requests/392 V2: Bug fix (Arvind) V3: Bug fix (Arvind) V4: Rename UAPI objects as per UAPI review (Marek) V5: Addressed review comemnts from Christian - function should return error. - Add 'TODO' comment - The input fence should be independent of the operation. V6: Addressed review comemnts from Christian - Release the memory allocated by memdup_user(). V7: Addressed review comemnts from Christian - Drop the debug print and add "return r;" for the error handling. V11: Rebase v12: Fix 32-bit holes issue in sturct drm_amdgpu_gem_va. v13: Fix deadlock issue. v14: Fix merge conflict. v15: Fix review comment by renaming syncobj handles.
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -884,6 +884,10 @@ struct drm_amdgpu_gem_va { · 883 unmodified lines | |||
| 884 | * at vm_timeline_point. | 884 | * at vm_timeline_point. |
| 885 | */ | 885 | */ |
| 886 | __u32 vm_timeline_syncobj_out; | 886 | __u32 vm_timeline_syncobj_out; |
| 887 | /** the number of syncobj handles in @input_fence_syncobj_handles */ | ||
| 888 | __u32 num_syncobj_handles; | ||
| 889 | /** Array of sync object handle to wait for given input fences */ | ||
| 890 | __u64 input_fence_syncobj_handles; | ||
| 887 | }; | 891 | }; |
| 888 | 892 | ||
| 889 | #define AMDGPU_HW_IP_GFX 0 | 893 | #define AMDGPU_HW_IP_GFX 0 |