mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
drivers: gpu: Fix IOMMU support for Linux v6.13
In Linux v6.13, commit f6440fcc9c7b ("iommu: Remove
iommu_domain_alloc()") removed iommu_domain_alloc() and was replaced by
iommu_paging_domain_alloc(). Use conftest to detect if the function
iommu_paging_domain_alloc() is supported by the kernel and update the
Tegra DRM and Host1x drivers accordingly.
Bug 4991705
Change-Id: I86221d96232396fdb6bdccf40c412e029881c513
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261695
(cherry picked from commit e374ac996dceee884296c9f1e53fdd0f281b3e0c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3499750
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
0980dbb86e
commit
0a8d8b47c7
@@ -140,6 +140,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += i2c_driver_struct_remove_return_type_int
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += i2c_mux_add_adapter_has_no_class_argument
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iio_dev_opaque_has_mlock
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iommu_map_has_gfp_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iommu_paging_domain_alloc
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += irq_get_nr_irqs
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += kthread_complete_and_exit
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += media_entity_remote_pad
|
||||
|
||||
@@ -7437,6 +7437,23 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_NETIF_NAPI_ADD_WEIGHT_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
iommu_paging_domain_alloc)
|
||||
#
|
||||
# Determine if iommu_paging_domain_alloc() function is present
|
||||
#
|
||||
# Added by commit a27bf2743cb8 ("iommu: Add iommu_paging_domain_alloc()
|
||||
# interface") in Linux v6.11.
|
||||
#
|
||||
CODE="
|
||||
#include <linux/iommu.h>
|
||||
void conftest_iommu_paging_domain_alloc(void)
|
||||
{
|
||||
iommu_paging_domain_alloc();
|
||||
}
|
||||
"
|
||||
compile_check_conftest "$CODE" "NV_IOMMU_PAGING_DOMAIN_ALLOC_PRESENT" "" "functions"
|
||||
;;
|
||||
|
||||
iommu_map_has_gfp_arg)
|
||||
#
|
||||
# Determine if iommu_map() has 'gfp' argument.
|
||||
|
||||
Reference in New Issue
Block a user