summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_sema_service.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gsp_sema_service.h')
-rw-r--r--kernel/gsp_sema_service.h23
1 files changed, 23 insertions, 0 deletions
diff --git a/kernel/gsp_sema_service.h b/kernel/gsp_sema_service.h
index f6ec3fc..16a045f 100644
--- a/kernel/gsp_sema_service.h
+++ b/kernel/gsp_sema_service.h
@@ -10,6 +10,29 @@
* See gsp_sema_service.c for the full description.
*/
+/*
+ * A guest channel, registered when the driver allocates it. The service uses
+ * the channel's GPFIFO + USERD to notice submissions as they happen (instead
+ * of discovering the pushed work by scanning guest RAM) and to run the pushed
+ * work promptly.
+ *
+ * All addresses are guest-physical except gpfifo_va, which is the GPU VA of
+ * the channel's GPFIFO ring (translated through the discovered VA->PA map).
+ */
+struct sema_channel_desc {
+ u32 h_object;
+ u32 engine_type;
+ u64 gpfifo_va;
+ u32 gpfifo_entries;
+ u64 userd_pa; /* NvA06FControl: GPGet @0x88, GPPut @0x8c */
+ u32 userd_as; /* NV_ADDR_SYSMEM(1) / NV_ADDR_FBMEM(2) */
+ u64 instance_pa;
+ u64 notifier_pa;
+};
+
+void gsp_sema_service_channel_add(const struct sema_channel_desc *desc);
+void gsp_sema_service_channel_del(u32 h_object);
+
int gsp_sema_service_start(void);
void gsp_sema_service_stop(void);
int gsp_sema_service_probe(u64 gpu_va, u32 count);