gpu: nvgpu: Update include paths for OOT module

When building NVGPU as an OOT module for upstream Linux kernels, the
NVGPU driver source is now copied into a common location with all the
other OOT modules. Therefore, we can now use the 'srctree.nvidia' path
for finding the necessary header files for Host1x and NVMAP. Update the
include search paths to use 'srctree.nvidia' when building NVGPU as an
OOT module.

Bug 3817518

Change-Id: I63066e4331c66a0f47ada83fde3e63402faaf38a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2785910
(cherry picked from commit 6bef424e1e)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2809488
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2022-09-30 15:04:51 +01:00
committed by mobile promotions
parent 00f4dbf9aa
commit 235ec32291

View File

@@ -39,7 +39,7 @@ endif
# srctree.host1x path in order to find the necessary header files for # srctree.host1x path in order to find the necessary header files for
# the upstream host1x driver. # the upstream host1x driver.
ifeq ($(CONFIG_TEGRA_GK20A_NVHOST_HOST1X),y) ifeq ($(CONFIG_TEGRA_GK20A_NVHOST_HOST1X),y)
ccflags-y += -I$(srctree.host1x)/include ccflags-y += -I$(srctree.nvidia)/drivers/gpu/host1x/include
endif endif
# When using the upstream nvmap driver, the Makefile must define the # When using the upstream nvmap driver, the Makefile must define the
@@ -47,7 +47,7 @@ endif
# the upstream nvmap driver. # the upstream nvmap driver.
ifeq ($(CONFIG_NVGPU_NVMAP_NEXT),y) ifeq ($(CONFIG_NVGPU_NVMAP_NEXT),y)
ifeq ($(origin srctree.nvmap), undefined) ifeq ($(origin srctree.nvmap), undefined)
srctree.nvmap := $(abspath $(shell dirname $(lastword $(MAKEFILE_LIST)))/../../../../nvidia/drivers/video/tegra/nvmap) srctree.nvmap := $(srctree.nvidia)/drivers/video/tegra/nvmap
endif endif
ccflags-y += -I$(srctree.nvmap)/include ccflags-y += -I$(srctree.nvmap)/include
endif endif