diff --git a/drivers/video/tegra/nvmap/Makefile b/drivers/video/tegra/nvmap/Makefile index 629065f0..34ff1291 100644 --- a/drivers/video/tegra/nvmap/Makefile +++ b/drivers/video/tegra/nvmap/Makefile @@ -7,6 +7,10 @@ subdir-ccflags-y := -Werror include $(srctree.nvidia-oot)/drivers/video/tegra/nvmap/Makefile.memory.configs +ifeq ($(CONFIG_TEGRA_VIRTUALIZATION),y) +ccflags-y += -DCONFIG_TEGRA_VIRTUALIZATION +endif + ifeq ($(NVMAP_CONFIG), y) # Build NvMap only when NVMAP_CONFIG is set to y nvmap-y := nvmap_core.o \ diff --git a/drivers/video/tegra/nvmap/nvmap_init.c b/drivers/video/tegra/nvmap/nvmap_init.c index a38a239a..5a8f2f90 100644 --- a/drivers/video/tegra/nvmap/nvmap_init.c +++ b/drivers/video/tegra/nvmap/nvmap_init.c @@ -37,7 +37,11 @@ #include "nvmap_priv.h" #ifdef CONFIG_TEGRA_VIRTUALIZATION +#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) #include +#else +#include +#endif #include #endif