hc
2024-05-16 8d2a02b24d66aa359e83eebc1ed3c0f85367a1cb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
/* SPDX-License-Identifier: GPL-2.0 WITH Linux-syscall-note */
/*
 *
 * (C) COPYRIGHT 2018-2021 ARM Limited. All rights reserved.
 *
 * This program is free software and is provided to you under the terms of the
 * GNU General Public License version 2 as published by the Free Software
 * Foundation, and any use by you of this program is subject to the terms
 * of such GNU license.
 *
 * This program is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
 * GNU General Public License for more details.
 *
 * You should have received a copy of the GNU General Public License
 * along with this program; if not, you can access it online at
 * http://www.gnu.org/licenses/gpl-2.0.html.
 *
 */
 
/*
 * Backend-specific Power Manager shader core state definitions.
 * The function-like macro KBASEP_SHADER_STATE() must be defined before
 * including this header file. This header file can be included multiple
 * times in the same compilation unit with different definitions of
 * KBASEP_SHADER_STATE().
 *
 * @OFF_CORESTACK_OFF:                The shaders and core stacks are off
 * @OFF_CORESTACK_PEND_ON:            The shaders are off, core stacks have been
 *                                    requested to power on and hwcnt is being
 *                                    disabled
 * @PEND_ON_CORESTACK_ON:             Core stacks are on, shaders have been
 *                                    requested to power on. Or after doing
 *                                    partial shader on/off, checking whether
 *                                    it's the desired state.
 * @ON_CORESTACK_ON:                  The shaders and core stacks are on, and
 *                                    hwcnt already enabled.
 * @ON_CORESTACK_ON_RECHECK:          The shaders and core stacks are on, hwcnt
 *                                    disabled, and checks to powering down or
 *                                    re-enabling hwcnt.
 * @WAIT_OFF_CORESTACK_ON:            The shaders have been requested to power
 *                                    off, but they remain on for the duration
 *                                    of the hysteresis timer
 * @WAIT_GPU_IDLE:                    The shaders partial poweroff needs to
 *                                    reach a state where jobs on the GPU are
 *                                    finished including jobs currently running
 *                                    and in the GPU queue because of
 *                                    GPU2017-861
 * @WAIT_FINISHED_CORESTACK_ON:       The hysteresis timer has expired
 * @L2_FLUSHING_CORESTACK_ON:         The core stacks are on and the level 2
 *                                    cache is being flushed.
 * @READY_OFF_CORESTACK_ON:           The core stacks are on and the shaders are
 *                                    ready to be powered off.
 * @PEND_OFF_CORESTACK_ON:            The core stacks are on, and the shaders
 *                                    have been requested to power off
 * @OFF_CORESTACK_PEND_OFF:           The shaders are off, and the core stacks
 *                                    have been requested to power off
 * @OFF_CORESTACK_OFF_TIMER_PEND_OFF: Shaders and corestacks are off, but the
 *                                    tick timer cancellation is still pending.
 * @RESET_WAIT:                       The GPU is resetting, shader and core
 *                                    stack power states are unknown
 */
KBASEP_SHADER_STATE(OFF_CORESTACK_OFF)
KBASEP_SHADER_STATE(OFF_CORESTACK_PEND_ON)
KBASEP_SHADER_STATE(PEND_ON_CORESTACK_ON)
KBASEP_SHADER_STATE(ON_CORESTACK_ON)
KBASEP_SHADER_STATE(ON_CORESTACK_ON_RECHECK)
KBASEP_SHADER_STATE(WAIT_OFF_CORESTACK_ON)
#if !MALI_USE_CSF
KBASEP_SHADER_STATE(WAIT_GPU_IDLE)
#endif /* !MALI_USE_CSF */
KBASEP_SHADER_STATE(WAIT_FINISHED_CORESTACK_ON)
KBASEP_SHADER_STATE(L2_FLUSHING_CORESTACK_ON)
KBASEP_SHADER_STATE(READY_OFF_CORESTACK_ON)
KBASEP_SHADER_STATE(PEND_OFF_CORESTACK_ON)
KBASEP_SHADER_STATE(OFF_CORESTACK_PEND_OFF)
KBASEP_SHADER_STATE(OFF_CORESTACK_OFF_TIMER_PEND_OFF)
KBASEP_SHADER_STATE(RESET_WAIT)