diff options
author | Marek Olšák <[email protected]> | 2016-08-21 12:00:01 +0200 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2016-09-05 18:01:15 +0200 |
commit | 1c13c71ef8eafde8cc3c3baa0b2fa96c6cf19d6c (patch) | |
tree | b055db5b95dfc98279efd43ec2f952f023f618f3 /src/gallium | |
parent | f660d1cb218d2610b81194d7a7ab83ff5e220005 (diff) |
radeonsi: return correct eviction stats for NVX_gpu_memory_info
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
Reviewed-by: Edward O'Callaghan <[email protected]>
Reviewed-by: Nicolai Hähnle <[email protected]>
Diffstat (limited to 'src/gallium')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c index 1b15594bbd2..825e4e98658 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.c +++ b/src/gallium/drivers/radeon/r600_pipe_common.c @@ -1070,8 +1070,13 @@ static void r600_query_memory_info(struct pipe_screen *screen, info->device_memory_evicted = ws->query_value(ws, RADEON_NUM_BYTES_MOVED) / 1024; - /* Just return the number of evicted 64KB pages. */ - info->nr_device_memory_evictions = info->device_memory_evicted / 64; + + if (rscreen->info.drm_major == 3 && rscreen->info.drm_minor >= 4) + info->nr_device_memory_evictions = + ws->query_value(ws, RADEON_NUM_EVICTIONS); + else + /* Just return the number of evicted 64KB pages. */ + info->nr_device_memory_evictions = info->device_memory_evicted / 64; } struct pipe_resource *r600_resource_create_common(struct pipe_screen *screen, |