diff options
author | Mikko Perttunen <mperttunen@nvidia.com> | 2023-01-19 15:09:19 +0200 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2023-01-26 15:55:38 +0100 |
commit | c24973ed795fec5c12d8a822a0de99a4b7bab394 (patch) | |
tree | 3507e29c7b652925357359aeafde1298e0142826 /include | |
parent | f0fb260a0cdb014b22a5f7733279c205f2cba62a (diff) |
gpu: host1x: Implement job tracking using DMA fences
In anticipation of removal of the intr API, implement job tracking
using DMA fences instead. The main two things about this are
making cdma_update schedule the work since fence completion can
now be called from interrupt context, and some complication in
ensuring the callback is not running when we free the fence.
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.h | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/include/linux/host1x.h b/include/linux/host1x.h index dc55d9d3b94f..db6cf6f34361 100644 --- a/include/linux/host1x.h +++ b/include/linux/host1x.h @@ -8,6 +8,7 @@ #include <linux/device.h> #include <linux/dma-direction.h> +#include <linux/dma-fence.h> #include <linux/spinlock.h> #include <linux/types.h> @@ -288,8 +289,9 @@ struct host1x_job { u32 syncpt_incrs; u32 syncpt_end; - /* Completion waiter ref */ - void *waiter; + /* Completion fence for job tracking */ + struct dma_fence *fence; + struct dma_fence_cb fence_cb; /* Maximum time to wait for this job */ unsigned int timeout; |