gpu: nvgpu: init: compile out non-FUSA HAL inits

HAL inits for GM20B and GP10B can be removed when the safety profile
is in use.

JIRA NVGPU-3690

Change-Id: Ic516d1695f6c1362b48a028f2d1df5895ccd52f0
Signed-off-by: Nicolas Benech <nbenech@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2140894
GVS: Gerrit_Virtual_Submit
Reviewed-by: Sagar Kamble <skamble@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Nicolas Benech
2019-06-21 16:34:14 -04:00
committed by mobile promotions
parent 3c22c4d9af
commit 864fa4ff82
2 changed files with 13 additions and 4 deletions

View File

@@ -183,10 +183,6 @@ srcs += common/utils/enabled.c \
hal/gr/falcon/gr_falcon_gm20b.c \
hal/gr/falcon/gr_falcon_gp10b.c \
hal/gr/falcon/gr_falcon_gv11b.c \
hal/init/hal_gm20b.c \
hal/init/hal_gm20b_litter.c \
hal/init/hal_gp10b.c \
hal/init/hal_gp10b_litter.c \
hal/init/hal_gv11b.c \
hal/init/hal_gv11b_litter.c \
hal/init/hal_init.c \
@@ -274,6 +270,15 @@ srcs += common/utils/enabled.c \
hal/top/top_gp106.c \
hal/top/top_gv11b.c
# Source files below are not guaranteed to be functionaly safe (FuSa) and are
# only included in the normal build.
ifeq ($(CONFIG_NVGPU_HAL_NON_FUSA),1)
srcs += hal/init/hal_gp10b.c \
hal/init/hal_gp10b_litter.c \
hal/init/hal_gm20b.c \
hal/init/hal_gm20b_litter.c
endif
ifeq ($(CONFIG_NVGPU_ACR_LEGACY),1)
srcs += \
common/acr/acr_blob_construct_v0.c \

View File

@@ -41,6 +41,7 @@ int nvgpu_init_hal(struct gk20a *g)
u32 ver = g->params.gpu_arch + g->params.gpu_impl;
switch (ver) {
#ifdef CONFIG_NVGPU_HAL_NON_FUSA
case GK20A_GPUID_GM20B:
nvgpu_log_info(g, "gm20b detected");
if (gm20b_init_hal(g) != 0) {
@@ -58,11 +59,14 @@ int nvgpu_init_hal(struct gk20a *g)
return -ENODEV;
}
break;
#endif
case NVGPU_GPUID_GV11B:
if (gv11b_init_hal(g) != 0) {
return -ENODEV;
}
break;
#ifdef CONFIG_NVGPU_DGPU
#if defined(CONFIG_NVGPU_SUPPORT_TURING)
case NVGPU_GPUID_TU104: