diff --git a/drivers/gpu/nvgpu/common/acr/acr_bootstrap.c b/drivers/gpu/nvgpu/common/acr/acr_bootstrap.c index 7c42772a0..70c65593e 100644 --- a/drivers/gpu/nvgpu/common/acr/acr_bootstrap.c +++ b/drivers/gpu/nvgpu/common/acr/acr_bootstrap.c @@ -30,6 +30,7 @@ #include #include #include +#include #include "acr_bootstrap.h" #include "acr_priv.h" @@ -201,7 +202,14 @@ int nvgpu_acr_bootstrap_hs_ucode(struct gk20a *g, struct nvgpu_acr *acr, } /* wait for complete & halt */ - err = acr_wait_for_completion(g, acr_desc, ACR_COMPLETION_TIMEOUT_MS); + if (nvgpu_platform_is_silicon(g)) { + err = acr_wait_for_completion(g, acr_desc, + ACR_COMPLETION_TIMEOUT_SILICON_MS); + } else { + err = acr_wait_for_completion(g, acr_desc, + ACR_COMPLETION_TIMEOUT_NON_SILICON_MS); + } + if (err != 0) { nvgpu_err(g, "HS ucode completion err %d", err); goto err_free_ucode; diff --git a/drivers/gpu/nvgpu/common/acr/acr_priv.h b/drivers/gpu/nvgpu/common/acr/acr_priv.h index 90031810c..dca36a4cb 100644 --- a/drivers/gpu/nvgpu/common/acr/acr_priv.h +++ b/drivers/gpu/nvgpu/common/acr/acr_priv.h @@ -1,5 +1,5 @@ /* - * Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved. + * Copyright (c) 2019-2020, NVIDIA CORPORATION. All rights reserved. * * Permission is hereby granted, free of charge, to any person obtaining a * copy of this software and associated documentation files (the "Software"), @@ -97,7 +97,8 @@ struct wpr_carveout_info; #define LSF_SEC2_UCODE_DESC_FUSA_BIN "sec2_ucode_fusa_desc.bin" #define LSF_SEC2_UCODE_SIG_FUSA_BIN "sec2_fusa_sig.bin" -#define ACR_COMPLETION_TIMEOUT_MS 10000U /*in msec */ +#define ACR_COMPLETION_TIMEOUT_NON_SILICON_MS 10000U /*in msec */ +#define ACR_COMPLETION_TIMEOUT_SILICON_MS 100 /*in msec */ struct acr_lsf_config { u32 falcon_id;