History

drm/amdgpu: add FENCE_TO_HANDLE ioctl that returns syncobj or sync_file

for being able to convert an amdgpu fence into one of the handles. Mesa will use this.

Marek Olšák committed 9 years ago

Commit 7ca24cf1 parent 684fd0a5 files · +82 −1Browse files

Showing the changes to include/uapi (1 of 5 files). Show all

Unified · Split

include/uapi/drm/amdgpu_drm.h+16−0
@@ -52,6 +52,7 @@ extern "C" { · 51 unmodified lines
5252 #define DRM_AMDGPU_GEM_USERPTR 0x11
5353 #define DRM_AMDGPU_WAIT_FENCES 0x12
5454 #define DRM_AMDGPU_VM 0x13
55+#define DRM_AMDGPU_FENCE_TO_HANDLE 0x14
5556
5657 #define DRM_IOCTL_AMDGPU_GEM_CREATE DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_CREATE, union drm_amdgpu_gem_create)
5758 #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
6768 #define DRM_IOCTL_AMDGPU_GEM_USERPTR DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_GEM_USERPTR, struct drm_amdgpu_gem_userptr)
6869 #define DRM_IOCTL_AMDGPU_WAIT_FENCES DRM_IOWR(DRM_COMMAND_BASE + DRM_AMDGPU_WAIT_FENCES, union drm_amdgpu_wait_fences)
6970 #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)
7072
7173 #define AMDGPU_GEM_DOMAIN_CPU 0x1
7274 #define AMDGPU_GEM_DOMAIN_GTT 0x2
@@ -515,6 +517,20 @@ struct drm_amdgpu_cs_chunk_sem { · 442 unmodified lines
515517 __u32 handle;
516518 };
517519
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+
518534 struct drm_amdgpu_cs_chunk_data {
519535 union {
520536 struct drm_amdgpu_cs_chunk_ib ib_data;

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t