gpu: nvgpu: Fix build for Linux without virtualization

L4T does not support virtualization currently and so we should be able
to build NVGPU without virtualization support. This avoids having to
build many virtualization drivers for Tegra.

The build flag CONFIG_TEGRA_VIRTUALIZATION was added for building
out-of-tree drivers to select if virtualization is enabled or not. This
is enabled by default. However, if this is not set, then driver should
still build. Currently, NVGPU is not building when
CONFIG_TEGRA_VIRTUALIZATION is not set because
CONFIG_TEGRA_GR_VIRTUALIZATION is now always enabled for NVGPU. Fix this
by wrapping CONFIG_TEGRA_GR_VIRTUALIZATION with
CONFIG_TEGRA_VIRTUALIZATION.

Jira GVSCI-16046

Change-Id: I5448ad73d4d4e3e151ef216a7fcf0469890fd5ec
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2868502
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
Jon Hunter
2023-03-09 13:50:06 +00:00
committed by mobile promotions
parent dc0dc2e96a
commit 9b58826f97

View File

@@ -59,9 +59,11 @@ CONFIG_NVGPU_SUPPORT_GV11B := y
ifeq ($(CONFIG_TEGRA_OOT_MODULE),m)
CONFIG_TEGRA_HOST1X_NEXT := m
CONFIG_TEGRA_NVMAP_NEXT := m
ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y)
CONFIG_TEGRA_GR_VIRTUALIZATION := y
ccflags-y += -DCONFIG_TEGRA_GR_VIRTUALIZATION
endif
endif
# Enable support for extraction of comptags for CDE.
ifeq ($(CONFIG_NVGPU_COMPRESSION),y)