ac/perfcounter: update configuration of many blocks on GFX11

Signed-off-by: Samuel Pitoiset <samuel.pitoiset@gmail.com>
Part-of: <https://gitlab.freedesktop.org/mesa/mesa/-/merge_requests/39099>
This commit is contained in:
Samuel Pitoiset 2025-12-29 11:53:27 +01:00
parent 08f50f169b
commit 3c7ea1e4ca

View file

@ -123,6 +123,9 @@ static unsigned gfx11_GDS_select0[] = {
};
static unsigned gfx11_GDS_select1[] = {
R_036A10_GDS_PERFCOUNTER0_SELECT1,
R_036A14_GDS_PERFCOUNTER1_SELECT1,
R_036A18_GDS_PERFCOUNTER2_SELECT1,
R_036A1C_GDS_PERFCOUNTER3_SELECT1,
};
static struct ac_pc_block_base gfx11_GDS = {
.gpu_block = GDS,
@ -134,8 +137,8 @@ static struct ac_pc_block_base gfx11_GDS = {
.select1 = gfx11_GDS_select1,
.counter0_lo = R_034A00_GDS_PERFCOUNTER0_LO,
.num_spm_counters = 1,
.num_spm_wires = 2,
.num_spm_counters = 4,
.num_spm_wires = 8,
.spm_block_select = AC_SPM_GLOBAL_BLOCK_GDS,
};
@ -438,34 +441,26 @@ static struct ac_pc_block_base gfx11_GCR = {
/* GE */
static unsigned gfx11_GE_select0[] = {
R_036200_GE_PERFCOUNTER0_SELECT,
R_036208_GE_PERFCOUNTER1_SELECT,
R_036210_GE_PERFCOUNTER2_SELECT,
R_036218_GE_PERFCOUNTER3_SELECT,
R_036220_GE_PERFCOUNTER4_SELECT,
R_036228_GE_PERFCOUNTER5_SELECT,
R_036230_GE_PERFCOUNTER6_SELECT,
R_036238_GE_PERFCOUNTER7_SELECT,
R_036240_GE_PERFCOUNTER8_SELECT,
R_036248_GE_PERFCOUNTER9_SELECT,
R_036250_GE_PERFCOUNTER10_SELECT,
R_036258_GE_PERFCOUNTER11_SELECT,
R_036290_GE1_PERFCOUNTER0_SELECT,
R_036298_GE1_PERFCOUNTER1_SELECT,
R_0362A0_GE1_PERFCOUNTER2_SELECT,
R_0362A8_GE1_PERFCOUNTER3_SELECT,
};
static unsigned gfx11_GE_select1[] = {
R_036204_GE_PERFCOUNTER0_SELECT1,
R_03620C_GE_PERFCOUNTER1_SELECT1,
R_036214_GE_PERFCOUNTER2_SELECT1,
R_03621C_GE_PERFCOUNTER3_SELECT1,
R_036294_GE1_PERFCOUNTER0_SELECT1,
R_03629C_GE1_PERFCOUNTER1_SELECT1,
R_0362A4_GE1_PERFCOUNTER2_SELECT1,
R_0362AC_GE1_PERFCOUNTER3_SELECT1,
};
static struct ac_pc_block_base gfx11_GE = {
.gpu_block = GE,
.name = "GE",
.distribution = AC_PC_GLOBAL_BLOCK,
.num_counters = 12,
.num_counters = 4,
.select0 = gfx11_GE_select0,
.select1 = gfx11_GE_select1,
.counter0_lo = R_034200_GE_PERFCOUNTER0_LO,
.counter0_lo = R_034290_GE1_PERFCOUNTER0_LO,
.num_spm_counters = 4,
.num_spm_wires = 8,
@ -682,35 +677,28 @@ static struct ac_pc_block_base gfx11_RMI = {
/* SQ */
static unsigned gfx11_SQ_select0[] = {
R_036700_SQ_PERFCOUNTER0_SELECT,
R_036704_SQ_PERFCOUNTER1_SELECT,
R_036708_SQ_PERFCOUNTER2_SELECT,
R_03670C_SQ_PERFCOUNTER3_SELECT,
R_036710_SQ_PERFCOUNTER4_SELECT,
R_036714_SQ_PERFCOUNTER5_SELECT,
R_036718_SQ_PERFCOUNTER6_SELECT,
R_03671C_SQ_PERFCOUNTER7_SELECT,
R_036720_SQ_PERFCOUNTER8_SELECT,
R_036724_SQ_PERFCOUNTER9_SELECT,
R_036728_SQ_PERFCOUNTER10_SELECT,
R_03672C_SQ_PERFCOUNTER11_SELECT,
R_036730_SQ_PERFCOUNTER12_SELECT,
R_036734_SQ_PERFCOUNTER13_SELECT,
R_036738_SQ_PERFCOUNTER14_SELECT,
R_03673C_SQ_PERFCOUNTER15_SELECT,
R_036740_SQG_PERFCOUNTER0_SELECT,
R_036744_SQG_PERFCOUNTER1_SELECT,
R_036748_SQG_PERFCOUNTER2_SELECT,
R_03674C_SQG_PERFCOUNTER3_SELECT,
R_036750_SQG_PERFCOUNTER4_SELECT,
R_036754_SQG_PERFCOUNTER5_SELECT,
R_036758_SQG_PERFCOUNTER6_SELECT,
R_03675C_SQG_PERFCOUNTER7_SELECT,
};
static struct ac_pc_block_base gfx11_SQ = {
.gpu_block = SQ,
.name = "SQ",
.distribution = AC_PC_PER_SHADER_ENGINE,
.num_counters = 16,
.num_counters = 8,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_SHADER,
.select0 = gfx11_SQ_select0,
.select_or = S_036700_SQC_BANK_MASK(15),
.counter0_lo = R_034700_SQ_PERFCOUNTER0_LO,
.counter0_lo = R_034790_SQG_PERFCOUNTER0_LO,
.num_spm_wires = 16,
.num_spm_counters = 8,
.num_spm_wires = 8,
.spm_block_select = AC_SPM_SE_BLOCK_SQG,
};
@ -781,6 +769,24 @@ static struct ac_pc_block_base gfx11_GCEA = {
};
/* SQ_WQP */
static unsigned gfx11_SQ_WGP_select0[] = {
R_036700_SQ_PERFCOUNTER0_SELECT,
R_036704_SQ_PERFCOUNTER1_SELECT,
R_036708_SQ_PERFCOUNTER2_SELECT,
R_03670C_SQ_PERFCOUNTER3_SELECT,
R_036710_SQ_PERFCOUNTER4_SELECT,
R_036714_SQ_PERFCOUNTER5_SELECT,
R_036718_SQ_PERFCOUNTER6_SELECT,
R_03671C_SQ_PERFCOUNTER7_SELECT,
R_036720_SQ_PERFCOUNTER8_SELECT,
R_036724_SQ_PERFCOUNTER9_SELECT,
R_036728_SQ_PERFCOUNTER10_SELECT,
R_03672C_SQ_PERFCOUNTER11_SELECT,
R_036730_SQ_PERFCOUNTER12_SELECT,
R_036734_SQ_PERFCOUNTER13_SELECT,
R_036738_SQ_PERFCOUNTER14_SELECT,
R_03673C_SQ_PERFCOUNTER15_SELECT,
};
static struct ac_pc_block_base gfx11_SQ_WGP = {
.gpu_block = SQ_WGP,
.name = "SQ_WGP",
@ -788,7 +794,7 @@ static struct ac_pc_block_base gfx11_SQ_WGP = {
.num_counters = 16,
.flags = AC_PC_BLOCK_SE | AC_PC_BLOCK_SHADER,
.select0 = gfx11_SQ_select0,
.select0 = gfx11_SQ_WGP_select0,
.counter0_lo = R_034700_SQ_PERFCOUNTER0_LO,
.num_spm_counters = 8,