diff options
author | Marek Olšák <marek.olsak@amd.com> | 2017-01-15 23:51:29 +0100 |
---|---|---|
committer | Marek Olšák <marek.olsak@amd.com> | 2017-01-16 15:35:30 +0100 |
commit | aa0de724c7744d91e259ed6911ab8d1580d2f7da (patch) | |
tree | ec4928dfe2f55ba9c5d94ccd913096818aff13cd /src/gallium/drivers/radeon/r600_pipe_common.h | |
parent | 935d58ac73077ccb164e698088c5b789452b08e9 (diff) |
gallium/radeon: make the GPU load / GRBM_STATUS monitoring extensible
The next patch will add SPI_BUSY monitoring.
Reviewed-by: Nicolai Hähnle <nicolai.haehnle@amd.com>
Diffstat (limited to 'src/gallium/drivers/radeon/r600_pipe_common.h')
-rw-r--r-- | src/gallium/drivers/radeon/r600_pipe_common.h | 15 |
1 files changed, 11 insertions, 4 deletions
diff --git a/src/gallium/drivers/radeon/r600_pipe_common.h b/src/gallium/drivers/radeon/r600_pipe_common.h index 74f86dc394..9f69298540 100644 --- a/src/gallium/drivers/radeon/r600_pipe_common.h +++ b/src/gallium/drivers/radeon/r600_pipe_common.h @@ -352,6 +352,14 @@ struct r600_surface { unsigned db_preload_control; /* EG and later */ }; +union r600_grbm_counters { + struct { + unsigned gui_busy; + unsigned gui_idle; + } named; + unsigned array[0]; +}; + struct r600_common_screen { struct pipe_screen b; struct radeon_winsys *ws; @@ -385,8 +393,7 @@ struct r600_common_screen { /* GPU load thread. */ pipe_mutex gpu_load_mutex; pipe_thread gpu_load_thread; - unsigned gpu_load_counter_busy; - unsigned gpu_load_counter_idle; + union r600_grbm_counters grbm_counters; volatile unsigned gpu_load_stop_thread; /* bool */ char renderer_string[100]; @@ -739,8 +746,8 @@ bool r600_check_device_reset(struct r600_common_context *rctx); /* r600_gpu_load.c */ void r600_gpu_load_kill_thread(struct r600_common_screen *rscreen); -uint64_t r600_gpu_load_begin(struct r600_common_screen *rscreen); -unsigned r600_gpu_load_end(struct r600_common_screen *rscreen, uint64_t begin); +uint64_t r600_begin_counter_gui(struct r600_common_screen *rscreen); +unsigned r600_end_counter_gui(struct r600_common_screen *rscreen, uint64_t begin); /* r600_perfcounters.c */ void r600_perfcounters_destroy(struct r600_common_screen *rscreen); |