aboutsummaryrefslogtreecommitdiffstats
path: root/include
diff options
context:
space:
mode:
authorMikko Perttunen <mperttunen@nvidia.com>2022-06-27 17:19:49 +0300
committerThierry Reding <treding@nvidia.com>2022-07-08 16:27:52 +0200
commit2486254781eab6f6119fabea78f11386c54460d2 (patch)
tree7f62533a047ef5c2738ac425a3ddc33f55c85aa3 /include
parentgpu: host1x: Add context device management code (diff)
downloadlinux-dev-2486254781eab6f6119fabea78f11386c54460d2.tar.xz
linux-dev-2486254781eab6f6119fabea78f11386c54460d2.zip
gpu: host1x: Program context stream ID on submission
Add code to do stream ID switching at the beginning of a job. The stream ID is switched to the stream ID specified by the context passed in the job structure. Before switching the stream ID, an OP_DONE wait is done on the channel's engine to ensure that there is no residual ongoing work that might do DMA using the new stream ID. 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.h8
1 files changed, 8 insertions, 0 deletions
diff --git a/include/linux/host1x.h b/include/linux/host1x.h
index 32a82da13fed..cb2100d9b0ff 100644
--- a/include/linux/host1x.h
+++ b/include/linux/host1x.h
@@ -327,6 +327,14 @@ struct host1x_job {
/* Whether host1x-side firewall should be ran for this job or not */
bool enable_firewall;
+
+ /* Options for configuring engine data stream ID */
+ /* Context device to use for job */
+ struct host1x_memory_context *memory_context;
+ /* Stream ID to use if context isolation is disabled (!memory_context) */
+ u32 engine_fallback_streamid;
+ /* Engine offset to program stream ID to */
+ u32 engine_streamid_offset;
};
struct host1x_job *host1x_job_alloc(struct host1x_channel *ch,