diff options
author | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-20 19:11:44 +0100 |
---|---|---|
committer | Chris Wilson <chris@chris-wilson.co.uk> | 2013-08-20 21:30:56 +0100 |
commit | 2e482a34870c4ab37ad3ae066e3f1b9b8e6b6688 (patch) | |
tree | d127b515aaed3d3e2c6092da3db88c957c4f946c /overlay/gpu-top.h | |
parent | 5cb8c77d69ffda7fed784cd194844b4efecedf52 (diff) |
overlay: Use the new i915 PMU to query GPU busyness
And so avoid having to hold forcewake indefinitely.
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
Diffstat (limited to 'overlay/gpu-top.h')
-rw-r--r-- | overlay/gpu-top.h | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/overlay/gpu-top.h b/overlay/gpu-top.h index 78f4daf2..13b905d9 100644 --- a/overlay/gpu-top.h +++ b/overlay/gpu-top.h @@ -3,8 +3,13 @@ #include <stdint.h> struct gpu_top { + enum { PERF, MMIO } type; int fd; + int num_rings; + int have_wait; + int have_sema; + struct gpu_top_ring { const char *name; union gpu_top_payload { @@ -16,6 +21,14 @@ struct gpu_top { uint32_t payload; } u; } ring[MAX_RINGS]; + + struct gpu_top_stat { + uint64_t time; + uint64_t busy[MAX_RINGS]; + uint64_t wait[MAX_RINGS]; + uint64_t sema[MAX_RINGS]; + } stat[2]; + int count; }; void gpu_top_init(struct gpu_top *gt); |