From 9b58826f97f5b010930dda104057cf9989ec2284 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Thu, 9 Mar 2023 13:50:06 +0000 Subject: [PATCH] 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 Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2868502 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/Makefile.linux.configs | 2 ++ 1 file changed, 2 insertions(+) diff --git a/drivers/gpu/nvgpu/Makefile.linux.configs b/drivers/gpu/nvgpu/Makefile.linux.configs index ad949ea03..f917c752d 100644 --- a/drivers/gpu/nvgpu/Makefile.linux.configs +++ b/drivers/gpu/nvgpu/Makefile.linux.configs @@ -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)