mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 09:11:26 +03:00
media: camera: Fix v4l2-subdev for Linux v6.10
In Linux v6.10, the v4l2-subdev callbacks 'g_dv_timings' and 's_dv_timings' were moved from the v4l2_subdev_video_ops structure to the v4l2_subdev_pad_ops structure. Fix the build for Linux v6.10 by using conftest to determine which structure is used for these callbacks. Bug 4593750 Change-Id: Ic54e88da22ed7d1da9b6026a45b9c4307637c7b4 Signed-off-by: Jon Hunter <jonathanh@nvidia.com> Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142215 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
1a635bb0ea
commit
6255ffef44
@@ -180,6 +180,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_notifier_init
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_async_nf_init_has_v4l2_dev_arg
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += __v4l2_async_nf_add_subdev
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_subdev_pad_ops_struct_has_get_frame_interval
|
||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += v4l2_subdev_pad_ops_struct_has_dv_timings
|
||||
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_handle_to_fd
|
||||
|
||||
@@ -8014,6 +8014,28 @@ compile_test() {
|
||||
"NV_V4L2_SUBDEV_PAD_OPS_STRUCT_HAS_GET_FRAME_INTERVAL" "" "types"
|
||||
;;
|
||||
|
||||
v4l2_subdev_pad_ops_struct_has_dv_timings)
|
||||
#
|
||||
# Determine if struct v4l2_subdev_pad_ops has the 'g_dv_timings'
|
||||
# and 's_dv_timings' function pointers.
|
||||
#
|
||||
# Commit 009e12561369 ("media: v4l2-subdev: Add pad versions of dv
|
||||
# timing subdev calls)" added 'g_dv_timings' and 's_dv_timnigs' to
|
||||
# the v4l2_subdev_pad_ops structure. Commit d8c9a6e204f1 ("media:
|
||||
# v4l2-subdev: Remove non-pad dv timing callbacks") then removed the
|
||||
# the original 'g_dv_timings' and 's_dv_timings' from the
|
||||
# v4l2_subdev_video_ops structure. These changes were made for Linux
|
||||
# v6.10.
|
||||
CODE="
|
||||
#define _LINUX_EFI_H
|
||||
#include <media/v4l2-subdev.h>
|
||||
int conftest_v4l2_subdev_pad_ops_struct_has_dv_timings(void) {
|
||||
return offsetof(struct v4l2_subdev_pad_ops, g_dv_timings);
|
||||
}
|
||||
"
|
||||
compile_check_conftest "$CODE" \
|
||||
"NV_V4L2_SUBDEV_PAD_OPS_STRUCT_HAS_DV_TIMINGS" "" "types"
|
||||
;;
|
||||
crypto_engine_ctx_struct_removed_test)
|
||||
#
|
||||
# Determine if struct 'crypto_engine_ctx' is removed in linux kernel.
|
||||
|
||||
Reference in New Issue
Block a user