MALI: rockchip: upgrade midgard DDK to r13p0-00rel0
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / midgard / mali_kbase_mem_profile_debugfs.h
1 /*
2  *
3  * (C) COPYRIGHT 2012-2016 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 <linux/debugfs.h>
30 #include <linux/seq_file.h>
31
32 /**
33  * @brief Remove entry from Mali memory profile debugfs
34  */
35 void kbasep_mem_profile_debugfs_remove(struct kbase_context *kctx);
36
37 /**
38  * @brief Insert @p data to the debugfs file so it can be read by userspace
39  *
40  * The function takes ownership of @p data and frees it later when new data
41  * is inserted.
42  *
43  * If the debugfs entry corresponding to the @p kctx doesn't exist,
44  * an attempt will be made to create it.
45  *
46  * @param kctx The context whose debugfs file @p data should be inserted to
47  * @param data A NULL-terminated string to be inserted to the debugfs file,
48  *             without the trailing new line character
49  * @param size The length of the @p data string
50  * @return 0 if @p data inserted correctly
51  *         -EAGAIN in case of error
52  * @post @ref mem_profile_initialized will be set to @c true
53  *       the first time this function succeeds.
54  */
55 int kbasep_mem_profile_debugfs_insert(struct kbase_context *kctx, char *data,
56                                         size_t size);
57
58 #endif  /*_KBASE_MEM_PROFILE_DEBUGFS_H*/
59