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 / backend / gpu / mali_kbase_pm_always_on.h
CommitLineData
d25bc64b
JY
1/*
2 *
e0ce5fed 3 * (C) COPYRIGHT 2011-2015,2018 ARM Limited. All rights reserved.
d25bc64b
JY
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
d25bc64b
JY
20 *
21 */
22
23
24
d25bc64b
JY
25/*
26 * "Always on" power management policy
27 */
28
29#ifndef MALI_KBASE_PM_ALWAYS_ON_H
30#define MALI_KBASE_PM_ALWAYS_ON_H
31
32/**
33 * DOC:
34 * The "Always on" power management policy has the following
35 * characteristics:
36 *
37 * - When KBase indicates that the GPU will be powered up, but we don't yet
38 * know which Job Chains are to be run:
e0ce5fed 39 * Shader Cores are powered up, regardless of whether or not they will be
40 * needed later.
d25bc64b 41 *
e0ce5fed 42 * - When KBase indicates that Shader Cores are needed to submit the currently
43 * queued Job Chains:
44 * Shader Cores are kept powered, regardless of whether or not they will be
45 * needed
d25bc64b
JY
46 *
47 * - When KBase indicates that the GPU need not be powered:
48 * The Shader Cores are kept powered, regardless of whether or not they will
49 * be needed. The GPU itself is also kept powered, even though it is not
50 * needed.
51 *
52 * This policy is automatically overridden during system suspend: the desired
53 * core state is ignored, and the cores are forced off regardless of what the
54 * policy requests. After resuming from suspend, new changes to the desired
55 * core state made by the policy are honored.
56 *
57 * Note:
58 *
59 * - KBase indicates the GPU will be powered up when it has a User Process that
60 * has just started to submit Job Chains.
61 *
62 * - KBase indicates the GPU need not be powered when all the Job Chains from
63 * User Processes have finished, and it is waiting for a User Process to
64 * submit some more Job Chains.
65 */
66
67/**
68 * struct kbasep_pm_policy_always_on - Private struct for policy instance data
69 * @dummy: unused dummy variable
70 *
71 * This contains data that is private to the particular power policy that is
72 * active.
73 */
74struct kbasep_pm_policy_always_on {
75 int dummy;
76};
77
78extern const struct kbase_pm_policy kbase_pm_always_on_policy_ops;
79
80#endif /* MALI_KBASE_PM_ALWAYS_ON_H */
81