From 57e31af3a6ed7f030b9cbac34652f3d5cbb9b533 Mon Sep 17 00:00:00 2001 From: Vedashree Vidwans Date: Thu, 20 Jun 2019 13:15:33 -0700 Subject: [PATCH] gpu: nvgpu: disable logging for libnvgpu build This is a follow up patch for disabling logging for userspace libnvgpu build. Logging is still force enabled for unit tests. Jira NVGPU-869 Change-Id: Ieea84fad14e3caab33ae686d4f00fd04ec80850b Signed-off-by: Vedashree Vidwans Reviewed-on: https://git-master.nvidia.com/r/2140311 Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/Makefile.shared.configs | 2 +- userspace/Makefile | 9 ++++++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/gpu/nvgpu/Makefile.shared.configs b/drivers/gpu/nvgpu/Makefile.shared.configs index 599a43266..b4b57f206 100644 --- a/drivers/gpu/nvgpu/Makefile.shared.configs +++ b/drivers/gpu/nvgpu/Makefile.shared.configs @@ -106,7 +106,7 @@ NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_COMPRESSION # Flags enabled for only the regular build profile. # ifneq ($(profile),safety) -# Enable logging for non-safety builds +# Enable logging for non-safety and safety-debug builds CONFIG_NVGPU_LOGGING := 1 NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_LOGGING diff --git a/userspace/Makefile b/userspace/Makefile index 119b0d38c..e90303b05 100644 --- a/userspace/Makefile +++ b/userspace/Makefile @@ -65,8 +65,15 @@ CONFIGS := -D__NVGPU_POSIX__ \ -DNVGPU_UNITTEST_FAULT_INJECTION_ENABLEMENT \ -D__NVGPU_UNIT_TEST__ -NVGPU_FORCE_SAFETY_PROFILE := 1 +# For target "libnvgpu", safety profile should be used +# safety-debug profile is used otherwise +ifeq ( ,$(findstring libnvgpu, '$(MAKECMDGOALS)')) NVGPU_FORCE_DEBUG_PROFILE := 1 +else +NVGPU_FORCE_DEBUG_PROFILE := 0 +endif + +NVGPU_FORCE_SAFETY_PROFILE := 1 include $(NVGPU_SRC)/Makefile.shared.configs CONFIGS+=$(NVGPU_COMMON_CFLAGS)