summaryrefslogtreecommitdiffstats
path: root/src/gallium/drivers
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2015-06-27 13:57:25 +0200
committerMarek Olšák <[email protected]>2015-08-14 15:02:29 +0200
commit933d24b1768d769f1847a023ea3c70b6c9723e33 (patch)
tree57d0e106c4ac6d60ab9bba0581fd3a7ba6ffd90f /src/gallium/drivers
parentf0e24a7beae57f24501fa9d3b6b947fc20ca23bb (diff)
gallium/radeon: enable the GPU load query for amdgpu
Reviewed-by: Alex Deucher <[email protected]>
Diffstat (limited to 'src/gallium/drivers')
-rw-r--r--src/gallium/drivers/radeon/r600_pipe_common.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.c b/src/gallium/drivers/radeon/r600_pipe_common.c
index c982a4d9bad..a08e841f11f 100644
--- a/src/gallium/drivers/radeon/r600_pipe_common.c
+++ b/src/gallium/drivers/radeon/r600_pipe_common.c
@@ -719,17 +719,19 @@ static int r600_get_driver_query_info(struct pipe_screen *screen,
PIPE_DRIVER_QUERY_RESULT_TYPE_CUMULATIVE},
{"VRAM-usage", R600_QUERY_VRAM_USAGE, {rscreen->info.vram_size}, PIPE_DRIVER_QUERY_TYPE_BYTES},
{"GTT-usage", R600_QUERY_GTT_USAGE, {rscreen->info.gart_size}, PIPE_DRIVER_QUERY_TYPE_BYTES},
+ {"GPU-load", R600_QUERY_GPU_LOAD, {100}},
{"temperature", R600_QUERY_GPU_TEMPERATURE, {100}},
{"shader-clock", R600_QUERY_CURRENT_GPU_SCLK, {0}, PIPE_DRIVER_QUERY_TYPE_HZ},
{"memory-clock", R600_QUERY_CURRENT_GPU_MCLK, {0}, PIPE_DRIVER_QUERY_TYPE_HZ},
- {"GPU-load", R600_QUERY_GPU_LOAD, {100}}
};
unsigned num_queries;
if (rscreen->info.drm_major == 2 && rscreen->info.drm_minor >= 42)
num_queries = Elements(list);
+ else if (rscreen->info.drm_major == 3)
+ num_queries = Elements(list) - 3;
else
- num_queries = 9;
+ num_queries = Elements(list) - 4;
if (!info)
return num_queries;