mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-22 09:12:24 +03:00
gpu: nvgpu: gsp: disabling multiple gsp firmware read
Changes: - disabled gsp firmware release during railgating - firmware read happen only during power on Bug 3935433 Change-Id: I9156c015ab7f90ab640c33ca99dc7f3e289b7659 Signed-off-by: vivekku <vivekku@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2870170 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
eb52414f22
commit
ce4293ab20
@@ -32,21 +32,17 @@
|
|||||||
#include <nvgpu/gsp/gsp_test.h>
|
#include <nvgpu/gsp/gsp_test.h>
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
static void gsp_release_firmware(struct gk20a *g, struct nvgpu_gsp *gsp)
|
void gsp_release_firmware(struct gk20a *g, struct nvgpu_gsp *gsp)
|
||||||
{
|
{
|
||||||
if (gsp->gsp_ucode.manifest != NULL) {
|
nvgpu_release_firmware(g, gsp->gsp_ucode.manifest);
|
||||||
nvgpu_release_firmware(g, gsp->gsp_ucode.manifest);
|
gsp->gsp_ucode.manifest = NULL;
|
||||||
}
|
nvgpu_release_firmware(g, gsp->gsp_ucode.code);
|
||||||
|
gsp->gsp_ucode.code = NULL;
|
||||||
if (gsp->gsp_ucode.code != NULL) {
|
nvgpu_release_firmware(g, gsp->gsp_ucode.data);
|
||||||
nvgpu_release_firmware(g, gsp->gsp_ucode.code);
|
gsp->gsp_ucode.data = NULL;
|
||||||
}
|
|
||||||
|
|
||||||
if (gsp->gsp_ucode.data != NULL) {
|
|
||||||
nvgpu_release_firmware(g, gsp->gsp_ucode.data);
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
static int gsp_read_firmware(struct gk20a *g, struct nvgpu_gsp *gsp,
|
static int gsp_read_firmware(struct gk20a *g, struct nvgpu_gsp *gsp,
|
||||||
struct gsp_fw *gsp_ucode)
|
struct gsp_fw *gsp_ucode)
|
||||||
{
|
{
|
||||||
@@ -56,22 +52,27 @@ static int gsp_read_firmware(struct gk20a *g, struct nvgpu_gsp *gsp,
|
|||||||
|
|
||||||
nvgpu_log_fn(g, " ");
|
nvgpu_log_fn(g, " ");
|
||||||
|
|
||||||
|
if ((gsp_ucode->manifest != NULL) && (gsp_ucode->code != NULL)
|
||||||
|
&& (gsp_ucode->data != NULL)) {
|
||||||
|
return 0;
|
||||||
|
}
|
||||||
|
|
||||||
gsp_ucode->manifest = nvgpu_request_firmware(g,
|
gsp_ucode->manifest = nvgpu_request_firmware(g,
|
||||||
manifest_name, NVGPU_REQUEST_FIRMWARE_NO_WARN);
|
manifest_name, 0);
|
||||||
if (gsp_ucode->manifest == NULL) {
|
if (gsp_ucode->manifest == NULL) {
|
||||||
nvgpu_err(g, "%s ucode get failed", manifest_name);
|
nvgpu_err(g, "%s ucode get failed", manifest_name);
|
||||||
goto fw_release;
|
goto fw_release;
|
||||||
}
|
}
|
||||||
|
|
||||||
gsp_ucode->code = nvgpu_request_firmware(g,
|
gsp_ucode->code = nvgpu_request_firmware(g,
|
||||||
code_name, NVGPU_REQUEST_FIRMWARE_NO_WARN);
|
code_name, 0);
|
||||||
if (gsp_ucode->code == NULL) {
|
if (gsp_ucode->code == NULL) {
|
||||||
nvgpu_err(g, "%s ucode get failed", code_name);
|
nvgpu_err(g, "%s ucode get failed", code_name);
|
||||||
goto fw_release;
|
goto fw_release;
|
||||||
}
|
}
|
||||||
|
|
||||||
gsp_ucode->data = nvgpu_request_firmware(g,
|
gsp_ucode->data = nvgpu_request_firmware(g,
|
||||||
data_name, NVGPU_REQUEST_FIRMWARE_NO_WARN);
|
data_name, 0);
|
||||||
if (gsp_ucode->data == NULL) {
|
if (gsp_ucode->data == NULL) {
|
||||||
nvgpu_err(g, "%s ucode get failed", data_name);
|
nvgpu_err(g, "%s ucode get failed", data_name);
|
||||||
goto fw_release;
|
goto fw_release;
|
||||||
@@ -237,8 +238,11 @@ int nvgpu_gsp_bootstrap_ns(struct gk20a *g, struct nvgpu_gsp *gsp)
|
|||||||
err = nvgpu_falcon_wait_for_nvriscv_brom_completion(flcn);
|
err = nvgpu_falcon_wait_for_nvriscv_brom_completion(flcn);
|
||||||
if (err != 0) {
|
if (err != 0) {
|
||||||
nvgpu_err(g, "gsp BROM failed");
|
nvgpu_err(g, "gsp BROM failed");
|
||||||
|
goto exit;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
return err;
|
||||||
|
|
||||||
exit:
|
exit:
|
||||||
gsp_release_firmware(g, gsp);
|
gsp_release_firmware(g, gsp);
|
||||||
return err;
|
return err;
|
||||||
|
|||||||
@@ -62,6 +62,7 @@ void nvgpu_gsp_sw_deinit(struct gk20a *g, struct nvgpu_gsp *gsp)
|
|||||||
nvgpu_falcon_dbg_buf_destroy(gsp->gsp_flcn);
|
nvgpu_falcon_dbg_buf_destroy(gsp->gsp_flcn);
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
|
gsp_release_firmware(g, gsp);
|
||||||
nvgpu_kfree(g, gsp);
|
nvgpu_kfree(g, gsp);
|
||||||
gsp = NULL;
|
gsp = NULL;
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -59,6 +59,7 @@ void nvgpu_gsp_sched_suspend(struct gk20a *g, struct nvgpu_gsp_sched *gsp_sched)
|
|||||||
}
|
}
|
||||||
|
|
||||||
gsp_sched->gsp_ready = false;
|
gsp_sched->gsp_ready = false;
|
||||||
|
nvgpu_gsp_queues_free(g, g->gsp_sched->queues);
|
||||||
nvgpu_gsp_suspend(g, gsp);
|
nvgpu_gsp_suspend(g, gsp);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -57,6 +57,7 @@ struct nvgpu_gsp {
|
|||||||
|
|
||||||
int nvgpu_gsp_debug_buf_init(struct gk20a *g, u32 queue_no, u32 buffer_size);
|
int nvgpu_gsp_debug_buf_init(struct gk20a *g, u32 queue_no, u32 buffer_size);
|
||||||
void nvgpu_gsp_suspend(struct gk20a *g, struct nvgpu_gsp *gsp);
|
void nvgpu_gsp_suspend(struct gk20a *g, struct nvgpu_gsp *gsp);
|
||||||
|
void gsp_release_firmware(struct gk20a *g, struct nvgpu_gsp *gsp);
|
||||||
void nvgpu_gsp_sw_deinit(struct gk20a *g, struct nvgpu_gsp *gsp);
|
void nvgpu_gsp_sw_deinit(struct gk20a *g, struct nvgpu_gsp *gsp);
|
||||||
void nvgpu_gsp_isr_mutex_acquire(struct gk20a *g, struct nvgpu_gsp *gsp);
|
void nvgpu_gsp_isr_mutex_acquire(struct gk20a *g, struct nvgpu_gsp *gsp);
|
||||||
void nvgpu_gsp_isr_mutex_release(struct gk20a *g, struct nvgpu_gsp *gsp);
|
void nvgpu_gsp_isr_mutex_release(struct gk20a *g, struct nvgpu_gsp *gsp);
|
||||||
|
|||||||
Reference in New Issue
Block a user