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 | #define DRM_AMDGPU_GEM_USERPTR 0x11 | 52 | #define DRM_AMDGPU_GEM_USERPTR 0x11 |
| 53 | #define DRM_AMDGPU_WAIT_FENCES 0x12 | 53 | #define DRM_AMDGPU_WAIT_FENCES 0x12 |
| 54 | #define DRM_AMDGPU_VM 0x13 | 54 | #define DRM_AMDGPU_VM 0x13 |
| 55 | #define DRM_AMDGPU_FENCE_TO_HANDLE 0x14 | ||
| 55 | 56 | ||
| 56 | #define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) | 57 | #define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create) |
| 57 | #define DRM_IOCTL_AMDGPU_GEM_MMAP DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_MMAP, union drm_amdgpu_gem_mmap) | 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 | #define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr) | 68 | #define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr) |
| 68 | #define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences) | 69 | #define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences) |
| 69 | #define DRM_IOCTL_AMDGPU_VM DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_VM, union drm_amdgpu_vm) | 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 | #define AMDGPU_GEM_DOMAIN_CPU 0x1 | 73 | #define AMDGPU_GEM_DOMAIN_CPU 0x1 |
| 72 | #define AMDGPU_GEM_DOMAIN_GTT 0x2 | 74 | #define AMDGPU_GEM_DOMAIN_GTT 0x2 |
| @@ -515,6 +517,20 @@ struct drm_amdgpu_cs_chunk_sem { · 442 unmodified lines | |||
| 515 | __u32 handle; | 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 | struct drm_amdgpu_cs_chunk_data { | 534 | struct drm_amdgpu_cs_chunk_data { |
| 519 | union { | 535 | union { |
| 520 | struct drm_amdgpu_cs_chunk_ib ib_data; | 536 | struct drm_amdgpu_cs_chunk_ib ib_data; |