mirror of
git://nv-tegra.nvidia.com/linux-nv-oot.git
synced 2025-12-22 17:25:35 +03:00
camera: Use conftest to find if media_entity_remote_pad() present
Use conftest to determine if media_entity_remote_pad()
function is present or not
This function is removed by commit b2e44430b634 ("media:
mc-entity: Rename media_entity_remote_pad to media_pad_remote_pad_first")
in Linux 6.0
Bug 4387902
Change-Id: I816016731ac44a3c093438310f8e60bd166f2fd7
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037917
(cherry picked from commit b40e45535e)
Signed-off-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3322771
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
This commit is contained in:
committed by
mobile promotions
parent
4b72ba2c83
commit
1e837fca66
@@ -1,5 +1,5 @@
|
|||||||
// SPDX-License-Identifier: GPL-2.0-only
|
// SPDX-License-Identifier: GPL-2.0-only
|
||||||
// SPDX-FileCopyrightText: Copyright (c) 2015-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
// SPDX-FileCopyrightText: Copyright (c) 2015-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
/*
|
/*
|
||||||
* NVIDIA Tegra Video Input Device
|
* NVIDIA Tegra Video Input Device
|
||||||
*/
|
*/
|
||||||
@@ -1945,7 +1945,7 @@ int tegra_channel_init_subdevices(struct tegra_channel *chan)
|
|||||||
int len = 0;
|
int len = 0;
|
||||||
|
|
||||||
/* set_stream of CSI */
|
/* set_stream of CSI */
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
|
#if defined(NV_MEDIA_ENTITY_REMOTE_PAD_PRESENT) /* Linux 6.0 */
|
||||||
pad = media_entity_remote_pad(&chan->pad);
|
pad = media_entity_remote_pad(&chan->pad);
|
||||||
#else
|
#else
|
||||||
pad = media_pad_remote_pad_first(&chan->pad);
|
pad = media_pad_remote_pad_first(&chan->pad);
|
||||||
@@ -1975,7 +1975,7 @@ int tegra_channel_init_subdevices(struct tegra_channel *chan)
|
|||||||
if (!(pad->flags & MEDIA_PAD_FL_SINK))
|
if (!(pad->flags & MEDIA_PAD_FL_SINK))
|
||||||
break;
|
break;
|
||||||
|
|
||||||
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 0, 0)
|
#if defined(NV_MEDIA_ENTITY_REMOTE_PAD_PRESENT) /* Linux 6.0 */
|
||||||
pad = media_entity_remote_pad(pad);
|
pad = media_entity_remote_pad(pad);
|
||||||
#else
|
#else
|
||||||
pad = media_pad_remote_pad_first(pad);
|
pad = media_pad_remote_pad_first(pad);
|
||||||
|
|||||||
@@ -139,6 +139,7 @@ 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 += iio_dev_opaque_has_mlock
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iommu_map_has_gfp_arg
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += iommu_map_has_gfp_arg
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += kthread_complete_and_exit
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += kthread_complete_and_exit
|
||||||
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += media_entity_remote_pad
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += mii_bus_struct_has_read_c45
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += mii_bus_struct_has_read_c45
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += mii_bus_struct_has_write_c45
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += mii_bus_struct_has_write_c45
|
||||||
NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_set_tso_max_size
|
NV_CONFTEST_FUNCTION_COMPILE_TESTS += netif_set_tso_max_size
|
||||||
|
|||||||
@@ -1,6 +1,6 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
# SPDX-License-Identifier: MIT
|
# SPDX-License-Identifier: MIT
|
||||||
# SPDX-FileCopyrightText: Copyright (c) 2023-2024 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
# SPDX-FileCopyrightText: Copyright (c) 2023-2025 NVIDIA CORPORATION & AFFILIATES. All rights reserved.
|
||||||
|
|
||||||
PATH="${PATH}:/bin:/sbin:/usr/bin"
|
PATH="${PATH}:/bin:/sbin:/usr/bin"
|
||||||
|
|
||||||
@@ -945,6 +945,22 @@ compile_test() {
|
|||||||
compile_check_conftest "$CODE" "NV_MDEV_GET_TYPE_GROUP_ID_PRESENT" "" "functions"
|
compile_check_conftest "$CODE" "NV_MDEV_GET_TYPE_GROUP_ID_PRESENT" "" "functions"
|
||||||
;;
|
;;
|
||||||
|
|
||||||
|
media_entity_remote_pad)
|
||||||
|
#
|
||||||
|
# Determine if media_entity_remote_pad() function is present or not
|
||||||
|
#
|
||||||
|
# Removed by commit b2e44430b634 ("media: mc-entity: Rename
|
||||||
|
# media_entity_remote_pad() to media_pad_remote_pad_first()") in Linux 6.0
|
||||||
|
#
|
||||||
|
CODE="
|
||||||
|
#include <media/media-entity.h>
|
||||||
|
void conftest_media_entity_remote_pad(void) {
|
||||||
|
media_entity_remote_pad();
|
||||||
|
}"
|
||||||
|
|
||||||
|
compile_check_conftest "$CODE" "NV_MEDIA_ENTITY_REMOTE_PAD_PRESENT" "" "functions"
|
||||||
|
;;
|
||||||
|
|
||||||
vfio_device_mig_state)
|
vfio_device_mig_state)
|
||||||
#
|
#
|
||||||
# Determine if vfio_device_mig_state enum is present or not
|
# Determine if vfio_device_mig_state enum is present or not
|
||||||
|
|||||||
Reference in New Issue
Block a user