Files
linux-nvgpu/drivers/gpu
Jon Hunter 42033ac29e gpu: nvgpu: Simplify include path for building as an external module
When building NVGPU, it is necessary to define 'srctree.nvgpu' so that
the NVGPU driver knows where to find its include files. When building as
an in-tree module, the overlay infrastructure defines this and when
building as an out-of-tree module, it is necessary to define this in the
Makefile that is building NVGPU. Given that the NVGPU header are located
in the NVGPU source tree, it is not necessary and simpler if the NVGPU
Makefile defines 'srctree.nvgpu' path if it is not already specified.

Furthermore, when building NVGPU as an external module with support for
the upstream host1x driver enabled, the necessary host1x header file
that is required for building NVGPU is being copied into the build
directory for NVGPU. Rather than copying the header file, it is
preferred that the path for locating the header file is passed to the
NVGPU Makefile. Add support for doing this by adding 'srctree.host1x'
variable that indicates where the host1x header files can be found
when support for the upstream host1x driver is enabled.

Bug 200687525

Change-Id: I36882cdc5ef264fbe50cd5ca4e445077c0a02c34
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2485753
Reviewed-by: Alex Waterman <alexw@nvidia.com>
Reviewed-by: Vijayakumar Subbu <vsubbu@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: Gerrit_Virtual_Submit
2021-03-01 12:45:23 -08:00
..