From 3baaa289924fd68520cb10d9602e1900bfee42e0 Mon Sep 17 00:00:00 2001 From: Deepak Nibade Date: Thu, 1 Aug 2019 16:18:53 +0530 Subject: [PATCH] gpu: nvgpu: reset CE engines if CONFIG_NVGPU_CE is disabled If CONFIG_NVGPU_CE is disabled, nvgpu right now does not even reset the CE engines or initialize prod values. This ultimately needs to be fixed by adding appropriate initialization for CE engines even if CONFIG_NVGPU_CE is disabled. For now, add the code to at least reset CE engines if CONFIG_NVGPU_CE is disabled Bug 2526212 Change-Id: Id0a6fbfe44ef7af62715bcee65bef056359f1c19 Signed-off-by: Deepak Nibade Reviewed-on: https://git-master.nvidia.com/r/2165861 Reviewed-by: svc-mobile-coverity Reviewed-by: svc-mobile-misra GVS: Gerrit_Virtual_Submit Reviewed-by: Vinod Gopalakrishnakurup Reviewed-by: Seshendra Gadagottu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/common/init/nvgpu_init.c | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/nvgpu/common/init/nvgpu_init.c b/drivers/gpu/nvgpu/common/init/nvgpu_init.c index 3443e9df0..478ddd0e9 100644 --- a/drivers/gpu/nvgpu/common/init/nvgpu_init.c +++ b/drivers/gpu/nvgpu/common/init/nvgpu_init.c @@ -47,6 +47,9 @@ #include #include #include +#ifndef CONFIG_NVGPU_CE +#include +#endif #ifdef CONFIG_NVGPU_TRACE #include @@ -490,6 +493,8 @@ int nvgpu_finalize_poweron(struct gk20a *g) nvgpu_err(g, "failed to init ce"); goto done; } +#else + g->ops.mc.reset(g, nvgpu_engine_get_all_ce_reset_mask(g)); #endif #ifdef CONFIG_NVGPU_DGPU