mirror of
https://github.com/lkl/linux.git
synced 2025-12-19 16:13:19 +09:00
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>
This commit is contained in:
committed by
Thierry Reding
parent
f0fb260a0c
commit
c24973ed79
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user