History

Merge tag 'dma-fence-deadline' into HEAD

This series adds a deadline hint to fences, so realtime deadlines such as vblank can be communicated to the fence signaller for power/ frequency management decisions. This is partially inspired by a trick i915 does, but implemented via dma-fence for a couple of reasons: 1) To continue to be able to use the atomic helpers 2) To support cases where display and gpu are different drivers See https://patchwork.freedesktop.org/series/93035/ This does not yet add any UAPI, although this will be needed in a number of cases: 1) Workloads "ping-ponging" between CPU and GPU, where we don't want the GPU freq governor to interpret time stalled waiting for GPU as "idle" time 2) Cases where the compositor is waiting for fences to be signaled before issuing the atomic ioctl, for example to maintain 60fps cursor updates even when the GPU is not able to maintain that framerate.

Rob Clark committed 3 years ago

Commit 1ad05102 parents 8559da8 d39e48c14 files · +303 −34Browse files

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

Unified · Split

include/uapi/linux/sync_file.h+15−22
@@ -16,12 +16,16 @@ · 15 unmodified lines
1616 #include <linux/types.h>
1717
1818 /**
19− * struct sync_merge_data - data passed to merge ioctl
19+ * struct sync_merge_data - SYNC_IOC_MERGE: merge two fences
2020 * @name: name of new fence
2121 * @fd2: file descriptor of second fence
2222 * @fence: returns the fd of the new fence to userspace
2323 * @flags: merge_data flags
2424 * @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
2529 */
2630 struct sync_merge_data {
2731 char name[32];
@@ -34,8 +38,8 @@ struct sync_merge_data { · 6 unmodified lines
3438 /**
3539 * struct sync_fence_info - detailed fence information
3640 * @obj_name: name of parent sync_timeline
37−* @driver_name: name of driver implementing the parent
38−* @status: status of the fence 0:active 1:signaled <0:error
41+ * @driver_name: name of driver implementing the parent
42+ * @status: status of the fence 0:active 1:signaled <0:error
3943 * @flags: fence_info flags
4044 * @timestamp_ns: timestamp of status change in nanoseconds
4145 */
@@ -48,14 +52,19 @@ struct sync_fence_info { · 6 unmodified lines
4852 };
4953
5054 /**
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
5256 * @name: name of fence
5357 * @status: status of fence. 1: signaled 0:active <0:error
5458 * @flags: sync_file_info flags
5559 * @num_fences number of fences in the sync_file
5660 * @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
5862 * 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.
5968 */
6069 struct sync_file_info {
6170 char name[32];
@@ -69,30 +78,14 @@ struct sync_file_info { · 7 unmodified lines
6978
7079 #define SYNC_IOC_MAGIC '>'
7180
72−/**
81+/*
7382 * Opcodes 0, 1 and 2 were burned during a API change to avoid users of the
7483 * old API to get weird errors when trying to handling sync_files. The API
7584 * change happened during the de-stage of the Sync Framework when there was
7685 * no upstream users available.
7786 */
7887
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− */
8688 #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− */
9689 #define SYNC_IOC_FILE_INFO _IOWR(SYNC_IOC_MAGIC, 4, struct sync_file_info)
9790
9891 #endif /* _UAPI_LINUX_SYNC_H */

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