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
52#define DRM_AMDGPU_GEM_USERPTR 0x1152#define DRM_AMDGPU_GEM_USERPTR 0x11
53#define DRM_AMDGPU_WAIT_FENCES 0x1253#define DRM_AMDGPU_WAIT_FENCES 0x12
54#define DRM_AMDGPU_VM 0x1354#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 0x173#define AMDGPU_GEM_DOMAIN_CPU 0x1
72#define AMDGPU_GEM_DOMAIN_GTT 0x274#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
524union 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
518struct drm_amdgpu_cs_chunk_data {534struct 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;

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