xref: /linux/drivers/gpu/drm/xe/xe_gsc_submit.h (revision db5d28c0bfe566908719bec8e25443aabecbb802)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2023 Intel Corporation
4  */
5 
6 #ifndef _XE_GSC_SUBMIT_H_
7 #define _XE_GSC_SUBMIT_H_
8 
9 #include <linux/types.h>
10 
11 struct iosys_map;
12 struct xe_device;
13 struct xe_gsc;
14 
15 u32 xe_gsc_emit_header(struct xe_device *xe, struct iosys_map *map, u32 offset,
16 		       u8 heci_client_id, u64 host_session_id, u32 payload_size);
17 void xe_gsc_poison_header(struct xe_device *xe, struct iosys_map *map, u32 offset);
18 
19 bool xe_gsc_check_and_update_pending(struct xe_device *xe,
20 				     struct iosys_map *in, u32 offset_in,
21 				     struct iosys_map *out, u32 offset_out);
22 
23 int xe_gsc_read_out_header(struct xe_device *xe,
24 			   struct iosys_map *map, u32 offset,
25 			   u32 min_payload_size,
26 			   u32 *payload_offset);
27 
28 int xe_gsc_pkt_submit_kernel(struct xe_gsc *gsc, u64 addr_in, u32 size_in,
29 			     u64 addr_out, u32 size_out);
30 
31 u64 xe_gsc_create_host_session_id(void);
32 #endif
33