From 8fc816affeaa47848591d60af5eabc24ebcaba08 Mon Sep 17 00:00:00 2001 From: Huang Rui Date: Fri, 11 Sep 2020 11:27:31 +0800 Subject: [PATCH] libhsakmt: fix to update the param number after remove to dgpu input This patch is the hot fix to fix the param number checking after remove dgpu input. Signed-off-by: Huang Rui Change-Id: Ic980588f78616f99076de742af580afb4273fb2f --- src/openclose.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/openclose.c b/src/openclose.c index 2ffe9a8268..784ee51f2a 100644 --- a/src/openclose.c +++ b/src/openclose.c @@ -136,15 +136,15 @@ static HSAKMT_STATUS init_vars_from_env(void) zfb_support = atoi(envvar); /* Force all the GPUs to a certain type, use the below command: - * export HSA_FORCE_ASIC_TYPE="10.1.0 1 Navi10 14" - * meaning major.minor.step dgpu asic_name asic_id + * export HSA_FORCE_ASIC_TYPE="10.1.0 Navi10 14" + * meaning major.minor.step asic_name asic_id */ envvar = getenv("HSA_FORCE_ASIC_TYPE"); if (envvar) { uint32_t major, minor, step, asic_family; if ((sscanf(envvar, "%u.%u.%u %63s %u", &major, &minor, &step, - force_asic_name, &asic_family) != 6) + force_asic_name, &asic_family) != 5) || (major > 63 || minor > 255 || step > 255) || asic_family >= CHIP_LAST) { pr_err("HSA_FORCE_ASIC_TYPE %s is invalid\n", envvar);