mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 17:36:20 +03:00
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:
committed by
mobile promotions
parent
23f6da4fe5
commit
4a7e5056a5
@@ -47,12 +47,15 @@ void nvgpu_gsp_isr_support(struct gk20a *g, bool enable)
|
|||||||
nvgpu_mutex_release(&g->gsp->isr_mutex);
|
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)
|
void nvgpu_gsp_sw_deinit(struct gk20a *g)
|
||||||
{
|
{
|
||||||
if (g->gsp != NULL) {
|
if (g->gsp != NULL) {
|
||||||
|
|
||||||
nvgpu_gsp_isr_support(g, false);
|
|
||||||
|
|
||||||
nvgpu_mutex_destroy(&g->gsp->isr_mutex);
|
nvgpu_mutex_destroy(&g->gsp->isr_mutex);
|
||||||
#ifdef CONFIG_NVGPU_FALCON_DEBUG
|
#ifdef CONFIG_NVGPU_FALCON_DEBUG
|
||||||
nvgpu_falcon_dbg_buf_destroy(g->gsp->gsp_flcn);
|
nvgpu_falcon_dbg_buf_destroy(g->gsp->gsp_flcn);
|
||||||
|
|||||||
@@ -341,8 +341,12 @@ int nvgpu_prepare_poweroff(struct gk20a *g)
|
|||||||
|
|
||||||
#ifdef CONFIG_NVGPU_GSP_STRESS_TEST
|
#ifdef CONFIG_NVGPU_GSP_STRESS_TEST
|
||||||
ret = nvgpu_gsp_stress_test_halt(g, true);
|
ret = nvgpu_gsp_stress_test_halt(g, true);
|
||||||
if (ret != 0)
|
if (ret != 0) {
|
||||||
nvgpu_err(g, "Failed to halt GSP stress test");
|
nvgpu_err(g, "Failed to halt GSP stress test");
|
||||||
|
}
|
||||||
|
#endif
|
||||||
|
#if defined(CONFIG_NVGPU_GSP_SCHEDULER)
|
||||||
|
nvgpu_gsp_suspend(g);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
nvgpu_falcons_sw_free(g);
|
nvgpu_falcons_sw_free(g);
|
||||||
|
|||||||
@@ -27,6 +27,7 @@ struct nvgpu_gsp;
|
|||||||
|
|
||||||
int nvgpu_gsp_sw_init(struct gk20a *g);
|
int nvgpu_gsp_sw_init(struct gk20a *g);
|
||||||
int nvgpu_gsp_bootstrap(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_sw_deinit(struct gk20a *g);
|
||||||
void nvgpu_gsp_isr_support(struct gk20a *g, bool enable);
|
void nvgpu_gsp_isr_support(struct gk20a *g, bool enable);
|
||||||
void nvgpu_gsp_isr_mutex_aquire(struct gk20a *g);
|
void nvgpu_gsp_isr_mutex_aquire(struct gk20a *g);
|
||||||
|
|||||||
Reference in New Issue
Block a user