From 8834d598e4bc24720a208de35b4fbc93b4c7d9d8 Mon Sep 17 00:00:00 2001 From: Sagar Kamble Date: Fri, 14 Jan 2022 22:45:32 +0530 Subject: [PATCH] gpu: nvgpu: fix CONFIG_NVGPU_NVMAP_NEXT definition CONFIG_NVGPU_NVMAP_NEXT was defined for all kernels except 4.9. However, Android builds nvgpu without NV_BUILD_KERNEL_OPTIONS set and it fails while looking for definitions of the functions nvmap_dma_alloc_attrs and nvmap_dma_free_attrs. Define it for kstable if CONFIG_TEGRA_NVMAP_NEXT is set and define it for kernel 5.10 (downstream) explicitly. Bug 3445216 Change-Id: If73ca56cfc5668d6e318f470b31d999d663a4483 Signed-off-by: Sagar Kamble Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2654677 Tested-by: mobile promotions Reviewed-by: svcacv Reviewed-by: Kevin Kuo (SW-GPU) Reviewed-by: Vijayakumar Subbu Reviewed-by: Ashish Mhetre Reviewed-by: mobile promotions GVS: Gerrit_Virtual_Submit --- drivers/gpu/nvgpu/Makefile.linux.configs | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/drivers/gpu/nvgpu/Makefile.linux.configs b/drivers/gpu/nvgpu/Makefile.linux.configs index e4686b3ef..adcc83994 100644 --- a/drivers/gpu/nvgpu/Makefile.linux.configs +++ b/drivers/gpu/nvgpu/Makefile.linux.configs @@ -94,9 +94,11 @@ CONFIG_TEGRA_GK20A_NVHOST := y CONFIG_TEGRA_GK20A_NVHOST_HOST1X := y endif -ifneq ($(findstring 4.9,$(NV_BUILD_KERNEL_OPTIONS)),) -CONFIG_NVGPU_NVMAP_NEXT := n -else +ifdef CONFIG_TEGRA_NVMAP_NEXT +CONFIG_NVGPU_NVMAP_NEXT := y +endif + +ifneq ($(findstring 5.10,$(NV_BUILD_KERNEL_OPTIONS)),) CONFIG_NVGPU_NVMAP_NEXT := y endif