[PATCH 02/12] etnaviv: support HI performance counters

Christian Gmeiner christian.gmeiner at gmail.com
Sun Mar 25 20:29:57 UTC 2018


Signed-off-by: Christian Gmeiner <christian.gmeiner at gmail.com>
---
 src/gallium/drivers/etnaviv/etnaviv_query_pm.c | 35 ++++++++++++++++++++++++++
 src/gallium/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 2b09e5dac1..2feca9d1dd 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 3d8cf1419b..ce823cf3bf 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.14.3



More information about the etnaviv mailing list