From 43242fa8789451d49bba3d071aa4f03aa5a7949c Mon Sep 17 00:00:00 2001 From: Seshendra Gadagottu Date: Mon, 31 Aug 2020 14:37:08 -0700 Subject: [PATCH] gpu: nvgpu: init ctxsw state after gr reset Ctxsw state will be lost after gr reset. After gr reset in recovery sequence, re-initialize ctxsw state to send below fecs methods: gr_fecs_method_push_adr_discover_image_size_v() gr_fecs_method_push_adr_discover_pm_image_size_v() gr_fecs_method_push_adr_discover_zcull_image_size_v() gr_fecs_method_push_adr_discover_preemption_image_size_v() Without these methods sent to ctxsw, fecs will generate host error interrupts indicating mismatches in ctxsw image. Above fecs methods needs to be sent even if they are already sent during golden context creation. Bug 3109773 Change-Id: I2aeb92da8fa1961903ab95ef90f47906a1bb32c4 Signed-off-by: Seshendra Gadagottu Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2406685 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/common/gr/gr.c | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/drivers/gpu/nvgpu/common/gr/gr.c b/drivers/gpu/nvgpu/common/gr/gr.c index 34da3b810..41446208c 100644 --- a/drivers/gpu/nvgpu/common/gr/gr.c +++ b/drivers/gpu/nvgpu/common/gr/gr.c @@ -406,11 +406,7 @@ static int nvgpu_gr_init_ctx_state(struct gk20a *g) { int err = 0; - if ((g->gr->golden_image != NULL) && - nvgpu_gr_obj_ctx_is_golden_image_ready(g->gr->golden_image)) { - return err; - } - + /* Initialize ctx state during boot and recovery */ err = nvgpu_gr_falcon_init_ctx_state(g, g->gr->falcon); if (err != 0) { nvgpu_err(g, "gr ctx_state init failed");