Files
linux-nvgpu/drivers/gpu/nvgpu/Makefile.shared.configs
Vedashree Vidwans 6f37ac5de2 gpu: nvgpu: Disable logging for safety build
This patch adds a conditional flag to filter out logging functions from
safety release build. Logging functions are replaced with stubs.

Jira NVGPU-869

Change-Id: If898b9ce8edb260727df28b407df83f0a92f61ad
Signed-off-by: Vedashree Vidwans <vvidwans@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2109509
Reviewed-by: Alex Waterman <alexw@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-06-17 00:16:03 -07:00

152 lines
5.4 KiB
Makefile

#
# Copyright (c) 2019, NVIDIA CORPORATION. All rights reserved.
#
# Permission is hereby granted, free of charge, to any person obtaining a
# copy of this software and associated documentation files (the "Software"),
# to deal in the Software without restriction, including without limitation
# the rights to use, copy, modify, merge, publish, distribute, sublicense,
# and/or sell copies of the Software, and to permit persons to whom the
# Software is furnished to do so, subject to the following conditions:
#
# The above copyright notice and this permission notice shall be included in
# all copies or substantial portions of the Software.
#
# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
# IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
# FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL
# THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
# LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
# FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
# DEALINGS IN THE SOFTWARE.
#
# This file defines the make variables and cflags applicable to nvgpu common
# shared by qnx, nvgpu userspace, test builds. Note that cflags are added to
# variable NVGPU_COMMON_CFLAGS that needs to be used by the parent Makefile
# to update corresponding cflags variable.
# Default is the regular profile. That can be overridden if necessary. by
# setting the NVGPU_FORCE_SAFETY_PROFILE. This is a useful hack while we
# wait for the userspace tmake build to make its way into a proper safety
# profile build.
profile := default
# Decide whether to use the safety profile or the regular profile.
ifeq ($(NV_BUILD_CONFIGURATION_IS_SAFETY),1)
profile := safety
ifeq ($(NV_BUILD_CONFIGURATION_IS_DEBUG),1)
profile := safety_debug
endif
endif
ifeq ($(NVGPU_FORCE_SAFETY_PROFILE),1)
profile := safety
ifeq ($(NVGPU_FORCE_DEBUG_PROFILE),1)
profile := safety_debug
endif
endif
NVGPU_COMMON_CFLAGS :=
#
# Flags always enabled regardless of build profile.
#
NVGPU_COMMON_CFLAGS += \
-DCONFIG_TEGRA_GK20A_NVHOST \
-DCONFIG_TEGRA_T19X_GRHOST \
-DCONFIG_NVGPU_SUPPORT_TURING \
-DCONFIG_TEGRA_GK20A_PMU=1 \
-DCONFIG_TEGRA_ACR=1 \
-DCONFIG_TEGRA_GR_VIRTUALIZATION \
-DCONFIG_GK20A_VIDMEM=1 \
-DCONFIG_PCI_MSI
# Enable debugger APIs for safety build until devctl whitelisting is done
CONFIG_NVGPU_DEBUGGER := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_DEBUGGER
# Enable CILP preemption for safety build until devctl whitelisting is done
CONFIG_NVGPU_CILP := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_CILP
# Enable cyclestats APIs for safety build until complete debugger support is enabled
CONFIG_NVGPU_CYCLESTATS := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_CYCLESTATS
# Enable USERD for safety build until we switch to user mode submits only
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_USERD
# Enable Channel WDT for safety build until we switch to user mode submits only
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_CHANNEL_WDT
# Enable CE support for safety build until we remove Vidmem clear support.
CONFIG_NVGPU_CE := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_CE
# Enable Grpahics support for safety build until we switch to compute only
CONFIG_NVGPU_GRAPHICS := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_GRAPHICS
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_FIFO_ENGINE_ACTIVITY
# Enable Channel/TSG Scheduling for safety build until devctl whitelisting is done
CONFIG_NVGPU_CHANNEL_TSG_SCHEDULING := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_CHANNEL_TSG_SCHEDULING
# Enable Channel/TSG Control for safety build until devctl whitelisting is done
CONFIG_NVGPU_CHANNEL_TSG_CONTROL := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_CHANNEL_TSG_CONTROL
# Enable compression support for safety build for now. To be removed.
CONFIG_NVGPU_COMPRESSION := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_COMPRESSION
#
# Flags enabled for only the regular build profile.
#
ifneq ($(profile),safety)
# Enable logging for non-safety builds
CONFIG_NVGPU_LOGGING := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_LOGGING
ifneq ($(profile),safety_debug)
# ACR feature to enable old tegra ACR profile support
CONFIG_NVGPU_ACR_LEGACY := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_ACR_LEGACY
CONFIG_NVGPU_ENGINE_QUEUE := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_ENGINE_QUEUE
CONFIG_NVGPU_FECS_TRACE := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_FECS_TRACE
CONFIG_NVGPU_IGPU_VIRT := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_IGPU_VIRT
# Enable nvlink support for normal build.
CONFIG_NVGPU_NVLINK := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_NVLINK
# Enable dgpu support for normal build.
CONFIG_NVGPU_DGPU := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_DGPU
CONFIG_NVGPU_VPR := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_VPR
CONFIG_NVGPU_REPLAYABLE_FAULT := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_REPLAYABLE_FAULT
# Enable LS PMU support for normal build
CONFIG_NVGPU_LS_PMU := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_LS_PMU
# Enable elpg support for normal build
CONFIG_NVGPU_POWER_PG := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_NVGPU_POWER_PG
endif
endif