summaryrefslogtreecommitdiff
path: root/overlay/gpu-top.h
diff options
context:
space:
mode:
authorChris Wilson <chris@chris-wilson.co.uk>2013-08-17 11:12:07 +0100
committerChris Wilson <chris@chris-wilson.co.uk>2013-08-17 11:21:51 +0100
commitf9a50de3dcc501e930de6c60983a4feb57121e7e (patch)
treee2a65ef9a1ce5c15faf8e95e0337e821e2579ac7 /overlay/gpu-top.h
parent7df9caeea1606b4f0272de35f0d7f70eedd5ec30 (diff)
Introduce intel-gpu-overlay
A realtime display of GPU activity. Note, this is just at the point of minimum usability... Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay/gpu-top.h')
-rw-r--r--overlay/gpu-top.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/overlay/gpu-top.h b/overlay/gpu-top.h
new file mode 100644
index 00000000..78f4daf2
--- /dev/null
+++ b/overlay/gpu-top.h
@@ -0,0 +1,22 @@
+#define MAX_RINGS 4
+
+#include <stdint.h>
+
+struct gpu_top {
+ int fd;
+ int num_rings;
+ struct gpu_top_ring {
+ const char *name;
+ union gpu_top_payload {
+ struct {
+ uint8_t busy;
+ uint8_t wait;
+ uint8_t sema;
+ } u;
+ uint32_t payload;
+ } u;
+ } ring[MAX_RINGS];
+};
+
+void gpu_top_init(struct gpu_top *gt);
+int gpu_top_update(struct gpu_top *gt);