Introduce an internal API for dealing with linux sync files,
and use it in the codebase to replace ad-hoc sync file management.
The linux_sync_file_is_valid function is not currently used, but will be
utilized in upcoming commits to implement the
zwp_linux_explicit_synchronization_unstable_v1 protocol.
Changes in v5:
- Meson support.
Changes in v3:
- Use parameter name in function documentation.
- Move kernel UAPI to separate header file.
Changes in v2:
- Add function documentation
- Remove linux_sync_file_wait()
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
The sync file functionality is required by the upcoming GPU render
timeline work, but it's only available in relatively new linux kernel
versions (4.7 and above).
This commit provides a "sanitized" version of the required sync file
definitions. On systems that don't have the sync file header (due to
having an older kernel), we will be able to fall back to our own
definitions when building.
Signed-off-by: Alexandros Frantzis <alexandros.frantzis@collabora.com>
Reviewed-by: Pekka Paalanen <pekka.paalanen@collabora.co.uk>