xref: /linux/drivers/accel/ivpu/ivpu_coredump.h (revision 7f71507851fc7764b36a3221839607d3a45c2025)
1 /* SPDX-License-Identifier: GPL-2.0-only */
2 /*
3  * Copyright (C) 2020-2024 Intel Corporation
4  */
5 
6 #ifndef __IVPU_COREDUMP_H__
7 #define __IVPU_COREDUMP_H__
8 
9 #include <drm/drm_print.h>
10 
11 #include "ivpu_drv.h"
12 #include "ivpu_fw_log.h"
13 
14 #ifdef CONFIG_DEV_COREDUMP
15 void ivpu_dev_coredump(struct ivpu_device *vdev);
16 #else
17 static inline void ivpu_dev_coredump(struct ivpu_device *vdev)
18 {
19 	struct drm_printer p = drm_info_printer(vdev->drm.dev);
20 
21 	ivpu_fw_log_print(vdev, false, &p);
22 }
23 #endif
24 
25 #endif /* __IVPU_COREDUMP_H__ */
26