mirror of
https://github.com/tiagovignatti/intel-gpu-tools.git
synced 2025-06-20 14:26:17 +00:00
gpu-top: Correct computation of ring size
Signed-off-by: Chris Wilson <chris@chris-wilson.co.uk>
This commit is contained in:
parent
98eb5a5e24
commit
afaf5ef27c
@ -292,7 +292,7 @@ print_percentage_bar(float percent, int cur_line_len)
|
|||||||
struct ring {
|
struct ring {
|
||||||
const char *name;
|
const char *name;
|
||||||
uint32_t mmio;
|
uint32_t mmio;
|
||||||
uint32_t head, tail, size;
|
int head, tail, size;
|
||||||
uint64_t full;
|
uint64_t full;
|
||||||
int idle;
|
int idle;
|
||||||
};
|
};
|
||||||
@ -332,7 +332,7 @@ static uint32_t ring_read(struct ring *ring, uint32_t reg)
|
|||||||
static void ring_init(struct ring *ring)
|
static void ring_init(struct ring *ring)
|
||||||
{
|
{
|
||||||
gen6_force_wake_get();
|
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();
|
gen6_force_wake_put();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user