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 <sgadagottu@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2406685
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Seshendra Gadagottu
2020-08-31 14:37:08 -07:00
committed by Alex Waterman
parent da43acf639
commit 43242fa878

View File

@@ -406,11 +406,7 @@ static int nvgpu_gr_init_ctx_state(struct gk20a *g)
{ {
int err = 0; int err = 0;
if ((g->gr->golden_image != NULL) && /* Initialize ctx state during boot and recovery */
nvgpu_gr_obj_ctx_is_golden_image_ready(g->gr->golden_image)) {
return err;
}
err = nvgpu_gr_falcon_init_ctx_state(g, g->gr->falcon); err = nvgpu_gr_falcon_init_ctx_state(g, g->gr->falcon);
if (err != 0) { if (err != 0) {
nvgpu_err(g, "gr ctx_state init failed"); nvgpu_err(g, "gr ctx_state init failed");