[Mesa-dev] [PATCH 1/3] winsys/radeon: Query the kernel for the number of SEs and SHs per SE
Tom Stellard
thomas.stellard at amd.com
Fri Jul 18 12:09:01 PDT 2014
---
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c | 6 ++++++
src/gallium/winsys/radeon/drm/radeon_winsys.h | 2 ++
2 files changed, 8 insertions(+)
diff --git a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
index 576fea5..7cda70a 100644
--- a/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
+++ b/src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
@@ -389,6 +389,12 @@ static boolean do_winsys_init(struct radeon_drm_winsys *ws)
radeon_get_drm_value(ws->fd, RADEON_INFO_ACTIVE_CU_COUNT, NULL,
&ws->info.max_compute_units);
+ radeon_get_drm_value(ws->fd, RADEON_INFO_MAX_SE, NULL,
+ &ws->info.max_se);
+
+ radeon_get_drm_value(ws->fd, RADEON_INFO_MAX_SH_PER_SE, NULL,
+ &ws->info.max_sh_per_se);
+
if (radeon_get_drm_value(ws->fd, RADEON_INFO_SI_TILE_MODE_ARRAY, NULL,
ws->info.si_tile_mode_array)) {
ws->info.si_tile_mode_array_valid = TRUE;
diff --git a/src/gallium/winsys/radeon/drm/radeon_winsys.h b/src/gallium/winsys/radeon/drm/radeon_winsys.h
index 6df1987..a63a50b 100644
--- a/src/gallium/winsys/radeon/drm/radeon_winsys.h
+++ b/src/gallium/winsys/radeon/drm/radeon_winsys.h
@@ -199,6 +199,8 @@ struct radeon_info {
uint32_t vram_size;
uint32_t max_sclk;
uint32_t max_compute_units;
+ uint32_t max_se;
+ uint32_t max_sh_per_se;
uint32_t drm_major; /* version */
uint32_t drm_minor;
--
1.8.1.5
More information about the mesa-dev
mailing list