projects
/
platform
/
upstream
/
intel-gpu-tools.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
98eb5a5
)
gpu-top: Correct computation of ring size
author
Chris Wilson
<chris@chris-wilson.co.uk>
Sun, 9 Jan 2011 14:01:47 +0000
(14:01 +0000)
committer
Chris Wilson
<chris@chris-wilson.co.uk>
Sun, 9 Jan 2011 14:48:03 +0000
(14:48 +0000)
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
tools/intel_gpu_top.c
patch
|
blob
|
history
diff --git
a/tools/intel_gpu_top.c
b/tools/intel_gpu_top.c
index
d586c65
..
19fa0e9
100644
(file)
--- a/
tools/intel_gpu_top.c
+++ b/
tools/intel_gpu_top.c
@@
-292,7
+292,7
@@
print_percentage_bar(float percent, int cur_line_len)
struct ring {
const char *name;
uint32_t mmio;
-
uint32_
t head, tail, size;
+
in
t head, tail, size;
uint64_t full;
int idle;
};
@@
-332,7
+332,7
@@
static uint32_t ring_read(struct ring *ring, uint32_t reg)
static void ring_init(struct ring *ring)
{
gen6_force_wake_get();
- ring->size = ((
ring_read(ring, RING_LEN) & RING_NR_PAGES) >> 12
) * 4096;
+ ring->size = ((
(ring_read(ring, RING_LEN) & RING_NR_PAGES) >> 12) + 1
) * 4096;
gen6_force_wake_put();
}