diff options
author | Mikko Perttunen <mperttunen@nvidia.com> | 2021-06-10 14:04:45 +0300 |
---|---|---|
committer | Thierry Reding <treding@nvidia.com> | 2021-08-10 14:41:19 +0200 |
commit | e902585fc8b639f1a1258eaa6265e98994e34ef8 (patch) | |
tree | 58bb0fab112f61f6bfcc198d36a0e0cd5d98a516 /include/linux/host1x.h | |
parent | 17a298e9ac7c011e64a9c0b6f807b43f9af22eac (diff) |
gpu: host1x: Add support for syncpoint waits in CDMA pushbuffer
Add support for inserting syncpoint waits in the CDMA pushbuffer.
These waits need to be done in HOST1X class, while gather submitted
by the application execute in engine class.
Support is added by converting the gather list of job into a command
list that can include both gathers and waits. When the job is
submitted, these commands are pushed as the appropriate opcodes
on the CDMA pushbuffer.
Also supported are waits relative to the start of the job,
which are useful for jobs doing multiple things with an engine
that doesn't natively support pipelining.
While at it, use 32-bit waits on chips that support them.
Signed-off-by: Mikko Perttunen <mperttunen@nvidia.com>
Signed-off-by: Thierry Reding <treding@nvidia.com>
Diffstat (limited to 'include/linux/host1x.h')
-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 57271ab1fee8..2127762fc63d 100644 --- a/include/linux/host1x.h +++ b/include/linux/host1x.h @@ -218,8 +218,8 @@ struct host1x_job { struct host1x_client *client; /* Gathers and their memory */ - struct host1x_job_gather *gathers; - unsigned int num_gathers; + struct host1x_job_cmd *cmds; + unsigned int num_cmds; /* Array of handles to be pinned & unpinned */ struct host1x_reloc *relocs; @@ -278,6 +278,8 @@ struct host1x_job *host1x_job_alloc(struct host1x_channel *ch, u32 num_cmdbufs, u32 num_relocs); void host1x_job_add_gather(struct host1x_job *job, struct host1x_bo *bo, unsigned int words, unsigned int offset); +void host1x_job_add_wait(struct host1x_job *job, u32 id, u32 thresh, + bool relative, u32 next_class); struct host1x_job *host1x_job_get(struct host1x_job *job); void host1x_job_put(struct host1x_job *job); int host1x_job_pin(struct host1x_job *job, struct device *dev); |