From 152b4a0379e901c2fe420ab7932380217b9f2636 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Wed, 11 May 2022 08:57:25 +0000 Subject: [PATCH] gpu: nvgpu: Add OOT kernel build support Add OOT kernel support same as kstable for building nvgpu as module. Bug 3642168 Change-Id: I7353275a6c5e487773b716e23610b22e2dc5780d Signed-off-by: Laxman Dewangan Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2710918 Reviewed-by: svcacv Reviewed-by: Jonathan Hunter Reviewed-by: Bitan Biswas Reviewed-by: Debarshi Dutta Reviewed-by: Alex Waterman GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/Makefile.linux.configs | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) diff --git a/drivers/gpu/nvgpu/Makefile.linux.configs b/drivers/gpu/nvgpu/Makefile.linux.configs index 80018c1de..9afab1a5f 100644 --- a/drivers/gpu/nvgpu/Makefile.linux.configs +++ b/drivers/gpu/nvgpu/Makefile.linux.configs @@ -44,6 +44,12 @@ CONFIG_NVGPU_MIG := y # Enable gv11b support CONFIG_NVGPU_SUPPORT_GV11B := y +# Set config for OOT module build +ifeq ($(CONFIG_TEGRA_OOT_MODULE),m) +CONFIG_TEGRA_HOST1X_NEXT := m +CONFIG_TEGRA_NVMAP_NEXT := m +endif + # Enable support for extraction of comptags for CDE. ifeq ($(CONFIG_NVGPU_COMPRESSION),y) CONFIG_NVGPU_SUPPORT_CDE := y @@ -117,9 +123,17 @@ ifneq ($(findstring stable,$(NV_BUILD_KERNEL_OPTIONS)),) CONFIG_NVGPU_NVMEM_FUSE := y endif +# Set CONFIG_NVGPU_IVM_BUILD for non-stable and non-oot build ifeq ($(findstring stable,$(NV_BUILD_KERNEL_OPTIONS)),) +ifneq ($(CONFIG_TEGRA_OOT_MODULE),m) CONFIG_NVGPU_IVM_BUILD := y endif +endif + +# Set config for OOT module build +ifeq ($(CONFIG_TEGRA_OOT_MODULE),m) +CONFIG_NVGPU_NVMEM_FUSE := y +endif # Enable support for GPUs on PCIe bus. ifeq ($(CONFIG_PCI),y) @@ -186,6 +200,12 @@ endif endif +# Set config for OOT module build +ifeq ($(CONFIG_TEGRA_OOT_MODULE),m) +CONFIG_GK20A_DEVFREQ := n +CONFIG_GK20A_PM_QOS := n +endif + ifeq ($(CONFIG_GK20A_PMU),y) ccflags-y += -DCONFIG_GK20A_PMU endif