gpu: host1x-fence: Add pollfd support

Add support for pollfds, which are essentially file descriptors
with SYNC_FILE polling characteristics but that can have new
fences assigned to after the previous expires.

Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Change-Id: I6471720089041d3cc72dfaf2d1de221d80d28c27
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2806032
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Mikko Perttunen
2022-07-01 15:43:06 +03:00
committed by mobile promotions
parent c6a9a40f1f
commit f4a3e6b49a
2 changed files with 221 additions and 0 deletions

View File

@@ -72,8 +72,22 @@ struct host1x_fence_extract {
__u32 reserved[2];
};
struct host1x_create_pollfd {
__s32 fd;
__u32 reserved;
};
struct host1x_trigger_pollfd {
__s32 fd;
__u32 id;
__u32 threshold;
__u32 reserved;
};
#define HOST1X_IOCTL_CREATE_FENCE _IOWR('X', 0x02, struct host1x_create_fence)
#define HOST1X_IOCTL_FENCE_EXTRACT _IOWR('X', 0x05, struct host1x_fence_extract)
#define HOST1X_IOCTL_CREATE_POLLFD _IOWR('X', 0x10, struct host1x_create_pollfd)
#define HOST1X_IOCTL_TRIGGER_POLLFD _IOWR('X', 0x11, struct host1x_trigger_pollfd)
#if defined(__cplusplus)
}