summaryrefslogtreecommitdiffstats
path: root/kernel/gsp_rpc_client.h
diff options
context:
space:
mode:
Diffstat (limited to 'kernel/gsp_rpc_client.h')
-rw-r--r--kernel/gsp_rpc_client.h36
1 files changed, 36 insertions, 0 deletions
diff --git a/kernel/gsp_rpc_client.h b/kernel/gsp_rpc_client.h
index 64bfe5b..54c216e 100644
--- a/kernel/gsp_rpc_client.h
+++ b/kernel/gsp_rpc_client.h
@@ -314,4 +314,40 @@ int gsp_wpr_scratch_mutex_release(struct gsp_client *client, u32 wpr_id);
void gsp_rpc_emulation_set(bool enable);
bool gsp_rpc_emulation_is_enabled(void);
+/* Emulation implementations */
+int gsp_rpc_alloc_emul(struct gsp_client *client,
+ u64 size, u64 alignment, u32 mem_type,
+ u32 flags, u64 addr_hint, u32 pid,
+ u64 *gpu_va, u64 *handle, u64 *actual_size);
+int gsp_rpc_free_emul(struct gsp_client *client, u64 handle);
+int gsp_rpc_map_emul(struct gsp_client *client,
+ u64 handle, u64 gpu_va, u64 size,
+ u32 prot, u32 flags, u64 offset,
+ u64 *mapped_va);
+int gsp_rpc_unmap_emul(struct gsp_client *client, u64 handle, u64 gpu_va, u64 size);
+int gsp_rpc_pin_emul(struct gsp_client *client,
+ u64 handle, u64 offset, u64 size,
+ u32 flags, u64 *dma_addr, u32 *num_pages);
+int gsp_rpc_unpin_emul(struct gsp_client *client, u64 handle, u64 offset, u64 size);
+
+/* Notification */
+int gsp_rpc_notify_register(struct gsp_client *client,
+ u32 type,
+ void (*callback)(struct gsp_client *,
+ struct gsp_rpc_response *,
+ void *),
+ void *ctx);
+void gsp_rpc_notify_unregister(struct gsp_client *client, u32 type);
+void gsp_handle_notification(struct gsp_client *client, struct gsp_rpc_msg *msg);
+
+/* Client lifecycle */
+struct gsp_client *gsp_client_init(struct device *dev, phys_addr_t fw_base, phys_addr_t doorbell);
+void gsp_client_fini(struct gsp_client *client);
+
+/* WPR Management */
+int gsp_wpr_write_mutex_acquire(struct gsp_client *client, u32 wpr_id);
+int gsp_wpr_write_mutex_release(struct gsp_client *client, u32 wpr_id);
+int gsp_wpr_scratch_mutex_acquire(struct gsp_client *client, u32 wpr_id);
+int gsp_wpr_scratch_mutex_release(struct gsp_client *client, u32 wpr_id);
+
#endif /* _GSP_RPC_CLIENT_H_ */