From 4020fa3e0854690cb43f17a379a508ad44f806c2 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Sun, 25 Mar 2018 22:30:04 +0200 Subject: [PATCH] etnaviv: support MC performance counters Signed-off-by: Christian Gmeiner Tested-by: Chris Healy --- .../drivers/etnaviv/etnaviv_query_pm.c | 21 +++++++++++++++++++ .../drivers/etnaviv/etnaviv_query_pm.h | 4 ++++ 2 files changed, 25 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c index 88485b5640f..6d3c9e2d00c 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c +++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c @@ -339,6 +339,27 @@ static const struct etna_perfmon_config query_config[] = { .source = (const struct etna_perfmon_source[]) { { "TX", "CACHE_MISS_TEXEL_COUNT" } } + }, + { + .name = "mc-total-read-req-8b-from-pipeline", + .type = ETNA_QUERY_MC_TOTAL_READ_REQ_8B_FROM_PIPELINE, + .source = (const struct etna_perfmon_source[]) { + { "MC", "TOTAL_READ_REQ_8B_FROM_PIPELINE" } + } + }, + { + .name = "mc-total-read-req-8b-from-ip", + .type = ETNA_QUERY_MC_TOTAL_READ_REQ_8B_FROM_IP, + .source = (const struct etna_perfmon_source[]) { + { "MC", "TOTAL_READ_REQ_8B_FROM_IP" } + } + }, + { + .name = "mc-total-write-req-8b-from-pipeline", + .type = ETNA_QUERY_MC_TOTAL_WRITE_REQ_8B_FROM_PIPELINE, + .source = (const struct etna_perfmon_source[]) { + { "MC", "TOTAL_WRITE_REQ_8B_FROM_PIPELINE" } + } } }; diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h index 9cfd06e0eca..f6d27ee4065 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h +++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h @@ -83,6 +83,10 @@ struct etna_screen; #define ETNA_QUERY_TX_CACHE_HIT_TEXEL_COUNT (ETNA_PM_QUERY_BASE + 41) #define ETNA_QUERY_TX_CACHE_MISS_TEXEL_COUNT (ETNA_PM_QUERY_BASE + 42) +#define ETNA_QUERY_MC_TOTAL_READ_REQ_8B_FROM_PIPELINE (ETNA_PM_QUERY_BASE + 43) +#define ETNA_QUERY_MC_TOTAL_READ_REQ_8B_FROM_IP (ETNA_PM_QUERY_BASE + 44) +#define ETNA_QUERY_MC_TOTAL_WRITE_REQ_8B_FROM_PIPELINE (ETNA_PM_QUERY_BASE + 45) + struct etna_pm_query { struct etna_query base; struct etna_perfmon_signal *signal; -- 2.30.2