xref: /linux/drivers/media/platform/amd/isp4/isp4_debug.h (revision 8c13415c8a4383447c21ec832b20b3b283f0e01a)
1 /* SPDX-License-Identifier: GPL-2.0+ */
2 /*
3  * Copyright (C) 2025 Advanced Micro Devices, Inc.
4  */
5 
6 #ifndef _ISP4_DEBUG_H_
7 #define _ISP4_DEBUG_H_
8 
9 #include <linux/dev_printk.h>
10 #include <linux/printk.h>
11 
12 #include "isp4_subdev.h"
13 
14 #ifdef CONFIG_DEBUG_FS
15 struct isp4_device;
16 
17 void isp_debugfs_create(struct isp4_device *isp_dev);
18 void isp_debugfs_remove(struct isp4_device *isp_dev);
19 void isp_fw_log_print(struct isp4_subdev *isp);
20 
21 #else
22 
23 /* to avoid checkpatch warning */
24 #define isp_debugfs_create(cam) ((void)(cam))
25 #define isp_debugfs_remove(cam) ((void)(cam))
26 #define isp_fw_log_print(isp) ((void)(isp))
27 
28 #endif /* CONFIG_DEBUG_FS */
29 
30 void isp4dbg_show_bufmeta_info(struct device *dev, char *pre, void *p,
31 			       void *orig_buf /* struct sys_img_buf_handle */);
32 char *isp4dbg_get_img_fmt_str(int fmt /* enum _image_format_t */);
33 char *isp4dbg_get_out_ch_str(int ch /* enum _isp_pipe_out_ch_t */);
34 char *isp4dbg_get_cmd_str(u32 cmd);
35 char *isp4dbg_get_buf_type(u32 type);/* enum _buffer_type_t */
36 char *isp4dbg_get_resp_str(u32 resp);
37 char *isp4dbg_get_buf_src_str(u32 src);
38 char *isp4dbg_get_buf_done_str(u32 status);
39 char *isp4dbg_get_if_stream_str(u32 stream);
40 
41 #endif /* _ISP4_DEBUG_H_ */
42