From 6c22dc7ea4ec50b050c8dedb732f74f9a3be0173 Mon Sep 17 00:00:00 2001 From: Sagar Kamble Date: Fri, 10 May 2019 14:58:50 +0530 Subject: [PATCH] gpu: nvgpu: use make flag NV_BUILD_CONFIGURATION_IS_SAFETY Update the shared config file to use the safety build flag NV_BUILD_ CONFIGURATION_IS_SAFETY instead of NVGPU_REDUCED. With these changes posix userspace and tests will be built in two configs based on this flag. JIRA NVGPU-3062 Change-Id: Iaf34dd1a8f66f2dd3f351365c369ed46a484a257 Signed-off-by: Sagar Kamble Reviewed-on: https://git-master.nvidia.com/r/2116402 GVS: Gerrit_Virtual_Submit Reviewed-by: Vijayakumar Subbu Reviewed-by: mobile promotions Tested-by: mobile promotions --- drivers/gpu/nvgpu/Makefile.shared.configs | 2 +- drivers/gpu/nvgpu/Makefile.tmk | 1 - drivers/gpu/nvgpu/common/init/nvgpu_init.c | 2 +- userspace/Makefile.tmk | 1 - userspace/units/Makefile.units.common.tmk | 2 -- 5 files changed, 2 insertions(+), 6 deletions(-) diff --git a/drivers/gpu/nvgpu/Makefile.shared.configs b/drivers/gpu/nvgpu/Makefile.shared.configs index b13c0dd83..e5186b468 100644 --- a/drivers/gpu/nvgpu/Makefile.shared.configs +++ b/drivers/gpu/nvgpu/Makefile.shared.configs @@ -41,5 +41,5 @@ NV_COMPONENT_CFLAGS += -DNVGPU_ENGINE NVGPU_DGPU_SUPPORT := 1 NV_COMPONENT_CFLAGS += -DNVGPU_DGPU_SUPPORT -ifeq ($(NVGPU_REDUCED), 0) +ifeq ($(NV_BUILD_CONFIGURATION_IS_SAFETY), 0) endif diff --git a/drivers/gpu/nvgpu/Makefile.tmk b/drivers/gpu/nvgpu/Makefile.tmk index 7d8d0b693..cf25c4259 100644 --- a/drivers/gpu/nvgpu/Makefile.tmk +++ b/drivers/gpu/nvgpu/Makefile.tmk @@ -32,7 +32,6 @@ NVGPU_NEXT_SOURCE := \ $(NV_COMPONENT_DIR)/../../../../nvgpu-next/drivers/gpu/nvgpu NVGPU_POSIX := -D__NVGPU_POSIX__ -NVGPU_REDUCED := 1 NV_COMPONENT_NAME := nvgpu-drv NV_COMPONENT_OWN_INTERFACE_DIR := . diff --git a/drivers/gpu/nvgpu/common/init/nvgpu_init.c b/drivers/gpu/nvgpu/common/init/nvgpu_init.c index dee970617..ec787c676 100644 --- a/drivers/gpu/nvgpu/common/init/nvgpu_init.c +++ b/drivers/gpu/nvgpu/common/init/nvgpu_init.c @@ -557,7 +557,7 @@ int gk20a_wait_for_idle(struct gk20a *g) void gk20a_init_gpu_characteristics(struct gk20a *g) { -#ifdef NVGPU_REDUCED +#ifdef NV_BUILD_CONFIGURATION_IS_SAFETY nvgpu_set_enabled(g, NVGPU_DRIVER_REDUCED_PROFILE, true); #endif nvgpu_set_enabled(g, NVGPU_SUPPORT_MAP_DIRECT_KIND_CTRL, true); diff --git a/userspace/Makefile.tmk b/userspace/Makefile.tmk index d3bb3c61e..976c592b4 100644 --- a/userspace/Makefile.tmk +++ b/userspace/Makefile.tmk @@ -108,7 +108,6 @@ NV_COMPONENT_SYSTEM_SHARED_LIBRARIES += dl endif NV_COMPONENT_CFLAGS += -D__NVGPU_POSIX__ -NVGPU_REDUCED := 1 NV_COMPONENT_CFLAGS += \ -DCONFIG_TEGRA_19x_GPU \ diff --git a/userspace/units/Makefile.units.common.tmk b/userspace/units/Makefile.units.common.tmk index 7534d7ba3..1708d885c 100644 --- a/userspace/units/Makefile.units.common.tmk +++ b/userspace/units/Makefile.units.common.tmk @@ -53,8 +53,6 @@ else NV_COMPONENT_CFLAGS += -D__NVGPU_POSIX__ endif -NVGPU_REDUCED := 1 - NV_COMPONENT_CFLAGS += \ -DCONFIG_TEGRA_19x_GPU \ -DCONFIG_TEGRA_GK20A_NVHOST \