From f5b50fec4d66092c71fd9c93b48863d4d7429718 Mon Sep 17 00:00:00 2001 From: Laxman Dewangan Date: Fri, 31 Mar 2023 07:50:44 +0000 Subject: [PATCH] nvgpu: Add out-of-tree headers path when building as OOT module It is required to build nvgpu as separate module from OOT modules because its source will be continue to be in different repository. The nvgpu module will depends on the headers and symvars from core kernel and OOT modules. Add the path of headers of OOT modules when compiling the nvgpu as OOT module. Bug 4038415 Change-Id: I0f42c8e75ca63784c9d9ba3624e5ed0141e1df77 Signed-off-by: Laxman Dewangan Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2880466 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/gpu/nvgpu/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/gpu/nvgpu/Makefile b/drivers/gpu/nvgpu/Makefile index 5a8bb21ab..df1e40aee 100644 --- a/drivers/gpu/nvgpu/Makefile +++ b/drivers/gpu/nvgpu/Makefile @@ -52,6 +52,11 @@ endif ccflags-y += -I$(srctree.nvmap)/include endif +# When compiling as OOT module, include the headers from nvidia-oot tree. +ifeq ($(CONFIG_TEGRA_OOT_MODULE),m) +ccflags-y += -I$(srctree.nvidia)/include +endif + ifeq ($(CONFIG_NVGPU_DEBUGGER),y) ccflags-y += -DCONFIG_NVGPU_DEBUGGER ccflags-y += -DCONFIG_NVGPU_ENGINE_RESET