From 2e482a34870c4ab37ad3ae066e3f1b9b8e6b6688 Mon Sep 17 00:00:00 2001 From: Chris Wilson Date: Tue, 20 Aug 2013 19:11:44 +0100 Subject: overlay: Use the new i915 PMU to query GPU busyness And so avoid having to hold forcewake indefinitely. Signed-off-by: Chris Wilson --- overlay/gpu-top.h | 13 +++++++++++++ 1 file changed, 13 insertions(+) (limited to 'overlay/gpu-top.h') 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 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); -- cgit v1.2.3