summaryrefslogtreecommitdiffstats
path: root/src/amd/common/ac_gpu_info.c
diff options
context:
space:
mode:
authorMarek Olšák <[email protected]>2018-09-29 19:28:20 -0400
committerMarek Olšák <[email protected]>2018-10-16 15:28:22 -0400
commitfedc1fda3096d6e41ccd40efdcff6dc966badbc3 (patch)
tree10c5f38d9d69d87282be5789ede7d713125e5703 /src/amd/common/ac_gpu_info.c
parentac76aeef20abff6ead3e362b30dc07d809678e53 (diff)
radeonsi: save raster config in screen, add se_tile_repeat
Diffstat (limited to 'src/amd/common/ac_gpu_info.c')
-rw-r--r--src/amd/common/ac_gpu_info.c13
1 files changed, 11 insertions, 2 deletions
diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c
index 766ad835476..d6df2f6443e 100644
--- a/src/amd/common/ac_gpu_info.c
+++ b/src/amd/common/ac_gpu_info.c
@@ -643,9 +643,10 @@ ac_get_gs_table_depth(enum chip_class chip_class, enum radeon_family family)
void
ac_get_raster_config(struct radeon_info *info,
uint32_t *raster_config_p,
- uint32_t *raster_config_1_p)
+ uint32_t *raster_config_1_p,
+ uint32_t *se_tile_repeat_p)
{
- unsigned raster_config, raster_config_1;
+ unsigned raster_config, raster_config_1, se_tile_repeat;
switch (info->family) {
/* 1 SE / 1 RB */
@@ -722,8 +723,16 @@ ac_get_raster_config(struct radeon_info *info,
raster_config_1 = 0x0000002a;
}
+ unsigned se_width = 8 << G_028350_SE_XSEL_GFX6(raster_config);
+ unsigned se_height = 8 << G_028350_SE_YSEL_GFX6(raster_config);
+
+ /* I don't know how to calculate this, though this is probably a good guess. */
+ se_tile_repeat = MAX2(se_width, se_height) * info->max_se;
+
*raster_config_p = raster_config;
*raster_config_1_p = raster_config_1;
+ if (se_tile_repeat_p)
+ *se_tile_repeat_p = se_tile_repeat;
}
void