gpu: nvgpu: Drop version check for DMA BUF namespace

The MODULE_IMPORT_NS macro adds a namespace tag to the module
information. The DMA_BUF namespace is required for Linux v5.16+ kernels
for drivers that use DMA BUF, there is no reason not to populate this
for earlier kernels. Furthermore, some 3rd party kernels prior to v5.16
may require this too and so drop the version check around the DMA BUF
namespace.

The MODULE_IMPORT_NS macro was introduced in Linux v5.4 and so if the
kernel defines this, then add the DMA_BUF namespace.

Bug 4119327

Change-Id: Ic9acfeedce3a783434fe9cc2ded788c522629bbd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2986636
(cherry picked from commit fd8ed471078450172062ca2a11f13d99ad57e1cb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nvgpu/+/2990695
Reviewed-by: Ankur Kishore <ankkishore@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2023-09-27 11:57:54 +01:00
committed by mobile promotions
parent 9fab6f05af
commit 0fa5fc1583

View File

@@ -2102,7 +2102,7 @@ static void __exit gk20a_exit(void)
platform_driver_unregister(&gk20a_driver); platform_driver_unregister(&gk20a_driver);
} }
#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 16, 0) #ifdef MODULE_IMPORT_NS
MODULE_IMPORT_NS(DMA_BUF); MODULE_IMPORT_NS(DMA_BUF);
#endif #endif
#ifdef CONFIG_GK20A_DEVFREQ #ifdef CONFIG_GK20A_DEVFREQ