xref: /linux/drivers/gpu/drm/xe/xe_guc_submit.h (revision 569d7db70e5dcf13fbf072f10e9096577ac1e565)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2022 Intel Corporation
4  */
5 
6 #ifndef _XE_GUC_SUBMIT_H_
7 #define _XE_GUC_SUBMIT_H_
8 
9 #include <linux/types.h>
10 
11 struct drm_printer;
12 struct xe_exec_queue;
13 struct xe_guc;
14 
15 int xe_guc_submit_init(struct xe_guc *guc, unsigned int num_ids);
16 
17 int xe_guc_submit_reset_prepare(struct xe_guc *guc);
18 void xe_guc_submit_reset_wait(struct xe_guc *guc);
19 void xe_guc_submit_stop(struct xe_guc *guc);
20 int xe_guc_submit_start(struct xe_guc *guc);
21 
22 int xe_guc_sched_done_handler(struct xe_guc *guc, u32 *msg, u32 len);
23 int xe_guc_deregister_done_handler(struct xe_guc *guc, u32 *msg, u32 len);
24 int xe_guc_exec_queue_reset_handler(struct xe_guc *guc, u32 *msg, u32 len);
25 int xe_guc_exec_queue_memory_cat_error_handler(struct xe_guc *guc, u32 *msg,
26 					       u32 len);
27 int xe_guc_exec_queue_reset_failure_handler(struct xe_guc *guc, u32 *msg, u32 len);
28 
29 struct xe_guc_submit_exec_queue_snapshot *
30 xe_guc_exec_queue_snapshot_capture(struct xe_exec_queue *q);
31 void
32 xe_guc_exec_queue_snapshot_capture_delayed(struct xe_guc_submit_exec_queue_snapshot *snapshot);
33 void
34 xe_guc_exec_queue_snapshot_print(struct xe_guc_submit_exec_queue_snapshot *snapshot,
35 				 struct drm_printer *p);
36 void
37 xe_guc_exec_queue_snapshot_free(struct xe_guc_submit_exec_queue_snapshot *snapshot);
38 void xe_guc_submit_print(struct xe_guc *guc, struct drm_printer *p);
39 
40 #endif
41