gpu: nvgpu: add is_gsp_supported flag

This patch adds is_gsp_supported flag and initializes it for GA10B,
TU104. Further, this flag is checked before initializaing GSP LITE
falcon.

JIRA NVGPU-9983

Change-Id: If0a4a3095c15cac113895f3d114e731f35211c5d
Signed-off-by: Rajesh Devaraj <rdevaraj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2902651
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: Lakshmanan M <lm@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Rajesh Devaraj
2023-05-12 06:28:38 +00:00
committed by mobile promotions
parent 789ebda23d
commit a321679a5d
4 changed files with 13 additions and 6 deletions

View File

@@ -273,10 +273,12 @@ static int nvgpu_falcons_sw_init(struct gk20a *g)
}
#endif
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;
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;
}
}
return 0;
@@ -308,7 +310,9 @@ static void nvgpu_falcons_sw_free(struct gk20a *g)
g->ops.falcon.falcon_sw_free(g, FALCON_ID_FECS);
#ifdef CONFIG_NVGPU_DGPU
g->ops.falcon.falcon_sw_free(g, FALCON_ID_GSPLITE);
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);