mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 02:22:34 +03:00
gpu: nvgpu: init golden ctx image during nvgpu poweron
Safety build temporal requirement is that on FECS power up it should go through entire initialization methods. init_golden_image callback is being called from devctl/ioctl path and triggers FECS method 10 and 11. As these methods are part of APP init, not being called during resume and causing quiesce on safety build. To fix this issue, calling the callback from poweron API. Bug 4082813 Bug 4037712 Change-Id: I2d27203d3cb4326ae7d8bd6025693fd61d5237df Signed-off-by: prsethi <prsethi@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2893218 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
1de86155d8
commit
c49ac865de
@@ -827,11 +827,6 @@ static int nvgpu_gr_obj_ctx_save_golden_ctx(struct gk20a *g,
|
||||
nvgpu_err(g, "golden context mismatch");
|
||||
err = -ENOMEM;
|
||||
}
|
||||
|
||||
/* free temporary copy now */
|
||||
nvgpu_gr_global_ctx_deinit_local_golden_image(g,
|
||||
golden_image->local_golden_image_copy);
|
||||
golden_image->local_golden_image_copy = NULL;
|
||||
#endif
|
||||
|
||||
clean_up:
|
||||
@@ -1150,17 +1145,15 @@ int nvgpu_gr_obj_ctx_init_golden_context_image(struct gk20a *g)
|
||||
struct nvgpu_gr_ctx gr_ctx = {};
|
||||
int err = 0;
|
||||
|
||||
err = gk20a_busy(g);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "failed to power on, %d", err);
|
||||
return err;
|
||||
}
|
||||
|
||||
nvgpu_mutex_acquire(&golden_image->ctx_mutex);
|
||||
|
||||
/* Reinit golden context image during resume on safety build. This is
|
||||
* needed to satisfy ctxsw temporal restrictions. */
|
||||
#ifdef CONFIG_NVGPU_NON_FUSA
|
||||
if (golden_image->ready) {
|
||||
goto out;
|
||||
}
|
||||
#endif
|
||||
|
||||
big_page_size = g->ops.mm.gmmu.get_default_big_page_size();
|
||||
|
||||
@@ -1218,7 +1211,6 @@ free_vm:
|
||||
nvgpu_vm_put(vm);
|
||||
out:
|
||||
nvgpu_mutex_release(&golden_image->ctx_mutex);
|
||||
gk20a_idle(g);
|
||||
return err;
|
||||
}
|
||||
|
||||
@@ -1460,6 +1452,14 @@ void nvgpu_gr_obj_ctx_deinit(struct gk20a *g,
|
||||
golden_image->local_golden_image);
|
||||
golden_image->local_golden_image = NULL;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_NVGPU_GR_GOLDEN_CTX_VERIFICATION
|
||||
if (golden_image->local_golden_image_copy != NULL) {
|
||||
nvgpu_gr_global_ctx_deinit_local_golden_image(g,
|
||||
golden_image->local_golden_image_copy);
|
||||
golden_image->local_golden_image_copy = NULL;
|
||||
}
|
||||
#endif
|
||||
#ifdef CONFIG_NVGPU_POWER_PG
|
||||
nvgpu_pmu_set_golden_image_initialized(g, GOLDEN_IMG_NOT_READY);
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user