We had all of the internal driver APIs, but not the all important userspace uABI, in the dma-buf doc. Fix that. And re-arrange the comments slightly as otherwise the comments for the ioctl nr defines would not show up. v2: Fix docs build warning coming from newly including the uabi header in the docs build
Showing the changes to include/uapi (1 of 2 files). Show all
Unified · Split
| @@ -16,12 +16,16 @@ · 15 unmodified lines | |||
| 16 | #include <linux/types.h> | 16 | #include <linux/types.h> |
| 17 | 17 | ||
| 18 | /** | 18 | /** |
| 19 | * struct sync_merge_data - data passed to merge ioctl | 19 | * struct sync_merge_data - SYNC_IOC_MERGE: merge two fences |
| 20 | * @name: name of new fence | 20 | * @name: name of new fence |
| 21 | * @fd2: file descriptor of second fence | 21 | * @fd2: file descriptor of second fence |
| 22 | * @fence: returns the fd of the new fence to userspace | 22 | * @fence: returns the fd of the new fence to userspace |
| 23 | * @flags: merge_data flags | 23 | * @flags: merge_data flags |
| 24 | * @pad: padding for 64-bit alignment, should always be zero | 24 | * @pad: padding for 64-bit alignment, should always be zero |
| 25 | * | ||
| 26 | * Creates a new fence containing copies of the sync_pts in both | ||
| 27 | * the calling fd and sync_merge_data.fd2. Returns the new fence's | ||
| 28 | * fd in sync_merge_data.fence | ||
| 25 | */ | 29 | */ |
| 26 | struct sync_merge_data { | 30 | struct sync_merge_data { |
| 27 | char name[32]; | 31 | char name[32]; |
| @@ -34,8 +38,8 @@ struct sync_merge_data { · 6 unmodified lines | |||
| 34 | /** | 38 | /** |
| 35 | * struct sync_fence_info - detailed fence information | 39 | * struct sync_fence_info - detailed fence information |
| 36 | * @obj_name: name of parent sync_timeline | 40 | * @obj_name: name of parent sync_timeline |
| 37 | * @driver_name: name of driver implementing the parent | 41 | * @driver_name: name of driver implementing the parent |
| 38 | * @status: status of the fence 0:active 1:signaled <0:error | 42 | * @status: status of the fence 0:active 1:signaled <0:error |
| 39 | * @flags: fence_info flags | 43 | * @flags: fence_info flags |
| 40 | * @timestamp_ns: timestamp of status change in nanoseconds | 44 | * @timestamp_ns: timestamp of status change in nanoseconds |
| 41 | */ | 45 | */ |
| @@ -48,14 +52,19 @@ struct sync_fence_info { · 6 unmodified lines | |||
| 48 | }; | 52 | }; |
| 49 | 53 | ||
| 50 | /** | 54 | /** |
| 51 | * struct sync_file_info - data returned from fence info ioctl | 55 | * struct sync_file_info - SYNC_IOC_FILE_INFO: get detailed information on a sync_file |
| 52 | * @name: name of fence | 56 | * @name: name of fence |
| 53 | * @status: status of fence. 1: signaled 0:active <0:error | 57 | * @status: status of fence. 1: signaled 0:active <0:error |
| 54 | * @flags: sync_file_info flags | 58 | * @flags: sync_file_info flags |
| 55 | * @num_fences number of fences in the sync_file | 59 | * @num_fences number of fences in the sync_file |
| 56 | * @pad: padding for 64-bit alignment, should always be zero | 60 | * @pad: padding for 64-bit alignment, should always be zero |
| 57 | * @sync_fence_info: pointer to array of structs sync_fence_info with all | 61 | * @sync_fence_info: pointer to array of struct &sync_fence_info with all |
| 58 | * fences in the sync_file | 62 | * fences in the sync_file |
| 63 | * | ||
| 64 | * Takes a struct sync_file_info. If num_fences is 0, the field is updated | ||
| 65 | * with the actual number of fences. If num_fences is > 0, the system will | ||
| 66 | * use the pointer provided on sync_fence_info to return up to num_fences of | ||
| 67 | * struct sync_fence_info, with detailed fence information. | ||
| 59 | */ | 68 | */ |
| 60 | struct sync_file_info { | 69 | struct sync_file_info { |
| 61 | char name[32]; | 70 | char name[32]; |
| @@ -69,30 +78,14 @@ struct sync_file_info { · 7 unmodified lines | |||
| 69 | 78 | ||
| 70 | #define SYNC_IOC_MAGIC '>' | 79 | #define SYNC_IOC_MAGIC '>' |
| 71 | 80 | ||
| 72 | /** | 81 | /* |
| 73 | * Opcodes 0, 1 and 2 were burned during a API change to avoid users of the | 82 | * Opcodes 0, 1 and 2 were burned during a API change to avoid users of the |
| 74 | * old API to get weird errors when trying to handling sync_files. The API | 83 | * old API to get weird errors when trying to handling sync_files. The API |
| 75 | * change happened during the de-stage of the Sync Framework when there was | 84 | * change happened during the de-stage of the Sync Framework when there was |
| 76 | * no upstream users available. | 85 | * no upstream users available. |
| 77 | */ | 86 | */ |
| 78 | 87 | ||
| 79 | /** | ||
| 80 | * DOC: SYNC_IOC_MERGE - merge two fences | ||
| 81 | * | ||
| 82 | * Takes a struct sync_merge_data. Creates a new fence containing copies of | ||
| 83 | * the sync_pts in both the calling fd and sync_merge_data.fd2. Returns the | ||
| 84 | * new fence's fd in sync_merge_data.fence | ||
| 85 | */ | ||
| 86 | #define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data) | 88 | #define SYNC_IOC_MERGE _IOWR(SYNC_IOC_MAGIC, 3, struct sync_merge_data) |
| 87 | |||
| 88 | /** | ||
| 89 | * DOC: SYNC_IOC_FILE_INFO - get detailed information on a sync_file | ||
| 90 | * | ||
| 91 | * Takes a struct sync_file_info. If num_fences is 0, the field is updated | ||
| 92 | * with the actual number of fences. If num_fences is > 0, the system will | ||
| 93 | * use the pointer provided on sync_fence_info to return up to num_fences of | ||
| 94 | * struct sync_fence_info, with detailed fence information. | ||
| 95 | */ | ||
| 96 | #define SYNC_IOC_FILE_INFO _IOWR(SYNC_IOC_MAGIC, 4, struct sync_file_info) | 89 | #define SYNC_IOC_FILE_INFO _IOWR(SYNC_IOC_MAGIC, 4, struct sync_file_info) |
| 97 | 90 | ||
| 98 | #endif /* _UAPI_LINUX_SYNC_H */ | 91 | #endif /* _UAPI_LINUX_SYNC_H */ |