gpu: nvgpu: disable gsp isr on suspend

nvgpu_gsp_sw_deinit() is called so late that the GPU HW is not expected
to be available, so it must not call nvgpu_gsp_isr_support(). Move that
call to nvgpu_prepare_poweroff().

The gsp isr is still enabled in gsp bootstrap as before.

Change-Id: I84276ad377158a5fdb11931bd188e6d82bafc3df
Signed-off-by: Konsta Hölttä <kholtta@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2635681
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: svc-mobile-misra <svc-mobile-misra@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Ramesh Mylavarapu <rmylavarapu@nvidia.com>
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Konsta Hölttä
2021-12-02 13:42:31 +02:00
committed by mobile promotions
parent 23f6da4fe5
commit 4a7e5056a5
3 changed files with 11 additions and 3 deletions

View File

@@ -47,12 +47,15 @@ void nvgpu_gsp_isr_support(struct gk20a *g, bool enable)
nvgpu_mutex_release(&g->gsp->isr_mutex);
}
void nvgpu_gsp_suspend(struct gk20a *g)
{
nvgpu_gsp_isr_support(g, false);
}
void nvgpu_gsp_sw_deinit(struct gk20a *g)
{
if (g->gsp != NULL) {
nvgpu_gsp_isr_support(g, false);
nvgpu_mutex_destroy(&g->gsp->isr_mutex);
#ifdef CONFIG_NVGPU_FALCON_DEBUG
nvgpu_falcon_dbg_buf_destroy(g->gsp->gsp_flcn);

View File

@@ -341,8 +341,12 @@ int nvgpu_prepare_poweroff(struct gk20a *g)
#ifdef CONFIG_NVGPU_GSP_STRESS_TEST
ret = nvgpu_gsp_stress_test_halt(g, true);
if (ret != 0)
if (ret != 0) {
nvgpu_err(g, "Failed to halt GSP stress test");
}
#endif
#if defined(CONFIG_NVGPU_GSP_SCHEDULER)
nvgpu_gsp_suspend(g);
#endif
nvgpu_falcons_sw_free(g);

View File

@@ -27,6 +27,7 @@ struct nvgpu_gsp;
int nvgpu_gsp_sw_init(struct gk20a *g);
int nvgpu_gsp_bootstrap(struct gk20a *g);
void nvgpu_gsp_suspend(struct gk20a *g);
void nvgpu_gsp_sw_deinit(struct gk20a *g);
void nvgpu_gsp_isr_support(struct gk20a *g, bool enable);
void nvgpu_gsp_isr_mutex_aquire(struct gk20a *g);