mirror of
https://github.com/followmsi/android_kernel_google_msm.git
synced 2024-11-06 23:17:41 +00:00
msm: kgsl: Restructure performance counters
Restructure the performance counter mechanism by combining the two structures declared for it. The 2 structures can only refer to a single counter hence it is easier to manage by having them under a single structure. Change-Id: I19d13cf5aa619b85a332b383b464c2af65ad38c9 Signed-off-by: Shubhraprakash Das <sadas@codeaurora.org>
This commit is contained in:
parent
3f85725c9d
commit
589ae1ef24
3 changed files with 132 additions and 190 deletions
|
@ -325,8 +325,7 @@ int adreno_perfcounter_read_group(struct adreno_device *adreno_dev,
|
|||
if (group->regs[i].countable == list[j].countable) {
|
||||
list[j].value =
|
||||
adreno_dev->gpudev->perfcounter_read(
|
||||
adreno_dev, list[j].groupid,
|
||||
i, group->regs[i].offset);
|
||||
adreno_dev, list[j].groupid, i);
|
||||
break;
|
||||
}
|
||||
}
|
||||
|
|
|
@ -207,12 +207,16 @@ enum adreno_device_flags {
|
|||
* @kernelcount: number of user space users of the register
|
||||
* @usercount: number of kernel users of the register
|
||||
* @offset: register hardware offset
|
||||
* @load_bit: The bit number in LOAD register which corresponds to this counter
|
||||
* @select: The countable register offset
|
||||
*/
|
||||
struct adreno_perfcount_register {
|
||||
unsigned int countable;
|
||||
unsigned int kernelcount;
|
||||
unsigned int usercount;
|
||||
unsigned int offset;
|
||||
int load_bit;
|
||||
unsigned int select;
|
||||
};
|
||||
|
||||
/**
|
||||
|
@ -235,6 +239,9 @@ struct adreno_perfcounters {
|
|||
unsigned int group_count;
|
||||
};
|
||||
|
||||
#define ADRENO_PERFCOUNTER_GROUP(core, name) { core##_perfcounters_##name, \
|
||||
ARRAY_SIZE(core##_perfcounters_##name) }
|
||||
|
||||
/**
|
||||
* adreno_regs: List of registers that are used in kgsl driver for all
|
||||
* 3D devices. Each device type has different offset value for the same
|
||||
|
@ -361,8 +368,7 @@ struct adreno_gpudev {
|
|||
void (*perfcounter_enable)(struct adreno_device *, unsigned int group,
|
||||
unsigned int counter, unsigned int countable);
|
||||
uint64_t (*perfcounter_read)(struct adreno_device *adreno_dev,
|
||||
unsigned int group, unsigned int counter,
|
||||
unsigned int offset);
|
||||
unsigned int group, unsigned int counter);
|
||||
int (*coresight_enable) (struct kgsl_device *device);
|
||||
void (*coresight_disable) (struct kgsl_device *device);
|
||||
void (*coresight_config_debug_reg) (struct kgsl_device *device,
|
||||
|
|
|
@ -3147,117 +3147,6 @@ static void a3xx_cp_callback(struct adreno_device *adreno_dev, int irq)
|
|||
adreno_dispatcher_schedule(device);
|
||||
}
|
||||
|
||||
/**
|
||||
* struct a3xx_perfcounter_register - Define a performance counter register
|
||||
* @load_bit: the bit to set in RBBM_LOAD_CMD0/RBBM_LOAD_CMD1 to force the RBBM
|
||||
* to load the reset value into the appropriate counter
|
||||
* @select: The dword offset of the register to write the selected
|
||||
* countable into
|
||||
*/
|
||||
|
||||
struct a3xx_perfcounter_register {
|
||||
unsigned int load_bit;
|
||||
unsigned int select;
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_cp[] = {
|
||||
{ 0, A3XX_CP_PERFCOUNTER_SELECT },
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_rbbm[] = {
|
||||
{ 1, A3XX_RBBM_PERFCOUNTER0_SELECT },
|
||||
{ 2, A3XX_RBBM_PERFCOUNTER1_SELECT },
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_pc[] = {
|
||||
{ 3, A3XX_PC_PERFCOUNTER0_SELECT },
|
||||
{ 4, A3XX_PC_PERFCOUNTER1_SELECT },
|
||||
{ 5, A3XX_PC_PERFCOUNTER2_SELECT },
|
||||
{ 6, A3XX_PC_PERFCOUNTER3_SELECT },
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_vfd[] = {
|
||||
{ 7, A3XX_VFD_PERFCOUNTER0_SELECT },
|
||||
{ 8, A3XX_VFD_PERFCOUNTER1_SELECT },
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_hlsq[] = {
|
||||
{ 9, A3XX_HLSQ_PERFCOUNTER0_SELECT },
|
||||
{ 10, A3XX_HLSQ_PERFCOUNTER1_SELECT },
|
||||
{ 11, A3XX_HLSQ_PERFCOUNTER2_SELECT },
|
||||
{ 12, A3XX_HLSQ_PERFCOUNTER3_SELECT },
|
||||
{ 13, A3XX_HLSQ_PERFCOUNTER4_SELECT },
|
||||
{ 14, A3XX_HLSQ_PERFCOUNTER5_SELECT },
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_vpc[] = {
|
||||
{ 15, A3XX_VPC_PERFCOUNTER0_SELECT },
|
||||
{ 16, A3XX_VPC_PERFCOUNTER1_SELECT },
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_tse[] = {
|
||||
{ 17, A3XX_GRAS_PERFCOUNTER0_SELECT },
|
||||
{ 18, A3XX_GRAS_PERFCOUNTER1_SELECT },
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_ras[] = {
|
||||
{ 19, A3XX_GRAS_PERFCOUNTER2_SELECT },
|
||||
{ 20, A3XX_GRAS_PERFCOUNTER3_SELECT },
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_uche[] = {
|
||||
{ 21, A3XX_UCHE_PERFCOUNTER0_SELECT },
|
||||
{ 22, A3XX_UCHE_PERFCOUNTER1_SELECT },
|
||||
{ 23, A3XX_UCHE_PERFCOUNTER2_SELECT },
|
||||
{ 24, A3XX_UCHE_PERFCOUNTER3_SELECT },
|
||||
{ 25, A3XX_UCHE_PERFCOUNTER4_SELECT },
|
||||
{ 26, A3XX_UCHE_PERFCOUNTER5_SELECT },
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_tp[] = {
|
||||
{ 27, A3XX_TP_PERFCOUNTER0_SELECT },
|
||||
{ 28, A3XX_TP_PERFCOUNTER1_SELECT },
|
||||
{ 29, A3XX_TP_PERFCOUNTER2_SELECT },
|
||||
{ 30, A3XX_TP_PERFCOUNTER3_SELECT },
|
||||
{ 31, A3XX_TP_PERFCOUNTER4_SELECT },
|
||||
{ 32, A3XX_TP_PERFCOUNTER5_SELECT },
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_sp[] = {
|
||||
{ 33, A3XX_SP_PERFCOUNTER0_SELECT },
|
||||
{ 34, A3XX_SP_PERFCOUNTER1_SELECT },
|
||||
{ 35, A3XX_SP_PERFCOUNTER2_SELECT },
|
||||
{ 36, A3XX_SP_PERFCOUNTER3_SELECT },
|
||||
{ 37, A3XX_SP_PERFCOUNTER4_SELECT },
|
||||
{ 38, A3XX_SP_PERFCOUNTER5_SELECT },
|
||||
{ 39, A3XX_SP_PERFCOUNTER6_SELECT },
|
||||
{ 40, A3XX_SP_PERFCOUNTER7_SELECT },
|
||||
};
|
||||
|
||||
static struct a3xx_perfcounter_register a3xx_perfcounter_reg_rb[] = {
|
||||
{ 41, A3XX_RB_PERFCOUNTER0_SELECT },
|
||||
{ 42, A3XX_RB_PERFCOUNTER1_SELECT },
|
||||
};
|
||||
|
||||
#define REGCOUNTER_GROUP(_x) { (_x), ARRAY_SIZE((_x)) }
|
||||
|
||||
static struct {
|
||||
struct a3xx_perfcounter_register *regs;
|
||||
int count;
|
||||
} a3xx_perfcounter_reglist[] = {
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_cp),
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_rbbm),
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_pc),
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_vfd),
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_hlsq),
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_vpc),
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_tse),
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_ras),
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_uche),
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_tp),
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_sp),
|
||||
REGCOUNTER_GROUP(a3xx_perfcounter_reg_rb),
|
||||
};
|
||||
|
||||
static void a3xx_perfcounter_enable_pwr(struct kgsl_device *device,
|
||||
unsigned int countable)
|
||||
|
@ -3356,7 +3245,7 @@ static void a3xx_perfcounter_enable(struct adreno_device *adreno_dev,
|
|||
{
|
||||
struct kgsl_device *device = &adreno_dev->dev;
|
||||
unsigned int val = 0;
|
||||
struct a3xx_perfcounter_register *reg;
|
||||
struct adreno_perfcount_register *reg;
|
||||
|
||||
/* Special cases */
|
||||
if (group == KGSL_PERFCOUNTER_GROUP_PWR)
|
||||
|
@ -3366,13 +3255,14 @@ static void a3xx_perfcounter_enable(struct adreno_device *adreno_dev,
|
|||
else if (group == KGSL_PERFCOUNTER_GROUP_VBIF_PWR)
|
||||
return a3xx_perfcounter_enable_vbif_pwr(device, countable);
|
||||
|
||||
if (group >= ARRAY_SIZE(a3xx_perfcounter_reglist))
|
||||
if (group >= adreno_dev->gpudev->perfcounters->group_count)
|
||||
return;
|
||||
|
||||
if (counter >= a3xx_perfcounter_reglist[group].count)
|
||||
if (counter >=
|
||||
adreno_dev->gpudev->perfcounters->groups[group].reg_count)
|
||||
return;
|
||||
|
||||
reg = &(a3xx_perfcounter_reglist[group].regs[counter]);
|
||||
reg = &(adreno_dev->gpudev->perfcounters->groups[group].regs[counter]);
|
||||
|
||||
/* Select the desired perfcounter */
|
||||
kgsl_regwrite(device, reg->select, countable);
|
||||
|
@ -3387,27 +3277,29 @@ static void a3xx_perfcounter_enable(struct adreno_device *adreno_dev,
|
|||
}
|
||||
|
||||
static uint64_t a3xx_perfcounter_read(struct adreno_device *adreno_dev,
|
||||
unsigned int group, unsigned int counter,
|
||||
unsigned int offset)
|
||||
unsigned int group, unsigned int counter)
|
||||
{
|
||||
struct kgsl_device *device = &adreno_dev->dev;
|
||||
struct a3xx_perfcounter_register *reg = NULL;
|
||||
struct adreno_perfcount_register *reg;
|
||||
unsigned int lo = 0, hi = 0;
|
||||
unsigned int val;
|
||||
unsigned int offset;
|
||||
|
||||
if (group >= ARRAY_SIZE(a3xx_perfcounter_reglist))
|
||||
if (group >= adreno_dev->gpudev->perfcounters->group_count)
|
||||
return 0;
|
||||
|
||||
if (counter >= a3xx_perfcounter_reglist[group].count)
|
||||
if (counter >=
|
||||
adreno_dev->gpudev->perfcounters->groups[group].reg_count)
|
||||
return 0;
|
||||
|
||||
reg = &(a3xx_perfcounter_reglist[group].regs[counter]);
|
||||
reg = &(adreno_dev->gpudev->perfcounters->groups[group].regs[counter]);
|
||||
|
||||
/* Freeze the counter */
|
||||
kgsl_regread(device, A3XX_RBBM_PERFCTR_CTL, &val);
|
||||
val &= ~reg->load_bit;
|
||||
kgsl_regwrite(device, A3XX_RBBM_PERFCTR_CTL, val);
|
||||
|
||||
offset = reg->offset;
|
||||
/* Read the values */
|
||||
kgsl_regread(device, offset, &lo);
|
||||
kgsl_regread(device, offset + 1, &hi);
|
||||
|
@ -3689,115 +3581,160 @@ const struct adreno_vbif_platform a3xx_vbif_platforms[] = {
|
|||
*/
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_cp[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_CP_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_CP_0_LO,
|
||||
0, A3XX_CP_PERFCOUNTER_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_rbbm[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RBBM_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RBBM_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RBBM_0_LO,
|
||||
1, A3XX_RBBM_PERFCOUNTER0_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RBBM_1_LO,
|
||||
2, A3XX_RBBM_PERFCOUNTER1_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_pc[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PC_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PC_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PC_2_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PC_3_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PC_0_LO,
|
||||
3, A3XX_PC_PERFCOUNTER0_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PC_1_LO,
|
||||
4, A3XX_PC_PERFCOUNTER1_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PC_2_LO,
|
||||
5, A3XX_PC_PERFCOUNTER2_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PC_3_LO,
|
||||
6, A3XX_PC_PERFCOUNTER3_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_vfd[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_VFD_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_VFD_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_VFD_0_LO,
|
||||
7, A3XX_VFD_PERFCOUNTER0_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_VFD_1_LO,
|
||||
8, A3XX_VFD_PERFCOUNTER1_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_hlsq[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_2_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_3_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_4_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_5_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_0_LO,
|
||||
9, A3XX_HLSQ_PERFCOUNTER0_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_1_LO,
|
||||
10, A3XX_HLSQ_PERFCOUNTER1_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_2_LO,
|
||||
11, A3XX_HLSQ_PERFCOUNTER2_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_3_LO,
|
||||
12, A3XX_HLSQ_PERFCOUNTER3_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_4_LO,
|
||||
13, A3XX_HLSQ_PERFCOUNTER4_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_HLSQ_5_LO,
|
||||
14, A3XX_HLSQ_PERFCOUNTER5_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_vpc[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_VPC_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_VPC_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_VPC_0_LO,
|
||||
15, A3XX_VPC_PERFCOUNTER0_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_VPC_1_LO,
|
||||
16, A3XX_VPC_PERFCOUNTER1_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_tse[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TSE_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TSE_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TSE_0_LO,
|
||||
17, A3XX_GRAS_PERFCOUNTER0_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TSE_1_LO,
|
||||
18, A3XX_GRAS_PERFCOUNTER1_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_ras[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RAS_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RAS_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RAS_0_LO,
|
||||
19, A3XX_GRAS_PERFCOUNTER2_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RAS_1_LO,
|
||||
20, A3XX_GRAS_PERFCOUNTER3_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_uche[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_2_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_3_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_4_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_5_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_0_LO,
|
||||
21, A3XX_UCHE_PERFCOUNTER0_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_1_LO,
|
||||
22, A3XX_UCHE_PERFCOUNTER1_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_2_LO,
|
||||
23, A3XX_UCHE_PERFCOUNTER2_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_3_LO,
|
||||
24, A3XX_UCHE_PERFCOUNTER3_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_4_LO,
|
||||
25, A3XX_UCHE_PERFCOUNTER4_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_UCHE_5_LO,
|
||||
26, A3XX_UCHE_PERFCOUNTER5_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_tp[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_2_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_3_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_4_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_5_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_0_LO,
|
||||
27, A3XX_TP_PERFCOUNTER0_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_1_LO,
|
||||
28, A3XX_TP_PERFCOUNTER1_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_2_LO,
|
||||
29, A3XX_TP_PERFCOUNTER2_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_3_LO,
|
||||
30, A3XX_TP_PERFCOUNTER3_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_4_LO,
|
||||
31, A3XX_TP_PERFCOUNTER4_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_TP_5_LO,
|
||||
32, A3XX_TP_PERFCOUNTER5_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_sp[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_2_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_3_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_4_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_5_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_6_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_7_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_0_LO,
|
||||
33, A3XX_SP_PERFCOUNTER0_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_1_LO,
|
||||
34, A3XX_SP_PERFCOUNTER1_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_2_LO,
|
||||
35, A3XX_SP_PERFCOUNTER2_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_3_LO,
|
||||
36, A3XX_SP_PERFCOUNTER3_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_4_LO,
|
||||
37, A3XX_SP_PERFCOUNTER4_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_5_LO,
|
||||
38, A3XX_SP_PERFCOUNTER5_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_6_LO,
|
||||
39, A3XX_SP_PERFCOUNTER6_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_SP_7_LO,
|
||||
40, A3XX_SP_PERFCOUNTER7_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_rb[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RB_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RB_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RB_0_LO,
|
||||
41, A3XX_RB_PERFCOUNTER0_SELECT },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_RB_1_LO,
|
||||
42, A3XX_RB_PERFCOUNTER1_SELECT },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_pwr[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PWR_0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PWR_1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PWR_0_LO,
|
||||
-1, 0 },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_RBBM_PERFCTR_PWR_1_LO,
|
||||
-1, 0 },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_vbif[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_VBIF_PERF_CNT0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_VBIF_PERF_CNT1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_VBIF_PERF_CNT0_LO, -1, 0 },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_VBIF_PERF_CNT1_LO, -1, 0 },
|
||||
};
|
||||
static struct adreno_perfcount_register a3xx_perfcounters_vbif_pwr[] = {
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_VBIF_PERF_PWR_CNT0_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_VBIF_PERF_PWR_CNT1_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_VBIF_PERF_PWR_CNT2_LO },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_VBIF_PERF_PWR_CNT0_LO, -1, 0 },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_VBIF_PERF_PWR_CNT1_LO, -1, 0 },
|
||||
{ KGSL_PERFCOUNTER_NOT_USED, 0, 0, A3XX_VBIF_PERF_PWR_CNT2_LO, -1, 0 },
|
||||
};
|
||||
|
||||
static struct adreno_perfcount_group a3xx_perfcounter_groups[] = {
|
||||
{ a3xx_perfcounters_cp, ARRAY_SIZE(a3xx_perfcounters_cp) },
|
||||
{ a3xx_perfcounters_rbbm, ARRAY_SIZE(a3xx_perfcounters_rbbm) },
|
||||
{ a3xx_perfcounters_pc, ARRAY_SIZE(a3xx_perfcounters_pc) },
|
||||
{ a3xx_perfcounters_vfd, ARRAY_SIZE(a3xx_perfcounters_vfd) },
|
||||
{ a3xx_perfcounters_hlsq, ARRAY_SIZE(a3xx_perfcounters_hlsq) },
|
||||
{ a3xx_perfcounters_vpc, ARRAY_SIZE(a3xx_perfcounters_vpc) },
|
||||
{ a3xx_perfcounters_tse, ARRAY_SIZE(a3xx_perfcounters_tse) },
|
||||
{ a3xx_perfcounters_ras, ARRAY_SIZE(a3xx_perfcounters_ras) },
|
||||
{ a3xx_perfcounters_uche, ARRAY_SIZE(a3xx_perfcounters_uche) },
|
||||
{ a3xx_perfcounters_tp, ARRAY_SIZE(a3xx_perfcounters_tp) },
|
||||
{ a3xx_perfcounters_sp, ARRAY_SIZE(a3xx_perfcounters_sp) },
|
||||
{ a3xx_perfcounters_rb, ARRAY_SIZE(a3xx_perfcounters_rb) },
|
||||
{ a3xx_perfcounters_pwr, ARRAY_SIZE(a3xx_perfcounters_pwr) },
|
||||
{ a3xx_perfcounters_vbif, ARRAY_SIZE(a3xx_perfcounters_vbif) },
|
||||
{ a3xx_perfcounters_vbif_pwr, ARRAY_SIZE(a3xx_perfcounters_vbif_pwr) },
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, cp),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, rbbm),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, pc),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, vfd),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, hlsq),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, vpc),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, tse),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, ras),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, uche),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, tp),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, sp),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, rb),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, pwr),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, vbif),
|
||||
ADRENO_PERFCOUNTER_GROUP(a3xx, vbif_pwr),
|
||||
};
|
||||
|
||||
static struct adreno_perfcounters a3xx_perfcounters = {
|
||||
|
|
Loading…
Reference in a new issue