summaryrefslogtreecommitdiff
path: root/drivers/gpu/host1x/cdma.h
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2023-01-19 15:09:19 +0200
committerThierry Reding <treding@nvidia.com>2023-01-26 15:55:38 +0100
commitc24973ed795fec5c12d8a822a0de99a4b7bab394 (patch)
tree3507e29c7b652925357359aeafde1298e0142826 /drivers/gpu/host1x/cdma.h
parentf0fb260a0cdb014b22a5f7733279c205f2cba62a (diff)
downloadlwn-c24973ed795fec5c12d8a822a0de99a4b7bab394.tar.gz
lwn-c24973ed795fec5c12d8a822a0de99a4b7bab394.zip
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 'drivers/gpu/host1x/cdma.h')
-rw-r--r--drivers/gpu/host1x/cdma.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/cdma.h b/drivers/gpu/host1x/cdma.h
index 12c4327c4df0..7fd8168af4f9 100644
--- a/drivers/gpu/host1x/cdma.h
+++ b/drivers/gpu/host1x/cdma.h
@@ -11,6 +11,7 @@
#include <linux/sched.h>
#include <linux/completion.h>
#include <linux/list.h>
+#include <linux/workqueue.h>
struct host1x_syncpt;
struct host1x_userctx_timeout;
@@ -69,6 +70,7 @@ struct host1x_cdma {
struct buffer_timeout timeout; /* channel's timeout state/wq */
bool running;
bool torndown;
+ struct work_struct update_work;
};
#define cdma_to_channel(cdma) container_of(cdma, struct host1x_channel, cdma)