MALI: rockchip: upgrade midgard DDK to r14p0-01rel0
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / midgard / mali_kbase_regs_history_debugfs.h
1 /*
2  *
3  * (C) COPYRIGHT 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  * Header file for register access history support via debugfs
20  *
21  * This interface is made available via /sys/kernel/debug/mali#/regs_history*.
22  *
23  * Usage:
24  * - regs_history_enabled: whether recording of register accesses is enabled.
25  *   Write 'y' to enable, 'n' to disable.
26  * - regs_history_size: size of the register history buffer, must be > 0
27  * - regs_history: return the information about last accesses to the registers.
28  */
29
30 #ifndef _KBASE_REGS_HISTORY_DEBUGFS_H
31 #define _KBASE_REGS_HISTORY_DEBUGFS_H
32
33 struct kbase_device;
34
35 #if defined(CONFIG_DEBUG_FS) && !defined(CONFIG_MALI_NO_MALI)
36
37 /**
38  * kbasep_regs_history_debugfs_init - add debugfs entries for register history
39  *
40  * @kbdev: Pointer to kbase_device containing the register history
41  */
42 void kbasep_regs_history_debugfs_init(struct kbase_device *kbdev);
43
44 #else /* CONFIG_DEBUG_FS */
45
46 #define kbasep_regs_history_debugfs_init CSTD_NOP
47
48 #endif /* CONFIG_DEBUG_FS */
49
50 #endif  /*_KBASE_REGS_HISTORY_DEBUGFS_H*/