Merge branch android-common-3.10
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / midgard / mali_kbase_mem_profile_debugfs.h
1 /*
2  *
3  * (C) COPYRIGHT 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
19
20 /**
21  * @file mali_kbase_mem_profile_debugfs.h
22  * Header file for mem profiles entries in debugfs
23  *
24  */
25
26 #ifndef _KBASE_MEM_PROFILE_DEBUGFS_H
27 #define _KBASE_MEM_PROFILE_DEBUGFS_H
28
29 #include <mali_kbase.h>
30 #include <linux/debugfs.h>
31 #include <linux/seq_file.h>
32
33 /**
34  * @brief Add new entry to Mali memory profile debugfs
35  */
36 mali_error kbasep_mem_profile_debugfs_add(struct kbase_context *kctx);
37
38 /**
39  * @brief Remove entry from Mali memory profile debugfs
40  */
41 void kbasep_mem_profile_debugfs_remove(struct kbase_context *kctx);
42
43 /**
44  * @brief Insert data to debugfs file, so it can be read by userspce
45  *
46  * Function takes ownership of @c data and frees it later when new data
47  * are inserted.
48  *
49  * @param kctx Context to which file data should be inserted
50  * @param data NULL-terminated string to be inserted to mem_profile file,
51                 without trailing new line character
52  * @param size @c buf length
53  */
54 void kbasep_mem_profile_debugfs_insert(struct kbase_context *kctx, char *data,
55                 size_t size);
56
57 #endif  /*_KBASE_MEM_PROFILE_DEBUGFS_H*/
58