mirror of
git://nv-tegra.nvidia.com/linux-nvgpu.git
synced 2025-12-24 10:34:43 +03:00
gpu: nvgpu: skip falcon sw init for pmu
Perform falcon sw init for PMU only if it is supported in the platform. JIRA NVGPU-9283 Change-Id: I697e389a7cd812c7cb941eac010549f541074bb4 Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2848436 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
6196d3f382
commit
e5c5fee01e
@@ -239,10 +239,12 @@ static int nvgpu_falcons_sw_init(struct gk20a *g)
|
||||
{
|
||||
int err;
|
||||
|
||||
err = g->ops.falcon.falcon_sw_init(g, FALCON_ID_PMU);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "failed to sw init FALCON_ID_PMU");
|
||||
return err;
|
||||
if (g->ops.pmu.is_pmu_supported != NULL) {
|
||||
err = g->ops.falcon.falcon_sw_init(g, FALCON_ID_PMU);
|
||||
if (err != 0) {
|
||||
nvgpu_err(g, "failed to sw init FALCON_ID_PMU");
|
||||
return err;
|
||||
}
|
||||
}
|
||||
|
||||
err = g->ops.falcon.falcon_sw_init(g, FALCON_ID_FECS);
|
||||
@@ -282,7 +284,9 @@ done_fecs:
|
||||
#endif
|
||||
g->ops.falcon.falcon_sw_free(g, FALCON_ID_FECS);
|
||||
done_pmu:
|
||||
g->ops.falcon.falcon_sw_free(g, FALCON_ID_PMU);
|
||||
if (g->ops.pmu.is_pmu_supported != NULL) {
|
||||
g->ops.falcon.falcon_sw_free(g, FALCON_ID_PMU);
|
||||
}
|
||||
|
||||
return err;
|
||||
}
|
||||
@@ -290,7 +294,9 @@ done_pmu:
|
||||
/* handle poweroff and error case for all falcons interface layer support */
|
||||
static void nvgpu_falcons_sw_free(struct gk20a *g)
|
||||
{
|
||||
g->ops.falcon.falcon_sw_free(g, FALCON_ID_PMU);
|
||||
if (g->ops.pmu.is_pmu_supported != NULL) {
|
||||
g->ops.falcon.falcon_sw_free(g, FALCON_ID_PMU);
|
||||
}
|
||||
g->ops.falcon.falcon_sw_free(g, FALCON_ID_FECS);
|
||||
|
||||
#ifdef CONFIG_NVGPU_DGPU
|
||||
|
||||
Reference in New Issue
Block a user