mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
media: Use conftest to find if enum v4l2_async_match_type present
Use conftest to determine if the 'enum v4l2_async_match_type'
has the "TYPE" in its name.
In Linux 6.5, with change commit 7a2259fc5182b ("media: v4l: async:
Rename V4L2_ASYNC_MATCH_ macros, add TYPE_"), the enum names has "TYPE" also.
Bug 4346767
Change-Id: I863da8496337d4003188b654673c67cdb3eef155
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028745
Reviewed-by: Shardar Mohammed <smohammed@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
234ba9c75f
commit
5f77d6d51a
3
Makefile
3
Makefile
@@ -36,9 +36,6 @@ endif
|
|||||||
|
|
||||||
# Changes done in Linux 6.6 onwards
|
# Changes done in Linux 6.6 onwards
|
||||||
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_6); echo $$?),0)
|
ifeq ($(shell test $(LINUX_VERSION) -ge $(LINUX_VERSION_6_6); echo $$?),0)
|
||||||
# Rename V4L2_ASYNC_MATCH_FWNODE to V4L2_ASYNC_MATCH_TYPE_FWNODE
|
|
||||||
subdir-ccflags-y += -DNV_V4L2_ASYNC_MATCH_FWNODE_RENAME
|
|
||||||
|
|
||||||
# Rename async_nf_init and v4l2_async_subdev_nf_register
|
# Rename async_nf_init and v4l2_async_subdev_nf_register
|
||||||
subdir-ccflags-y += -DNV_V4L2_ASYNC_NF_SUBDEVICE_INIT_RENAME
|
subdir-ccflags-y += -DNV_V4L2_ASYNC_NF_SUBDEVICE_INIT_RENAME
|
||||||
|
|
||||||
|
|||||||
@@ -480,7 +480,7 @@ static int tegra_vi_graph_parse_one(struct tegra_channel *chan,
|
|||||||
}
|
}
|
||||||
|
|
||||||
entity->node = remote;
|
entity->node = remote;
|
||||||
#if defined(NV_V4L2_ASYNC_MATCH_FWNODE_RENAME)
|
#if defined(NV_V4L2_ASYNC_MATCH_TYPE_ENUM_PRESENT) /* Linux 6.5 */
|
||||||
entity->asd.match.type = V4L2_ASYNC_MATCH_TYPE_FWNODE;
|
entity->asd.match.type = V4L2_ASYNC_MATCH_TYPE_FWNODE;
|
||||||
#else
|
#else
|
||||||
entity->asd.match_type = V4L2_ASYNC_MATCH_FWNODE;
|
entity->asd.match_type = V4L2_ASYNC_MATCH_FWNODE;
|
||||||
@@ -641,7 +641,7 @@ int tegra_vi_graph_init(struct tegra_mc_vi *vi)
|
|||||||
|
|
||||||
/* Add the remote entity of this endpoint */
|
/* Add the remote entity of this endpoint */
|
||||||
entity->node = remote;
|
entity->node = remote;
|
||||||
#if defined(NV_V4L2_ASYNC_MATCH_FWNODE_RENAME)
|
#if defined(NV_V4L2_ASYNC_MATCH_TYPE_ENUM_PRESENT) /* Linux 6.5 */
|
||||||
entity->asd.match.type = V4L2_ASYNC_MATCH_TYPE_FWNODE;
|
entity->asd.match.type = V4L2_ASYNC_MATCH_TYPE_FWNODE;
|
||||||
#else
|
#else
|
||||||
entity->asd.match_type = V4L2_ASYNC_MATCH_FWNODE;
|
entity->asd.match_type = V4L2_ASYNC_MATCH_FWNODE;
|
||||||
|
|||||||
@@ -143,6 +143,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra_dev_iommu_get_stream_id
|
|||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra_ivc_struct_has_iosys_map
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tegra_ivc_struct_has_iosys_map
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tty_operations_struct_write_has_u8_ptr_arg
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += tty_operations_struct_write_has_u8_ptr_arg
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_connection_struct_present
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_connection_struct_present
|
||||||
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_match_type_enum_present
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += vm_area_struct_has_const_vm_flags
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += vm_area_struct_has_const_vm_flags
|
||||||
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_fd_to_handle
|
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_fd_to_handle
|
||||||
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_handle_to_fd
|
NV_CONFTEST_GENERIC_COMPILE_TESTS += is_export_symbol_present_drm_gem_prime_handle_to_fd
|
||||||
|
|||||||
@@ -7342,6 +7342,22 @@ compile_test() {
|
|||||||
compile_check_conftest "$CODE" "NV_V4L2_ASYNC_CONNECTION_STRUCT_PRESENT" "" "types"
|
compile_check_conftest "$CODE" "NV_V4L2_ASYNC_CONNECTION_STRUCT_PRESENT" "" "types"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
v4l2_async_match_type_enum_present)
|
||||||
|
#
|
||||||
|
# Determine if the 'enum v4l2_async_match_type' has the "TYPE" in its name.
|
||||||
|
#
|
||||||
|
# In Linux 6.5, with change commit 7a2259fc5182b ("media: v4l: async:
|
||||||
|
# Rename V4L2_ASYNC_MATCH_ macros, add TYPE_"), the enum names has "TYPE" also.
|
||||||
|
#
|
||||||
|
CODE="
|
||||||
|
#include <media/v4l2-async.h>
|
||||||
|
int conftest_v4l2_async_match_type_enum_present(void) {
|
||||||
|
return V4L2_ASYNC_MATCH_TYPE_I2C;
|
||||||
|
}"
|
||||||
|
|
||||||
|
compile_check_conftest "$CODE" "NV_V4L2_ASYNC_MATCH_TYPE_ENUM_PRESENT" "" "types"
|
||||||
|
;;
|
||||||
|
|
||||||
# When adding a new conftest entry, please use the correct format for
|
# When adding a new conftest entry, please use the correct format for
|
||||||
# specifying the relevant upstream Linux kernel commit.
|
# specifying the relevant upstream Linux kernel commit.
|
||||||
#
|
#
|
||||||
|
|||||||
Reference in New Issue
Block a user