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:
prsethi
2023-04-24 16:43:11 +00:00
committed by mobile promotions
parent 1de86155d8
commit c49ac865de
4 changed files with 25 additions and 24 deletions

View File

@@ -52,6 +52,9 @@
#include <nvgpu/grmgr.h>
#include "gr_priv.h"
#ifndef CONFIG_NVGPU_NON_FUSA
#include "gr/obj_ctx_priv.h"
#endif
static int gr_alloc_global_ctx_buffers(struct gk20a *g, struct nvgpu_gr *gr)
{
@@ -201,6 +204,10 @@ static void disable_gr_interrupts(struct gk20a *g)
int nvgpu_gr_suspend(struct gk20a *g)
{
#ifndef CONFIG_NVGPU_NON_FUSA
struct nvgpu_gr_obj_ctx_golden_image *golden_image =
nvgpu_gr_get_golden_image_ptr(g);
#endif
int ret = 0;
nvgpu_log_fn(g, " ");
@@ -221,7 +228,9 @@ int nvgpu_gr_suspend(struct gk20a *g)
nvgpu_gr_falcon_suspend(g, nvgpu_gr_get_falcon_ptr(g));
g->gr->initialized = false;
#ifndef CONFIG_NVGPU_NON_FUSA
golden_image->ready = false;
#endif
nvgpu_log_fn(g, "done");
return ret;
}