Module: Mesa
Branch: master
Commit: d0bed0b4944dc2beb6371272c10fc1789ef5fa49
URL:    
http://cgit.freedesktop.org/mesa/mesa/commit/?id=d0bed0b4944dc2beb6371272c10fc1789ef5fa49

Author: Christian Gmeiner <christian.gmei...@gmail.com>
Date:   Sun Mar 25 22:29:57 2018 +0200

etnaviv: support HI performance counters

Signed-off-by: Christian Gmeiner <christian.gmei...@gmail.com>
Tested-by: Chris Healy <cphe...@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;

_______________________________________________
mesa-commit mailing list
mesa-commit@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/mesa-commit

Reply via email to