xref: /OK3568_Linux_fs/kernel/drivers/gpu/arm/midgard/ipa/mali_kbase_ipa_debugfs.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /*
2  *
3  * (C) COPYRIGHT 2017 ARM Limited. All rights reserved.
4  *
5  * This program is free software and is provided to you under the terms of the
6  * GNU General Public License version 2 as published by the Free Software
7  * Foundation, and any use by you of this program is subject to the terms
8  * of such GNU licence.
9  *
10  * A copy of the licence is included with the program, and can also be obtained
11  * from Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
12  * Boston, MA  02110-1301, USA.
13  *
14  */
15 
16 
17 
18 #ifndef _KBASE_IPA_DEBUGFS_H_
19 #define _KBASE_IPA_DEBUGFS_H_
20 
21 enum kbase_ipa_model_param_type {
22 	PARAM_TYPE_S32 = 1,
23 	PARAM_TYPE_STRING,
24 };
25 
26 #ifdef CONFIG_DEBUG_FS
27 
28 void kbase_ipa_debugfs_init(struct kbase_device *kbdev);
29 int kbase_ipa_model_param_add(struct kbase_ipa_model *model, const char *name,
30 			      void *addr, size_t size,
31 			      enum kbase_ipa_model_param_type type);
32 void kbase_ipa_model_param_free_all(struct kbase_ipa_model *model);
33 
34 #else /* CONFIG_DEBUG_FS */
35 
kbase_ipa_model_param_add(struct kbase_ipa_model * model,const char * name,void * addr,size_t size,enum kbase_ipa_model_param_type type)36 static inline int kbase_ipa_model_param_add(struct kbase_ipa_model *model,
37 					    const char *name, void *addr,
38 					    size_t size,
39 					    enum kbase_ipa_model_param_type type)
40 {
41 	return 0;
42 }
43 
kbase_ipa_model_param_free_all(struct kbase_ipa_model * model)44 static inline void kbase_ipa_model_param_free_all(struct kbase_ipa_model *model)
45 { }
46 
47 #endif /* CONFIG_DEBUG_FS */
48 
49 #endif /* _KBASE_IPA_DEBUGFS_H_ */
50