etnaviv: support PE performance counters
authorChristian Gmeiner <christian.gmeiner@gmail.com>
Sun, 25 Mar 2018 20:29:58 +0000 (22:29 +0200)
committerChristian Gmeiner <christian.gmeiner@gmail.com>
Sun, 8 Apr 2018 20:20:37 +0000 (22:20 +0200)
Signed-off-by: Christian Gmeiner <christian.gmeiner@gmail.com>
Tested-by: Chris Healy <cphealy@gmail.com>
src/gallium/drivers/etnaviv/etnaviv_query_pm.c
src/gallium/drivers/etnaviv/etnaviv_query_pm.h

index 2feca9d1dd90d4aab99d624a24012c66f2c9afe7..9be65cc6c5c5c29142d9f8cad6b8f350e0f8d40d 100644 (file)
@@ -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" }
+      }
    }
 };
 
index ce823cf3bfc90a1eff374f8618a8eda0ba09716b..77fb37b3338cdb856e2068a59f8a4bc461d0e07b 100644 (file)
@@ -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;