gpu: intergration of midgard r28p0 kernel driver [2/3]
[GitHub/LineageOS/G12/android_hardware_amlogic_kernel-modules_mali-driver.git] / t83x / kernel / drivers / gpu / arm / midgard / mali_kbase_as_fault_debugfs.h
CommitLineData
51f89798
JY
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 *
e0ce5fed 10 * This program is distributed in the hope that it will be useful,
11 * but WITHOUT ANY WARRANTY; without even the implied warranty of
12 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
13 * GNU General Public License for more details.
14 *
15 * You should have received a copy of the GNU General Public License
16 * along with this program; if not, you can access it online at
17 * http://www.gnu.org/licenses/gpl-2.0.html.
18 *
19 * SPDX-License-Identifier: GPL-2.0
51f89798
JY
20 *
21 */
22
51f89798
JY
23#ifndef _KBASE_AS_FAULT_DEBUG_FS_H
24#define _KBASE_AS_FAULT_DEBUG_FS_H
25
26/**
27 * kbase_as_fault_debugfs_init() - Add debugfs files for reporting page faults
28 *
29 * @kbdev: Pointer to kbase_device
30 */
31void kbase_as_fault_debugfs_init(struct kbase_device *kbdev);
32
33/**
34 * kbase_as_fault_debugfs_new() - make the last fault available on debugfs
35 *
36 * @kbdev: Pointer to kbase_device
37 * @as_no: The address space the fault occurred on
38 */
39static inline void
40kbase_as_fault_debugfs_new(struct kbase_device *kbdev, int as_no)
41{
42#ifdef CONFIG_DEBUG_FS
43#ifdef CONFIG_MALI_DEBUG
44 kbdev->debugfs_as_read_bitmap |= (1ULL << as_no);
45#endif /* CONFIG_DEBUG_FS */
46#endif /* CONFIG_MALI_DEBUG */
47 return;
48}
49
50#endif /*_KBASE_AS_FAULT_DEBUG_FS_H*/