3 * (C) COPYRIGHT 2015 ARM Limited. All rights reserved.
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
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.
18 #define NR_BYTES_PER_CNT 4
19 #define NR_CNT_PER_BLOCK 64
21 #define JM_BASE (0 * NR_CNT_PER_BLOCK * NR_BYTES_PER_CNT)
22 #define TILER_BASE (1 * NR_CNT_PER_BLOCK * NR_BYTES_PER_CNT)
23 #define MMU_BASE (2 * NR_CNT_PER_BLOCK * NR_BYTES_PER_CNT)
24 #define SC0_BASE (3 * NR_CNT_PER_BLOCK * NR_BYTES_PER_CNT)
26 #define GPU_ACTIVE (JM_BASE + NR_BYTES_PER_CNT * 6)
27 #define TILER_ACTIVE (TILER_BASE + NR_BYTES_PER_CNT * 45)
28 #define L2_ANY_LOOKUP (MMU_BASE + NR_BYTES_PER_CNT * 25)
29 #define FRAG_ACTIVE (SC0_BASE + NR_BYTES_PER_CNT * 4)
30 #define EXEC_CORE_ACTIVE (SC0_BASE + NR_BYTES_PER_CNT * 26)
31 #define EXEC_INSTR_COUNT (SC0_BASE + NR_BYTES_PER_CNT * 28)
32 #define TEX_COORD_ISSUE (SC0_BASE + NR_BYTES_PER_CNT * 40)
33 #define VARY_SLOT_32 (SC0_BASE + NR_BYTES_PER_CNT * 50)
34 #define VARY_SLOT_16 (SC0_BASE + NR_BYTES_PER_CNT * 51)
35 #define BEATS_RD_LSC (SC0_BASE + NR_BYTES_PER_CNT * 56)
36 #define BEATS_WR_LSC (SC0_BASE + NR_BYTES_PER_CNT * 61)
38 static u32 calc_power_group0(struct kbase_ipa_context *ctx,
39 struct ipa_group *group);
40 static u32 calc_power_group1(struct kbase_ipa_context *ctx,
41 struct ipa_group *group);
42 static u32 calc_power_group2(struct kbase_ipa_context *ctx,
43 struct ipa_group *group);
44 static u32 calc_power_group3(struct kbase_ipa_context *ctx,
45 struct ipa_group *group);
46 static u32 calc_power_group4(struct kbase_ipa_context *ctx,
47 struct ipa_group *group);
48 static u32 calc_power_group5(struct kbase_ipa_context *ctx,
49 struct ipa_group *group);
50 static u32 calc_power_group6(struct kbase_ipa_context *ctx,
51 struct ipa_group *group);
52 static u32 calc_power_group7(struct kbase_ipa_context *ctx,
53 struct ipa_group *group);
55 static struct ipa_group ipa_groups_def[] = {
60 .calc_power = calc_power_group0,
66 .calc_power = calc_power_group1,
72 .calc_power = calc_power_group2,
78 .calc_power = calc_power_group3,
84 .calc_power = calc_power_group4,
90 .calc_power = calc_power_group5,
96 .calc_power = calc_power_group6,
102 .calc_power = calc_power_group7,