summaryrefslogtreecommitdiff
path: root/drivers/video/tegra/host/gk20a/gr_gk20a.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/tegra/host/gk20a/gr_gk20a.c')
-rw-r--r--drivers/video/tegra/host/gk20a/gr_gk20a.c18
1 files changed, 14 insertions, 4 deletions
diff --git a/drivers/video/tegra/host/gk20a/gr_gk20a.c b/drivers/video/tegra/host/gk20a/gr_gk20a.c
index 4caaa51ab1aa..b4da945ee2a3 100644
--- a/drivers/video/tegra/host/gk20a/gr_gk20a.c
+++ b/drivers/video/tegra/host/gk20a/gr_gk20a.c
@@ -1887,10 +1887,9 @@ static int gr_gk20a_init_ctxsw_ucode(struct gk20a *g)
p_buf = (u8 *)p_ucode_info->surface_desc.cpuva;
if (!p_buf) {
- release_firmware(fecs_fw);
- release_firmware(gpccs_fw);
nvhost_err(d, "failed to map surface desc buffer");
- return -ENOMEM;
+ err = -ENOMEM;
+ goto clean_up;
}
gr_gk20a_copy_ctxsw_ucode_inst(p_buf, &p_ucode_info->fecs,
@@ -1898,11 +1897,17 @@ static int gr_gk20a_init_ctxsw_ucode(struct gk20a *g)
g->gr.ctx_vars.ucode.fecs.inst.l,
g->gr.ctx_vars.ucode.fecs.data.l);
+ release_firmware(fecs_fw);
+ fecs_fw = NULL;
+
gr_gk20a_copy_ctxsw_ucode_inst(p_buf, &p_ucode_info->gpcs,
p_gpcs_boot_desc, p_gpcs_boot_image,
g->gr.ctx_vars.ucode.gpccs.inst.l,
g->gr.ctx_vars.ucode.gpccs.data.l);
+ release_firmware(gpccs_fw);
+ gpccs_fw = NULL;
+
err = gr_gk20a_init_ctxsw_ucode_vaspace(g);
if (err)
goto clean_up;
@@ -1925,6 +1930,11 @@ static int gr_gk20a_init_ctxsw_ucode(struct gk20a *g)
p_ucode_info->surface_desc.cpuva = NULL;
p_ucode_info->surface_desc.iova = 0;
+ release_firmware(gpccs_fw);
+ gpccs_fw = NULL;
+ release_firmware(fecs_fw);
+ fecs_fw = NULL;
+
return err;
}
@@ -5422,7 +5432,7 @@ int gk20a_gr_isr(struct gk20a *g)
}
if (need_reset)
- gk20a_set_error_notifier(ch,
+ gk20a_set_error_notifier(ch->hwctx,
NVHOST_CHANNEL_GR_ERROR_SW_NOTIFY);
}