mirror of
https://gitlab.freedesktop.org/mesa/mesa.git
synced 2026-05-07 02:48:06 +02:00
freedreno/registers: Add gen8 perfcntrs
BV_RB and BV_CCU are supported on some devices (knp, but not glymur or pakala, for ex).. we don't have a way to deal with that yet. This doesn't yet _expose_ gen8 perfcntrs. That small patch will come after PERFCNTR_CONFIG ioctl is supported to ensure that everything gen8 and later supports the new kernel based counter collection/reservation (so that backwards compat of old userspace on new kernel is limited to a7xx and earlier). Signed-off-by: Rob Clark <rob.clark@oss.qualcomm.com> Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/40522>
This commit is contained in:
parent
ff41a00fab
commit
d2c4653ee9
5 changed files with 256 additions and 0 deletions
11
src/freedreno/perfcntrs/fd8_perfcntr.c
Normal file
11
src/freedreno/perfcntrs/fd8_perfcntr.c
Normal file
|
|
@ -0,0 +1,11 @@
|
|||
/*
|
||||
* Copyright © 2024 Igalia S.L.
|
||||
* SPDX-License-Identifier: MIT
|
||||
*/
|
||||
|
||||
#include "util/u_math.h"
|
||||
|
||||
#include "fd6_hw.h"
|
||||
|
||||
#include "freedreno_perfcntr.h"
|
||||
#include "a8xx_perfcntrs.json.h"
|
||||
|
|
@ -22,6 +22,9 @@ extern const unsigned a6xx_num_perfcntr_groups;
|
|||
extern const struct fd_perfcntr_group a7xx_perfcntr_groups[];
|
||||
extern const unsigned a7xx_num_perfcntr_groups;
|
||||
|
||||
extern const struct fd_perfcntr_group a8xx_perfcntr_groups[];
|
||||
extern const unsigned a8xx_num_perfcntr_groups;
|
||||
|
||||
const struct fd_perfcntr_group *
|
||||
fd_perfcntrs(const struct fd_dev_id *id, unsigned *count)
|
||||
{
|
||||
|
|
|
|||
|
|
@ -6,6 +6,7 @@ libfreedreno_perfcntrs_files = files(
|
|||
'fd5_perfcntr.c',
|
||||
'fd6_perfcntr.c',
|
||||
'fd7_perfcntr.c',
|
||||
'fd8_perfcntr.c',
|
||||
'freedreno_dt.c',
|
||||
'freedreno_dt.h',
|
||||
'freedreno_perfcntr.c',
|
||||
|
|
|
|||
240
src/freedreno/registers/adreno/a8xx_perfcntrs.json
Normal file
240
src/freedreno/registers/adreno/a8xx_perfcntrs.json
Normal file
|
|
@ -0,0 +1,240 @@
|
|||
{
|
||||
"chip": "A8XX",
|
||||
"groups": [
|
||||
{
|
||||
"name": "CP",
|
||||
"num": 14,
|
||||
"reserved": [ 0 ],
|
||||
"select": "CP_PERFCTR_CP_SEL",
|
||||
"counter": "RBBM_PERFCTR_CP",
|
||||
"countable_type": "a8xx_cp_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "RBBM",
|
||||
"num": 4,
|
||||
"select": "RBBM_PERFCTR_RBBM_SEL",
|
||||
"slice_select": [ "RBBM_SLICE_PERFCTR_RBBM_SEL" ],
|
||||
"counter": "RBBM_PERFCTR_RBBM",
|
||||
"countable_type": "a8xx_rbbm_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "PC",
|
||||
"pipe": "BR",
|
||||
"num": 8,
|
||||
"select": "PC_PERFCTR_PC_SEL",
|
||||
"slice_select": [ "PC_SLICE_PERFCTR_PC_SEL" ],
|
||||
"counter": "RBBM_PERFCTR_PC",
|
||||
"countable_type": "a8xx_pc_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "VFD",
|
||||
"pipe": "BR",
|
||||
"num": 8,
|
||||
"select": "VFD_PERFCTR_VFD_SEL",
|
||||
"counter": "RBBM_PERFCTR_VFD",
|
||||
"countable_type": "a8xx_vfd_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "HLSQ",
|
||||
"pipe": "BR",
|
||||
"num": 6,
|
||||
"select": "SP_PERFCTR_HLSQ_SEL",
|
||||
"slice_select": [ "SP_PERFCTR_HLSQ_SEL_2" ],
|
||||
"counter": "RBBM_PERFCTR_HLSQ",
|
||||
"countable_type": "a8xx_hlsq_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "VPC",
|
||||
"pipe": "BR",
|
||||
"num": 6,
|
||||
"select": "VPC_PERFCTR_VPC_SEL",
|
||||
"slice_select": [ "VPC_PERFCTR_VPC_SEL_1", "VPC_PERFCTR_VPC_SEL_2" ],
|
||||
"counter": "RBBM_PERFCTR_VPC",
|
||||
"countable_type": "a8xx_vpc_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "TSE",
|
||||
"pipe": "BR",
|
||||
"num": 4,
|
||||
"select": "GRAS_PERFCTR_TSE_SEL",
|
||||
"slice_select": [ "GRAS_PERFCTR_TSEFE_SEL" ],
|
||||
"counter": "RBBM_PERFCTR_TSE",
|
||||
"countable_type": "a8xx_tse_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "RAS",
|
||||
"pipe": "BR",
|
||||
"num": 4,
|
||||
"select": "GRAS_PERFCTR_RAS_SEL",
|
||||
"counter": "RBBM_PERFCTR_RAS",
|
||||
"countable_type": "a8xx_ras_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "UCHE",
|
||||
"num": 12,
|
||||
"select": "UCHE_PERFCTR_UCHE_SEL",
|
||||
"counter": "RBBM_PERFCTR_UCHE",
|
||||
"countable_type": "a8xx_uche_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "TP",
|
||||
"pipe": "BR",
|
||||
"num": 12,
|
||||
"select": "TPL1_PERFCTR_TP_SEL",
|
||||
"counter": "RBBM_PERFCTR_TP",
|
||||
"countable_type": "a8xx_tp_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "SP",
|
||||
"pipe": "BR",
|
||||
"num": 24,
|
||||
"select": "SP_PERFCTR_SP_SEL",
|
||||
"counter": "RBBM_PERFCTR_SP",
|
||||
"countable_type": "a8xx_sp_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "RB",
|
||||
"pipe": "BR",
|
||||
"num": 8,
|
||||
"select": "RB_PERFCTR_RB_SEL",
|
||||
"counter": "RBBM_PERFCTR_RB",
|
||||
"countable_type": "a8xx_rb_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "VSC",
|
||||
"num": 2,
|
||||
"select": "VSC_PERFCTR_VSC_SEL",
|
||||
"counter": "RBBM_PERFCTR_VSC",
|
||||
"countable_type": "a8xx_vsc_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "CCU",
|
||||
"pipe": "BR",
|
||||
"num": 5,
|
||||
"select": "RB_PERFCTR_CCU_SEL",
|
||||
"counter": "RBBM_PERFCTR_CCU",
|
||||
"countable_type": "a8xx_ccu_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "LRZ",
|
||||
"pipe": "BR",
|
||||
"num": 4,
|
||||
"select": "GRAS_PERFCTR_LRZ_SEL",
|
||||
"counter": "RBBM_PERFCTR_LRZ",
|
||||
"countable_type": "a8xx_lrz_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "CMP",
|
||||
"num": 4,
|
||||
"select": "RB_PERFCTR_CMP_SEL",
|
||||
"counter": "RBBM_PERFCTR_CMP",
|
||||
"countable_type": "a8xx_cmp_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "UFC",
|
||||
"pipe": "BR",
|
||||
"num": 4,
|
||||
"select": "RB_PERFCTR_UFC_SEL",
|
||||
"counter": "RBBM_PERFCTR_UFC",
|
||||
"countable_type": "a8xx_ufc_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "BV_CP",
|
||||
"num": 7,
|
||||
"select_offset": 14,
|
||||
"select": "CP_PERFCTR_CP_SEL",
|
||||
"counter": "RBBM_PERFCTR2_CP",
|
||||
"countable_type": "a8xx_cp_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "BV_PC",
|
||||
"pipe": "BV",
|
||||
"num": 8,
|
||||
"select_offset": 8,
|
||||
"select": "PC_PERFCTR_PC_SEL",
|
||||
"slice_select": [ "PC_SLICE_PERFCTR_PC_SEL" ],
|
||||
"counter": "RBBM_PERFCTR_BV_PC",
|
||||
"countable_type": "a8xx_pc_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "BV_VFD",
|
||||
"pipe": "BV",
|
||||
"num": 8,
|
||||
"select_offset": 8,
|
||||
"select": "VFD_PERFCTR_VFD_SEL",
|
||||
"counter": "RBBM_PERFCTR_BV_VFD",
|
||||
"countable_type": "a8xx_vfd_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "BV_VPC",
|
||||
"pipe": "BV",
|
||||
"num": 6,
|
||||
"select_offset": 6,
|
||||
"select": "VPC_PERFCTR_VPC_SEL",
|
||||
"slice_select": [ "VPC_PERFCTR_VPC_SEL_1", "VPC_PERFCTR_VPC_SEL_2" ],
|
||||
"counter": "RBBM_PERFCTR_BV_VPC",
|
||||
"countable_type": "a8xx_vpc_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "BV_TP",
|
||||
"pipe": "BV",
|
||||
"num": 8,
|
||||
"select_offset": 12,
|
||||
"select": "TPL1_PERFCTR_TP_SEL",
|
||||
"counter": "RBBM_PERFCTR2_TP",
|
||||
"countable_type": "a8xx_tp_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "BV_SP",
|
||||
"pipe": "BV",
|
||||
"num": 12,
|
||||
"select_offset": 24,
|
||||
"select": "SP_PERFCTR_SP_SEL",
|
||||
"counter": "RBBM_PERFCTR2_SP",
|
||||
"countable_type": "a8xx_sp_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "BV_UFC",
|
||||
"pipe": "BV",
|
||||
"num": 2,
|
||||
"select_offset": 4,
|
||||
"select": "RB_PERFCTR_UFC_SEL",
|
||||
"counter": "RBBM_PERFCTR2_UFC",
|
||||
"countable_type": "a8xx_ufc_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "BV_TSE",
|
||||
"pipe": "BV",
|
||||
"num": 4,
|
||||
"select": "GRAS_PERFCTR_TSE_SEL",
|
||||
"slice_select": [ "GRAS_PERFCTR_TSEFE_SEL" ],
|
||||
"counter": "RBBM_PERFCTR_BV_TSE",
|
||||
"countable_type": "a8xx_tse_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "BV_RAS",
|
||||
"pipe": "BV",
|
||||
"num": 4,
|
||||
"select": "GRAS_PERFCTR_RAS_SEL",
|
||||
"counter": "RBBM_PERFCTR_BV_RAS",
|
||||
"countable_type": "a8xx_ras_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "BV_LRZ",
|
||||
"pipe": "BV",
|
||||
"num": 4,
|
||||
"select": "GRAS_PERFCTR_LRZ_SEL",
|
||||
"counter": "RBBM_PERFCTR_BV_LRZ",
|
||||
"countable_type": "a8xx_lrz_perfcounter_select"
|
||||
},
|
||||
{
|
||||
"name": "BV_HLSQ",
|
||||
"pipe": "BV",
|
||||
"num": 6,
|
||||
"select": "SP_PERFCTR_HLSQ_SEL",
|
||||
"slice_select": [ "SP_PERFCTR_HLSQ_SEL_2" ],
|
||||
"counter": "RBBM_PERFCTR2_HLSQ",
|
||||
"countable_type": "a8xx_hlsq_perfcounter_select"
|
||||
}
|
||||
]
|
||||
}
|
||||
|
|
@ -22,6 +22,7 @@ perfcntr_files = [
|
|||
[ 'a5xx.xml', 'a5xx_perfcntrs.json' ],
|
||||
[ 'a6xx.xml', 'a6xx_perfcntrs.json' ],
|
||||
[ 'a6xx.xml', 'a7xx_perfcntrs.json' ],
|
||||
[ 'a6xx.xml', 'a8xx_perfcntrs.json' ],
|
||||
]
|
||||
|
||||
xml_files = xml_reg_files
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue