diff options
Diffstat (limited to 'overlay/gpu-top.h')
-rw-r--r-- | overlay/gpu-top.h | 22 |
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); |