gpu: nvgpu: falcon2/riscv update for multimedia

- Define falcon ID for OFA and NVJPG
- Initialize falcon sw for OFA and NVJPG
- Program boot_vector before riscv kick-start

Jira NVGPU-9429
Bug 3962979

Change-Id: If6e63cb1e99ada3742b708bb0f8f7edc64366318
Signed-off-by: Santosh BS <santoshb@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2913882
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: svc-mobile-coverity <svc-mobile-coverity@nvidia.com>
Reviewed-by: Mahantesh Kumbar <mkumbar@nvidia.com>
Reviewed-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-by: svc-mobile-cert <svc-mobile-cert@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Santosh BS
2023-06-01 07:17:22 +00:00
committed by mobile promotions
parent 912cb15999
commit be5312cb9b
11 changed files with 74 additions and 31 deletions

View File

@@ -259,6 +259,7 @@ static int nvgpu_falcons_sw_init(struct gk20a *g)
nvgpu_err(g, "failed to sw init FALCON_ID_SEC2");
goto done_fecs;
}
#endif
err = g->ops.falcon.falcon_sw_init(g, FALCON_ID_NVDEC);
if (err != 0) {
@@ -272,23 +273,38 @@ static int nvgpu_falcons_sw_init(struct gk20a *g)
goto done_nvdec;
}
#endif
err = g->ops.falcon.falcon_sw_init(g, FALCON_ID_OFA);
if (err != 0) {
nvgpu_err(g, "failed to sw init FALCON_ID_OFA");
goto done_nvenc;
}
err = g->ops.falcon.falcon_sw_init(g, FALCON_ID_NVJPG);
if (err != 0) {
nvgpu_err(g, "failed to sw init FALCON_ID_NVENC");
goto done_ofa;
}
if (g->ops.gsp.is_gsp_supported != false) {
err = g->ops.falcon.falcon_sw_init(g, FALCON_ID_GSPLITE);
if (err != 0) {
nvgpu_err(g, "failed to sw init FALCON_ID_GSPLITE");
goto done_nvenc;
goto done_nvjpg;
}
}
return 0;
done_nvjpg:
g->ops.falcon.falcon_sw_free(g, FALCON_ID_NVJPG);
done_ofa:
g->ops.falcon.falcon_sw_free(g, FALCON_ID_OFA);
done_nvenc:
#ifdef CONFIG_NVGPU_DGPU
g->ops.falcon.falcon_sw_free(g, FALCON_ID_NVENC);
done_nvdec:
g->ops.falcon.falcon_sw_free(g, FALCON_ID_NVDEC);
done_sec2:
#ifdef CONFIG_NVGPU_DGPU
g->ops.falcon.falcon_sw_free(g, FALCON_ID_SEC2);
done_fecs:
#endif
@@ -308,13 +324,15 @@ static void nvgpu_falcons_sw_free(struct gk20a *g)
g->ops.falcon.falcon_sw_free(g, FALCON_ID_PMU);
}
g->ops.falcon.falcon_sw_free(g, FALCON_ID_FECS);
g->ops.falcon.falcon_sw_free(g, FALCON_ID_NVENC);
g->ops.falcon.falcon_sw_free(g, FALCON_ID_OFA);
g->ops.falcon.falcon_sw_free(g, FALCON_ID_NVDEC);
g->ops.falcon.falcon_sw_free(g, FALCON_ID_NVJPG);
#ifdef CONFIG_NVGPU_DGPU
if (g->ops.gsp.is_gsp_supported != false) {
g->ops.falcon.falcon_sw_free(g, FALCON_ID_GSPLITE);
}
g->ops.falcon.falcon_sw_free(g, FALCON_ID_NVDEC);
g->ops.falcon.falcon_sw_free(g, FALCON_ID_NVENC);
g->ops.falcon.falcon_sw_free(g, FALCON_ID_SEC2);
#endif
}