mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
platform: tegra: dce: Use conftest
Instead of relying on kernel version to determine if the 'tegra_ivc' structure has a member that is of type 'struct iosys_map', add a compile time test to the conftest.sh script to determine this at compile time for the kernel being used. This is beneficial for working with 3rd party Linux kernels that may have back-ported upstream changes into their kernel and so the kernel version checks do not work. Bug 4119327 Change-Id: Ia993ca9df7694347252a795c7dee1e95f2f9fa2f Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2985743 Tested-by: mobile promotions <svcmobile_promotions@nvidia.com> Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
02d724565b
commit
19fb93666d
@@ -101,6 +101,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_mode_config_struct_has_fb_base_arg
|
||||
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 += register_shrinker_has_fmt_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra_ivc_struct_has_iosys_map
|
||||
NV_CONFTEST_GENERIC_COMPILE_TESTS ?=
|
||||
NV_CONFTEST_MACRO_COMPILE_TESTS ?=
|
||||
NV_CONFTEST_SYMBOL_COMPILE_TESTS ?=
|
||||
|
||||
@@ -6544,6 +6544,25 @@ compile_test() {
|
||||
compile_check_conftest "$CODE" "NV_REGISTER_SHRINKER_HAS_FMT_ARG" "" "types"
|
||||
;;
|
||||
|
||||
tegra_ivc_struct_has_iosys_map)
|
||||
#
|
||||
# Determine if the 'tegra_ivc' structure has the 'map' argument.
|
||||
#
|
||||
# Commit 4c1e0a97351a ("firmware: tegra: bpmp: Use iosys-map
|
||||
# helpers") update the Tegra IVC driver to use iosys-map in Linux v6.2.
|
||||
#
|
||||
CODE="
|
||||
#if defined(NV_LINUX_IOSYS_MAP_H_PRESENT)
|
||||
#include <linux/iosys-map.h>
|
||||
#endif
|
||||
#include <soc/tegra/ivc.h>
|
||||
struct iosys_map *conftest_tegra_ivc_struct_has_iosys_map(struct tegra_ivc *ivc) {
|
||||
return &ivc->rx.map;
|
||||
}"
|
||||
|
||||
compile_check_conftest "$CODE" "NV_TEGRA_IVC_STRUCT_HAS_IOSYS_MAP" "" "types"
|
||||
;;
|
||||
|
||||
# When adding a new conftest entry, please use the correct format for
|
||||
# specifying the relevant upstream Linux kernel commit.
|
||||
#
|
||||
|
||||
Reference in New Issue
Block a user