ac: set the number of SDPs same as the number of TCCs
authorMarek Olšák <marek.olsak@amd.com>
Fri, 20 Sep 2019 02:17:30 +0000 (22:17 -0400)
committerMarek Olšák <marek.olsak@amd.com>
Mon, 30 Sep 2019 17:36:21 +0000 (13:36 -0400)
Reviewed-by: Bas Nieuwenhuizen <bas@basnieuwenhuizen.nl>
src/amd/common/ac_gpu_info.c

index 689ef2740f36fe2d25afb215fa29cd7ea9eeca01..885206fbe78ff5b9e20fcf5fdb6f6e8a58efe9e4 100644 (file)
@@ -630,19 +630,9 @@ bool ac_query_gpu_info(int fd, void *dev_p,
                }
        }
 
-       if (info->chip_class >= GFX10) {
-               switch (info->family) {
-               case CHIP_NAVI10:
-               case CHIP_NAVI12:
-                       info->num_sdp_interfaces = 16;
-                       break;
-               case CHIP_NAVI14:
-                       info->num_sdp_interfaces = 8;
-                       break;
-               default:
-                       assert(0);
-               }
-       }
+       /* The number of SDPs is the same as the number of TCCs for now. */
+       if (info->chip_class >= GFX10)
+               info->num_sdp_interfaces = device_info.num_tcc_blocks;
 
        info->max_wave64_per_simd = info->family >= CHIP_POLARIS10 &&
                                    info->family <= CHIP_VEGAM ? 8 : 10;