winsys/radeon: Query the kernel for the number of SEs and SHs per SE
authorTom Stellard <thomas.stellard@amd.com>
Fri, 18 Jul 2014 17:19:43 +0000 (13:19 -0400)
committerTom Stellard <thomas.stellard@amd.com>
Mon, 21 Jul 2014 14:00:09 +0000 (10:00 -0400)
Reviewed-by: Marek Olšák <marek.olsak@amd.com>
src/gallium/winsys/radeon/drm/radeon_drm_winsys.c
src/gallium/winsys/radeon/drm/radeon_winsys.h

index 576fea5..7cda70a 100644 (file)
@@ -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;
index 6df1987..a63a50b 100644 (file)
@@ -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;