From d0bed0b4944dc2beb6371272c10fc1789ef5fa49 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Sun, 25 Mar 2018 22:29:57 +0200 Subject: [PATCH] etnaviv: support HI performance counters Signed-off-by: Christian Gmeiner Tested-by: Chris Healy --- .../drivers/etnaviv/etnaviv_query_pm.c | 35 +++++++++++++++++++ .../drivers/etnaviv/etnaviv_query_pm.h | 6 ++++ 2 files changed, 41 insertions(+) diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c index 2b09e5dac14..2feca9d1dd9 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c +++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c @@ -46,6 +46,41 @@ struct etna_perfmon_config }; static const struct etna_perfmon_config query_config[] = { + { + .name = "hi-total-cyles", + .type = ETNA_QUERY_HI_TOTAL_CYCLES, + .source = (const struct etna_perfmon_source[]) { + { "HI", "TOTAL_CYCLES" } + } + }, + { + .name = "hi-idle-cyles", + .type = ETNA_QUERY_HI_IDLE_CYCLES, + .source = (const struct etna_perfmon_source[]) { + { "HI", "IDLE_CYCLES" } + } + }, + { + .name = "hi-axi-cycles-read-request-stalled", + .type = ETNA_QUERY_HI_AXI_CYCLES_READ_REQUEST_STALLED, + .source = (const struct etna_perfmon_source[]) { + { "HI", "AXI_CYCLES_READ_REQUEST_STALLED" } + } + }, + { + .name = "hi-axi-cycles-write-request-stalled", + .type = ETNA_QUERY_HI_AXI_CYCLES_WRITE_REQUEST_STALLED, + .source = (const struct etna_perfmon_source[]) { + { "HI", "AXI_CYCLES_WRITE_REQUEST_STALLED" } + } + }, + { + .name = "hi-axi-cycles-write-data-stalled", + .type = ETNA_QUERY_HI_AXI_CYCLES_WRITE_DATA_STALLED, + .source = (const struct etna_perfmon_source[]) { + { "HI", "AXI_CYCLES_WRITE_DATA_STALLED" } + } + } }; static const struct etna_perfmon_config * diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h index 3d8cf1419bd..ce823cf3bfc 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h +++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h @@ -33,6 +33,12 @@ struct etna_screen; +#define ETNA_QUERY_HI_TOTAL_CYCLES (ETNA_PM_QUERY_BASE + 0) +#define ETNA_QUERY_HI_IDLE_CYCLES (ETNA_PM_QUERY_BASE + 1) +#define ETNA_QUERY_HI_AXI_CYCLES_READ_REQUEST_STALLED (ETNA_PM_QUERY_BASE + 2) +#define ETNA_QUERY_HI_AXI_CYCLES_WRITE_REQUEST_STALLED (ETNA_PM_QUERY_BASE + 3) +#define ETNA_QUERY_HI_AXI_CYCLES_WRITE_DATA_STALLED (ETNA_PM_QUERY_BASE + 4) + struct etna_pm_query { struct etna_query base; struct etna_perfmon_signal *signal; -- 2.30.2