diff options
author | Marek Olšák <[email protected]> | 2019-09-19 22:16:51 -0400 |
---|---|---|
committer | Marek Olšák <[email protected]> | 2019-09-30 13:36:20 -0400 |
commit | b7c2f7c5a6b21bccb7847ab03b7fba5c770e131c (patch) | |
tree | f6aeffc850f076028aa884a118fbd87ad485c38c | |
parent | 235ebe91633e7f47518118983e0e6f5c632b25a4 (diff) |
ac: fix num_good_cu_per_sh for harvested chips
Cc: 19.2 <[email protected]>
Reviewed-by: Bas Nieuwenhuizen <[email protected]>
-rw-r--r-- | src/amd/common/ac_gpu_info.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/amd/common/ac_gpu_info.c b/src/amd/common/ac_gpu_info.c index b5e0b8415d2..689ef2740f3 100644 --- a/src/amd/common/ac_gpu_info.c +++ b/src/amd/common/ac_gpu_info.c @@ -554,6 +554,12 @@ bool ac_query_gpu_info(int fd, void *dev_p, info->num_good_cu_per_sh = info->num_good_compute_units / (info->max_se * info->max_sh_per_se); + /* Round down to the nearest multiple of 2, because the hw can't + * disable CUs. It can only disable whole WGPs (dual-CUs). + */ + if (info->chip_class >= GFX10) + info->num_good_cu_per_sh -= info->num_good_cu_per_sh % 2; + memcpy(info->si_tile_mode_array, amdinfo->gb_tile_mode, sizeof(amdinfo->gb_tile_mode)); info->enabled_rb_mask = amdinfo->enabled_rb_pipes_mask; |