[PATCH umr 08/17] gfx11: wave limit is 16
Nicolai Hähnle
nicolai.haehnle at amd.com
Tue Jun 6 09:17:16 UTC 2023
Signed-off-by: Nicolai Hähnle <nicolai.haehnle at amd.com>
---
src/lib/scan_waves.c | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
diff --git a/src/lib/scan_waves.c b/src/lib/scan_waves.c
index 3279cc2..37ebcff 100644
--- a/src/lib/scan_waves.c
+++ b/src/lib/scan_waves.c
@@ -593,21 +593,26 @@ static int umr_scan_wave_slot(struct umr_asic *asic, uint32_t se, uint32_t sh, u
* \param pppwd points to the pointer-to-pointer-to the last element of a linked
* list of wave data structures, with the last element yet to be filled in.
* The pointer-to-pointer-to is updated by this function.
*/
static int umr_scan_wave_simd(struct umr_asic *asic, uint32_t se, uint32_t sh, uint32_t cu, uint32_t simd,
struct umr_wave_data ***pppwd)
{
uint32_t wave, wave_limit;
int r;
- wave_limit = asic->family <= FAMILY_AI ? 10 : 20;
+ if (asic->family <= FAMILY_AI)
+ wave_limit = 10;
+ else if (asic->family == FAMILY_NV)
+ wave_limit = 20;
+ else
+ wave_limit = 16;
for (wave = 0; wave < wave_limit; wave++) {
struct umr_wave_data *pwd = **pppwd;
if ((r = umr_scan_wave_slot(asic, se, sh, cu, simd, wave, pwd)) == 1) {
pwd->next = calloc(1, sizeof(*pwd));
if (!pwd->next) {
asic->err_msg("[ERROR]: Out of memory\n");
return -1;
}
*pppwd = &pwd->next;
--
2.40.0
More information about the amd-gfx
mailing list