summaryrefslogtreecommitdiff
path: root/drivers/gpu/host1x/hw/host1x06_hardware.h
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 /drivers/gpu/host1x/hw/host1x06_hardware.h
parent8aa5bcb61612060429223d1fbb7a1c30a579fc1f (diff)
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 'drivers/gpu/host1x/hw/host1x06_hardware.h')
-rw-r--r--drivers/gpu/host1x/hw/host1x06_hardware.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/drivers/gpu/host1x/hw/host1x06_hardware.h b/drivers/gpu/host1x/hw/host1x06_hardware.h
index 01a142a09800..5d515745eee7 100644
--- a/drivers/gpu/host1x/hw/host1x06_hardware.h
+++ b/drivers/gpu/host1x/hw/host1x06_hardware.h
@@ -127,6 +127,16 @@ static inline u32 host1x_opcode_gather_incr(unsigned offset, unsigned count)
return (6 << 28) | (offset << 16) | BIT(15) | BIT(14) | count;
}
+static inline u32 host1x_opcode_setstreamid(unsigned streamid)
+{
+ return (7 << 28) | streamid;
+}
+
+static inline u32 host1x_opcode_setpayload(unsigned payload)
+{
+ return (9 << 28) | payload;
+}
+
static inline u32 host1x_opcode_gather_wide(unsigned count)
{
return (12 << 28) | count;