gpu: nvgpu: detect enabled ecc units in hal init

ECC scrubbing can start before GPU characteristics
are initialized. Detect enabled ECC units in HAL
init functions so that scrubbing is started properly.

Bug 2919887

Change-Id: Ic20b4223504a947eed78418779531e26c2116d41
Signed-off-by: Thomas Fleury <tfleury@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2330101
(cherry picked from commit e8d380d7bba91b895033ebb5ab0d281be6d3db30)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2331612
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Thomas Fleury
2020-04-17 01:41:29 +00:00
committed by Alex Waterman
parent e0cb334f4e
commit 091e4b9396

View File

@@ -216,7 +216,6 @@ static int gv11b_init_gpu_characteristics(struct gk20a *g)
return err; return err;
} }
g->ops.gr.ecc.detect(g);
nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true);
nvgpu_set_enabled(g, NVGPU_SUPPORT_SCG, true); nvgpu_set_enabled(g, NVGPU_SUPPORT_SCG, true);
#ifdef CONFIG_NVGPU_CHANNEL_TSG_SCHEDULING #ifdef CONFIG_NVGPU_CHANNEL_TSG_SCHEDULING
@@ -1604,6 +1603,8 @@ int gv11b_init_hal(struct gk20a *g)
*/ */
nvgpu_set_enabled(g, NVGPU_MM_BYPASSES_IOMMU, true); nvgpu_set_enabled(g, NVGPU_MM_BYPASSES_IOMMU, true);
g->ops.gr.ecc.detect(g);
#ifdef CONFIG_NVGPU_SM_DIVERSITY #ifdef CONFIG_NVGPU_SM_DIVERSITY
/* /*
* To achieve permanent fault coverage, the CTAs launched by each kernel * To achieve permanent fault coverage, the CTAs launched by each kernel