xref: /OK3568_Linux_fs/kernel/include/uapi/gpu/arm/bifrost/csf/mali_kbase_csf_errors_dumpfault.h (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1 /* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
2 /*
3  *
4  * (C) COPYRIGHT 2022 ARM Limited. All rights reserved.
5  *
6  * This program is free software and is provided to you under the terms of the
7  * GNU General Public License version 2 as published by the Free Software
8  * Foundation, and any use by you of this program is subject to the terms
9  * of such GNU license.
10  *
11  * This program is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this program; if not, you can access it online at
18  * http://www.gnu.org/licenses/gpl-2.0.html.
19  *
20  */
21 
22 #ifndef _UAPI_KBASE_CSF_ERRORS_DUMPFAULT_H_
23 #define _UAPI_KBASE_CSF_ERRORS_DUMPFAULT_H_
24 
25 /**
26  * enum dumpfault_error_type - Enumeration to define errors to be dumped
27  *
28  * @DF_NO_ERROR:                       No pending error
29  * @DF_CSG_SUSPEND_TIMEOUT:            CSG suspension timeout
30  * @DF_CSG_TERMINATE_TIMEOUT:          CSG group termination timeout
31  * @DF_CSG_START_TIMEOUT:              CSG start timeout
32  * @DF_CSG_RESUME_TIMEOUT:             CSG resume timeout
33  * @DF_CSG_EP_CFG_TIMEOUT:             CSG end point configuration timeout
34  * @DF_CSG_STATUS_UPDATE_TIMEOUT:      CSG status update timeout
35  * @DF_PROGRESS_TIMER_TIMEOUT:         Progress timer timeout
36  * @DF_FW_INTERNAL_ERROR:              Firmware internal error
37  * @DF_CS_FATAL:                       CS fatal error
38  * @DF_CS_FAULT:                       CS fault error
39  * @DF_FENCE_WAIT_TIMEOUT:             Fence wait timeout
40  * @DF_PROTECTED_MODE_EXIT_TIMEOUT:    P.mode exit timeout
41  * @DF_PROTECTED_MODE_ENTRY_FAILURE:   P.mode entrance failure
42  * @DF_PING_REQUEST_TIMEOUT:           Ping request timeout
43  * @DF_CORE_DOWNSCALE_REQUEST_TIMEOUT: DCS downscale request timeout
44  * @DF_TILER_OOM:                      Tiler Out-of-memory error
45  * @DF_GPU_PAGE_FAULT:                 GPU page fault
46  * @DF_BUS_FAULT:                      MMU BUS Fault
47  * @DF_GPU_PROTECTED_FAULT:            GPU P.mode fault
48  * @DF_AS_ACTIVE_STUCK:                AS active stuck
49  * @DF_GPU_SOFT_RESET_FAILURE:         GPU soft reset falure
50  *
51  * This is used for kbase to notify error type of an event whereby
52  * user space client will dump relevant debugging information via debugfs.
53  * @DF_NO_ERROR is used to indicate no pending fault, thus the client will
54  * be blocked on reading debugfs file till a fault happens.
55  */
56 enum dumpfault_error_type {
57 	DF_NO_ERROR = 0,
58 	DF_CSG_SUSPEND_TIMEOUT,
59 	DF_CSG_TERMINATE_TIMEOUT,
60 	DF_CSG_START_TIMEOUT,
61 	DF_CSG_RESUME_TIMEOUT,
62 	DF_CSG_EP_CFG_TIMEOUT,
63 	DF_CSG_STATUS_UPDATE_TIMEOUT,
64 	DF_PROGRESS_TIMER_TIMEOUT,
65 	DF_FW_INTERNAL_ERROR,
66 	DF_CS_FATAL,
67 	DF_CS_FAULT,
68 	DF_FENCE_WAIT_TIMEOUT,
69 	DF_PROTECTED_MODE_EXIT_TIMEOUT,
70 	DF_PROTECTED_MODE_ENTRY_FAILURE,
71 	DF_PING_REQUEST_TIMEOUT,
72 	DF_CORE_DOWNSCALE_REQUEST_TIMEOUT,
73 	DF_TILER_OOM,
74 	DF_GPU_PAGE_FAULT,
75 	DF_BUS_FAULT,
76 	DF_GPU_PROTECTED_FAULT,
77 	DF_AS_ACTIVE_STUCK,
78 	DF_GPU_SOFT_RESET_FAILURE,
79 };
80 
81 #endif /* _UAPI_KBASE_CSF_ERRORS_DUMPFAULT_H_ */
82