From b43fbafa93d8480045c9546fa186f554eecbae16 Mon Sep 17 00:00:00 2001 From: Debarshi Dutta Date: Thu, 4 Jul 2019 16:18:00 +0530 Subject: [PATCH] gpu: nvgpu: compile out FENCES from safety build Add CONFIG_NVGPU_FENCE safety build flag to compile out common/fence/fence.c from safety build. Jira NVGPU-3429 Change-Id: I726b3aa85fee26e314ed1677b9a0df284ccd7c45 Signed-off-by: Debarshi Dutta Reviewed-on: https://git-master.nvidia.com/r/2143512 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/Makefile.shared.configs | 3 +++ drivers/gpu/nvgpu/Makefile.sources | 5 ++++- 2 files changed, 7 insertions(+), 1 deletion(-) diff --git a/drivers/gpu/nvgpu/Makefile.shared.configs b/drivers/gpu/nvgpu/Makefile.shared.configs index 1b9d74b50..f54817c06 100644 --- a/drivers/gpu/nvgpu/Makefile.shared.configs +++ b/drivers/gpu/nvgpu/Makefile.shared.configs @@ -80,6 +80,9 @@ NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_CHANNEL_WDT CONFIG_NVGPU_KERNEL_MODE_SUBMIT := 1 NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_KERNEL_MODE_SUBMIT +# Enable fences for safety build till until we switch to user mode submits only +CONFIG_NVGPU_FENCE := 1 + NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_FIFO_ENGINE_ACTIVITY # Enable Channel/TSG Scheduling for safety build until devctl whitelisting is done diff --git a/drivers/gpu/nvgpu/Makefile.sources b/drivers/gpu/nvgpu/Makefile.sources index 91412c191..1ee359150 100644 --- a/drivers/gpu/nvgpu/Makefile.sources +++ b/drivers/gpu/nvgpu/Makefile.sources @@ -146,7 +146,6 @@ srcs += common/utils/enabled.c \ common/fifo/pbdma_status.c \ common/fifo/userd.c \ common/mc/mc.c \ - common/fence/fence.c \ hal/mc/mc_gm20b.c \ hal/mc/mc_gp10b.c \ hal/bus/bus_gk20a.c \ @@ -383,6 +382,10 @@ srcs += common/fifo/submit.c \ hal/sync/sema_cmdbuf_gv11b.c endif +ifeq ($(CONFIG_NVGPU_FENCE),1) +srcs += common/fence/fence.c +endif + ifeq ($(CONFIG_NVGPU_FECS_TRACE),1) srcs += common/gr/fecs_trace.c \ hal/gr/fecs_trace/fecs_trace_gm20b.c \