for being able to convert an amdgpu fence into one of the handles. Mesa will use this.
Showing the changes to include/uapi (1 of 5 files). Show all
Unified · Split
| @@ -52,6 +52,7 @@ extern "C" { · 51 unmodified lines | ||
| 52 | 52 | #define DRM_AMDGPU_GEM_USERPTR 0x11 |
| 53 | 53 | #define DRM_AMDGPU_WAIT_FENCES 0x12 |
| 54 | 54 | #define DRM_AMDGPU_VM 0x13 |
| 55 | +#define DRM_AMDGPU_FENCE_TO_HANDLE 0x14 | |
| 55 | 56 | |
| 56 | 57 | #define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) |
| 57 | 58 | #define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) |
| @@ -67,6 +68,7 @@ extern "C" { · 9 unmodified lines | ||
| 67 | 68 | #define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr) |
| 68 | 69 | #define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences) |
| 69 | 70 | #define DRM_IOCTL_AMDGPU_VM DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm) |
| 71 | +#define DRM_IOCTL_AMDGPU_FENCE_TO_HANDLE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_FENCE_TO_HANDLE, union drm_amdgpu_fence_to_handle) | |
| 70 | 72 | |
| 71 | 73 | #define AMDGPU_GEM_DOMAIN_CPU 0x1 |
| 72 | 74 | #define AMDGPU_GEM_DOMAIN_GTT 0x2 |
| @@ -515,6 +517,20 @@ struct drm_amdgpu_cs_chunk_sem { · 442 unmodified lines | ||
| 515 | 517 | __u32 handle; |
| 516 | 518 | }; |
| 517 | 519 | |
| 520 | +#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ 0 | |
| 521 | +#define AMDGPU_FENCE_TO_HANDLE_GET_SYNCOBJ_FD 1 | |
| 522 | +#define AMDGPU_FENCE_TO_HANDLE_GET_SYNC_FILE_FD 2 | |
| 523 | + | |
| 524 | +union drm_amdgpu_fence_to_handle { | |
| 525 | + struct { | |
| 526 | + struct drm_amdgpu_fence fence; | |
| 527 | + __u32 what; | |
| 528 | + } in; | |
| 529 | + struct { | |
| 530 | + __u32 handle; | |
| 531 | + } out; | |
| 532 | +}; | |
| 533 | + | |
| 518 | 534 | struct drm_amdgpu_cs_chunk_data { |
| 519 | 535 | union { |
| 520 | 536 | struct drm_amdgpu_cs_chunk_ib ib_data; |