MALI: rockchip: upgrade midgard DDK to r13p0-00rel0
[firefly-linux-kernel-4.4.55.git] / drivers / gpu / arm / midgard / mali_kbase_as_fault_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 #ifndef _KBASE_AS_FAULT_DEBUG_FS_H
19 #define _KBASE_AS_FAULT_DEBUG_FS_H
20
21 /**
22  * kbase_as_fault_debugfs_init() - Add debugfs files for reporting page faults
23  *
24  * @kbdev: Pointer to kbase_device
25  */
26 void kbase_as_fault_debugfs_init(struct kbase_device *kbdev);
27
28 /**
29  * kbase_as_fault_debugfs_new() - make the last fault available on debugfs
30  *
31  * @kbdev: Pointer to kbase_device
32  * @as_no: The address space the fault occurred on
33  */
34 static inline void
35 kbase_as_fault_debugfs_new(struct kbase_device *kbdev, int as_no)
36 {
37 #ifdef CONFIG_DEBUG_FS
38 #ifdef CONFIG_MALI_DEBUG
39         kbdev->debugfs_as_read_bitmap |= (1ULL << as_no);
40 #endif /* CONFIG_DEBUG_FS */
41 #endif /* CONFIG_MALI_DEBUG */
42         return;
43 }
44
45 #endif  /*_KBASE_AS_FAULT_DEBUG_FS_H*/