xref: /linux/drivers/gpu/drm/xe/xe_devcoredump.h (revision a9f7b97ddae36d664d627b152d5c5a07b32ba816)
1 /* SPDX-License-Identifier: MIT */
2 /*
3  * Copyright © 2023 Intel Corporation
4  */
5 
6 #ifndef _XE_DEVCOREDUMP_H_
7 #define _XE_DEVCOREDUMP_H_
8 
9 #include <linux/types.h>
10 
11 struct drm_printer;
12 struct xe_device;
13 struct xe_exec_queue;
14 struct xe_sched_job;
15 
16 #ifdef CONFIG_DEV_COREDUMP
17 void xe_devcoredump(struct xe_exec_queue *q, struct xe_sched_job *job);
18 int xe_devcoredump_init(struct xe_device *xe);
19 #else
20 static inline void xe_devcoredump(struct xe_exec_queue *q,
21 				  struct xe_sched_job *job)
22 {
23 }
24 
25 static inline int xe_devcoredump_init(struct xe_device *xe)
26 {
27 	return 0;
28 }
29 #endif
30 
31 void xe_print_blob_ascii85(struct drm_printer *p, const char *prefix,
32 			   const void *blob, size_t offset, size_t size);
33 
34 #endif
35