Files
linux-nvgpu/drivers/gpu/nvgpu/Makefile.shared.configs
Seema Khowala a72bfa63b2 gpu: nvgpu: Add NVGPU_FEATURE_POWER_PG compiler flag
This flag is added to compile out below features from
safety build
-elpg

JIRA NVGPU-3425

Change-Id: I439edb444a4ebe1732a379aecbb0ffc8b48eb97c
Signed-off-by: Seema Khowala <seemaj@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/2127449
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2019-06-04 12:05:49 -07:00

130 lines
4.8 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
endif
ifeq ($(NVGPU_FORCE_SAFETY_PROFILE),1)
profile := safety
endif
NVGPU_COMMON_CFLAGS :=
#
# Flags always enabled regardless of build profile.
#
NVGPU_COMMON_CFLAGS += \
-DCONFIG_TEGRA_GK20A_NVHOST \
-DCONFIG_GK20A_CYCLE_STATS \
-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
NVGPU_DEBUGGER := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_DEBUGGER
# Enable cyclestats APIs for safety build until complete debugger support is enabled
NVGPU_CYCLESTATS_SUPPORT := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_GK20A_CYCLE_STATS
# Enable USERD for safety build until we switch to user mode submits only
NVGPU_COMMON_CFLAGS += -DNVGPU_USERD
# Enable Channel WDT for safety build until we switch to user mode submits only
NVGPU_COMMON_CFLAGS += -DNVGPU_CHANNEL_WDT
# Enable CE support for safety build until we remove Vidmem clear support.
NVGPU_FEATURE_CE := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_FEATURE_CE
# Enable Grpahics support for safety build until we switch to compute only
NVGPU_GRAPHICS := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_GRAPHICS
NVGPU_COMMON_CFLAGS += -DNVGPU_ENGINE
# Enable Channel/TSG Scheduling for safety build until devctl whitelisting is done
NVGPU_FEATURE_CHANNEL_TSG_SCHEDULING := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_FEATURE_CHANNEL_TSG_SCHEDULING
# Enable Channel/TSG Control for safety build until devctl whitelisting is done
NVGPU_FEATURE_CHANNEL_TSG_CONTROL := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_FEATURE_CHANNEL_TSG_CONTROL
#
# Flags enabled for only the regular build profile.
#
ifneq ($(profile),safety)
# ACR feature to enable old tegra ACR profile support
NVGPU_FEATURE_ACR_LEGACY := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_FEATURE_ACR_LEGACY
NVGPU_FEATURE_ENGINE_QUEUE := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_FEATURE_ENGINE_QUEUE
NVGPU_FECS_TRACE_SUPPORT := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_GK20A_CTXSW_TRACE
IGPU_VIRT_SUPPORT := 1
NVGPU_COMMON_CFLAGS += -DIGPU_VIRT_SUPPORT
# Enable nvlink support for normal build.
NVGPU_NVLINK_SUPPORT := 1
NVGPU_COMMON_CFLAGS += -DCONFIG_TEGRA_NVLINK
# Enable dgpu support for normal build.
NVGPU_DGPU_SUPPORT := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_DGPU_SUPPORT
NVGPU_VPR := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_VPR
NVGPU_REPLAYABLE_FAULT := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_REPLAYABLE_FAULT
# Enable LS PMU support for normal build
NVGPU_FEATURE_LS_PMU := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_FEATURE_LS_PMU
# Enable elpg support for normal build
NVGPU_FEATURE_POWER_PG := 1
NVGPU_COMMON_CFLAGS += -DNVGPU_FEATURE_POWER_PG
endif