media: camera: Fix build for Linux v6.8+

In Linux v6.8, the 'g_frame_interval' and 's_frame_interval' function
pointers were removed from the 'v4l2_subdev_video_ops' structure and
replaced by 'get_frame_interval' and 'set_frame_interval' that were
added to the 'v4l2_subdev_pad_ops' structure.

This change was previously fixed for the Tegra CSI driver by adding the
necessary conftest changes. A new update to the Tegra Cam V4L2 causes
the build to fail for Linux v6.8+ kernels because of the same issue. Fix
up the Tegra Cam V4L2 driver in the same way as the Tegra CSI driver,
but update the name of the conftest test to indicate that this is
applicable for both the 'get_frame_interval' and 'set_frame_interval'
function pointers.

Bug 4448428
Bug 4807063

Change-Id: Ica47f3aaece0bf81e2adc3c431056ea51b64a893
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3231775
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
This commit is contained in:
Jon Hunter
2024-10-17 11:39:32 +01:00
committed by mobile promotions
parent f00b8b2cd4
commit 91416b264c
4 changed files with 27 additions and 14 deletions

View File

@@ -8217,10 +8217,12 @@ compile_test() {
compile_check_conftest "$CODE" "NV_V4L2_ASYNC_NF_ADD_SUBDEV_PRESENT" "" "functions"
;;
v4l2_subdev_pad_ops_struct_has_get_frame_interval)
v4l2_subdev_pad_ops_struct_has_get_set_frame_interval)
#
# Determine if struct v4l2_subdev_pad_ops has the 'get_frame_interval'
# function pointer.
# and 'set_frame_interval' function pointers. Note that it is only
# necessary to check for the presence of one because both were added
# by the same commit.
#
# Added by commit 287fe160834a ("media: v4l2-subdev: Turn
# .[gs]_frame_interval into pad operations") in Linux v6.8.
@@ -8233,7 +8235,7 @@ compile_test() {
}
"
compile_check_conftest "$CODE" \
"NV_V4L2_SUBDEV_PAD_OPS_STRUCT_HAS_GET_FRAME_INTERVAL" "" "types"
"NV_V4L2_SUBDEV_PAD_OPS_STRUCT_HAS_GET_SET_FRAME_INTERVAL" "" "types"
;;
v4l2_subdev_pad_ops_struct_has_dv_timings)