summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2023-01-19 15:09:21 +0200
committerThierry Reding <treding@nvidia.com>2023-01-26 15:55:38 +0100
commitd5179020f5ce44fd449790a9c12ef6c1a90a2ca7 (patch)
treeb23507f69bf4ea56a40f7261a67ad8a8a04c5f71 /include
parent625d4ffb438cacc9b1ebaa48748cdc7171587cdc (diff)
gpu: host1x: External timeout/cancellation for fences
Currently all fences have a 30 second timeout to ensure they are cleaned up if the fence never completes otherwise. However, this one size fits all solution doesn't actually fit in every case, such as syncpoint waiting where we want to be able to have timeouts longer than 30 seconds. As such, we want to be able to give control over fence cancellation to the caller (and maybe eventually get rid of the internal timeout altogether). Here we add this cancellation mechanism by essentially adding a function for entering the timeout path by function call, and changing the syncpoint wait function to use it. Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com> Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include')
-rw-r--r--include/linux/host1x.h4
1 files changed, 3 insertions, 1 deletions
diff --git a/include/linux/host1x.h b/include/linux/host1x.h
index db6cf6f34361..9a9de4b97a25 100644
--- a/include/linux/host1x.h
+++ b/include/linux/host1x.h
@@ -222,7 +222,9 @@ u32 host1x_syncpt_base_id(struct host1x_syncpt_base *base);
void host1x_syncpt_release_vblank_reservation(struct host1x_client *client,
u32 syncpt_id);
-struct dma_fence *host1x_fence_create(struct host1x_syncpt *sp, u32 threshold);
+struct dma_fence *host1x_fence_create(struct host1x_syncpt *sp, u32 threshold,
+ bool timeout);
+void host1x_fence_cancel(struct dma_fence *fence);
/*
* host1x channel