From 2a496cad4bb8ca162601d06beb510245603970f5 Mon Sep 17 00:00:00 2001 From: Jon Hunter Date: Mon, 31 Jan 2022 09:47:51 +0000 Subject: [PATCH] nvdla: Fix build for Linux v5.16 Building the NVDLA against the upstream kernel v5.16 is failing and errors such as the following are seen. ERROR: modpost: module nvhost-nvdla uses symbol dma_buf_detach from namespace DMA_BUF, but does not import it. ERROR: modpost: module nvhost-nvdla uses symbol dma_buf_put from namespace DMA_BUF, but does not import it. ERROR: modpost: module nvhost-nvdla uses symbol dma_buf_get from namespace DMA_BUF, but does not import it. Following upstream commit 16b0314aa746 ("dma-buf: move dma-buf symbols into the DMA_BUF module namespace"), it is now necessary to import the DMA_BUF module namespace into the Tegra DRM driver to fix this. JIRA LS-410 Change-Id: I31f43fd4425ce80c975651d902b66f56464b0465 Signed-off-by: Jon Hunter Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvidia/+/2661773 Tested-by: mobile promotions Reviewed-by: mobile promotions --- drivers/video/tegra/host/nvdla/nvdla.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/video/tegra/host/nvdla/nvdla.c b/drivers/video/tegra/host/nvdla/nvdla.c index 37b18fca..f3bcdabb 100644 --- a/drivers/video/tegra/host/nvdla/nvdla.c +++ b/drivers/video/tegra/host/nvdla/nvdla.c @@ -1016,5 +1016,8 @@ static void __exit nvdla_exit(void) module_exit(nvdla_exit); #endif +#if KERNEL_VERSION(5, 16, 0) <= LINUX_VERSION_CODE +MODULE_IMPORT_NS(DMA_BUF); +#endif MODULE_AUTHOR("Shridhar Rasal "); MODULE_LICENSE("GPL v2");