From 091e4b939642127bf507fc2bc23f95b39a480e7d Mon Sep 17 00:00:00 2001 From: Thomas Fleury Date: Fri, 17 Apr 2020 01:41:29 +0000 Subject: [PATCH] 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 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 Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/hal/init/hal_gv11b.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/hal/init/hal_gv11b.c b/drivers/gpu/nvgpu/hal/init/hal_gv11b.c index 7746899dc..8faa5dd7c 100644 --- a/drivers/gpu/nvgpu/hal/init/hal_gv11b.c +++ b/drivers/gpu/nvgpu/hal/init/hal_gv11b.c @@ -216,7 +216,6 @@ static int gv11b_init_gpu_characteristics(struct gk20a *g) return err; } - g->ops.gr.ecc.detect(g); nvgpu_set_enabled(g, NVGPU_SUPPORT_TSG_SUBCONTEXTS, true); nvgpu_set_enabled(g, NVGPU_SUPPORT_SCG, true); #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); + g->ops.gr.ecc.detect(g); + #ifdef CONFIG_NVGPU_SM_DIVERSITY /* * To achieve permanent fault coverage, the CTAs launched by each kernel