From 1f603402f6f279549853f24a634da9ecd0a15027 Mon Sep 17 00:00:00 2001 From: Christian Gmeiner Date: Sun, 25 Mar 2018 22:29:58 +0200 Subject: etnaviv: support PE performance counters Signed-off-by: Christian Gmeiner Tested-by: Chris Healy --- src/gallium/drivers/etnaviv/etnaviv_query_pm.c | 28 ++++++++++++++++++++++++++ src/gallium/drivers/etnaviv/etnaviv_query_pm.h | 6 ++++++ 2 files changed, 34 insertions(+) (limited to 'src/gallium/drivers/etnaviv') diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c index 2feca9d1dd9..9be65cc6c5c 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.c +++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.c @@ -80,6 +80,34 @@ static const struct etna_perfmon_config query_config[] = { .source = (const struct etna_perfmon_source[]) { { "HI", "AXI_CYCLES_WRITE_DATA_STALLED" } } + }, + { + .name = "pe-pixel-count-killed-by-color-pipe", + .type = ETNA_QUERY_PE_PIXEL_COUNT_KILLED_BY_COLOR_PIPE, + .source = (const struct etna_perfmon_source[]) { + { "PE", "PIXEL_COUNT_KILLED_BY_COLOR_PIPE" } + } + }, + { + .name = "pe-pixel-count-killed-by-depth-pipe", + .type = ETNA_QUERY_PE_PIXEL_COUNT_KILLED_BY_DEPTH_PIPE, + .source = (const struct etna_perfmon_source[]) { + { "PE", "PIXEL_COUNT_KILLED_BY_DEPTH_PIPE" } + } + }, + { + .name = "pe-pixel-count-drawn-by-color-pipe", + .type = ETNA_QUERY_PE_PIXEL_COUNT_DRAWN_BY_COLOR_PIPE, + .source = (const struct etna_perfmon_source[]) { + { "PE", "PIXEL_COUNT_DRAWN_BY_COLOR_PIPE" } + } + }, + { + .name = "pe-pixel-count-drawn-by-depth-pipe", + .type = ETNA_QUERY_PE_PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE, + .source = (const struct etna_perfmon_source[]) { + { "PE", "PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE" } + } } }; diff --git a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h index ce823cf3bfc..77fb37b3338 100644 --- a/src/gallium/drivers/etnaviv/etnaviv_query_pm.h +++ b/src/gallium/drivers/etnaviv/etnaviv_query_pm.h @@ -39,6 +39,12 @@ struct etna_screen; #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) +#define ETNA_QUERY_PE_PIXEL_COUNT_KILLED_BY_COLOR_PIPE (ETNA_PM_QUERY_BASE + 5) +#define ETNA_QUERY_PE_PIXEL_COUNT_KILLED_BY_DEPTH_PIPE (ETNA_PM_QUERY_BASE + 6) +#define ETNA_QUERY_PE_PIXEL_COUNT_DRAWN_BY_COLOR_PIPE (ETNA_PM_QUERY_BASE + 7) +#define ETNA_QUERY_PE_PIXEL_COUNT_DRAWN_BY_DEPTH_PIPE (ETNA_PM_QUERY_BASE + 8) +#define ETNA_QUERY_PE_PIXELS_RENDERED_2D (ETNA_PM_QUERY_BASE + 9) + struct etna_pm_query { struct etna_query base; struct etna_perfmon_signal *signal; -- cgit v1.2.3