xref: /linux/drivers/media/platform/qcom/venus/dbgfs.c (revision 9f2c9170934eace462499ba0bfe042cc72900173)
1 // SPDX-License-Identifier: GPL-2.0-only
2 /*
3  * Copyright (C) 2020 Linaro Ltd.
4  */
5 
6 #include <linux/debugfs.h>
7 #include <linux/fault-inject.h>
8 
9 #include "core.h"
10 
11 #ifdef CONFIG_FAULT_INJECTION
12 DECLARE_FAULT_ATTR(venus_ssr_attr);
13 #endif
14 
15 void venus_dbgfs_init(struct venus_core *core)
16 {
17 	core->root = debugfs_create_dir("venus", NULL);
18 	debugfs_create_x32("fw_level", 0644, core->root, &venus_fw_debug);
19 
20 #ifdef CONFIG_FAULT_INJECTION
21 	fault_create_debugfs_attr("fail_ssr", core->root, &venus_ssr_attr);
22 #endif
23 }
24 
25 void venus_dbgfs_deinit(struct venus_core *core)
26 {
27 	debugfs_remove_recursive(core->root);
28 }
29