Commit Graph

101 Commits

Author SHA1 Message Date
Jon Hunter
0980dbb86e drm/tegra: Fix genpd support for Linux v6.13
In Linux v6.13, commit d6caca30a548 ("OPP: Drop redundant
*_opp_attach|detach_genpd()") removed devm_pm_opp_attach_genpd(). This
has been replaced by devm_pm_domain_attach_list(). Use conftest to
detect the presence of devm_pm_domain_attach_list() and update the Tegra
DRM driver accordingly.

Bug 4991705

Change-Id: I5a3bd258d3fce5b09fd4ba84adad166e4cf47cfb
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261693
(cherry picked from commit 4c08d4e516a89751afc8410553ccebff983e29d0)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3499749
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
2025-12-04 09:40:31 -08:00
Jon Hunter
814fdf0d88 cpuidle: Fix build for Linux v6.13
Commit ef4c675dc296 ("genirq: Unexport nr_irqs") unexported 'nr_irqs' in
Linux v6.13 and this breaks the build for the cpuidle-debugfs driver.
For Linux v6.13 the number of IRQs can be queried by using the function
irq_get_nr_irqs() instead. Fix the build by using conftest to detect if
the function irq_get_nr_irqs() and use this function if it is present.

Bug 4991705

Change-Id: I98d477896fcf9e8d2e1afa21e2f7ba4d071ab442
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261690
(cherry picked from commit 3fd3699807afd1503c72e1d2a1610ef0e4862197)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3499748
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-12-04 09:40:19 -08:00
Ketan Patil
8e1a6b2dd1 video: tegra: nvmap: Remove use of add_mm_counter
add_mm_counter is not an exported function, so instead use
atomic_long_add_return/percpu_counter_add to directly modify RSS stat
counters.

Bug 5222690

Change-Id: I51a68d932aeb04f96e51a4a3c286ee5c8efc789a
Signed-off-by: Ketan Patil <ketanp@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3446982
Reviewed-by: Ajay Nandakumar Mannargudi <anandakumarm@nvidia.com>
Reviewed-by: Sachin Nikam <snikam@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-09-16 15:54:33 -07:00
Jon Hunter
2f83033498 media: camera: Use conftest for CSI2 config
In Linux v5.18, commits 20c238dfb26c ("media: v4l2-mediabus: Drop legacy
V4L2_MBUS_CSI2_*_LANE flags"), 5a6ac3f4b46f ("media: v4l2-mediabus: Drop
legacy V4L2_MBUS_CSI2_CHANNEL_* flags") and b9f7caa7753a ("media:
v4l2-mediabus: Drop V4L2_MBUS_CSI2_CONTINUOUS_CLOCK flag") removed
various CSI2 flags. It turns out that out of these flags we only need to
actually set the number of lanes and the other flags are redundant. The
configuration was moved by commit 94d964e58ad6 ("media: v4l2-fwnode:
Move bus config structure to v4l2_mediabus.h") to the structure
v4l2_mbus_config_mipi_csi2 which itself is under the structure
v4l2_fwnode_endpoint. Use conftest to detect if the structure
v4l2_mbus_config_mipi_csi2 is present and avoid using kernel version
checks.

Bug 4425688

Change-Id: Icd597492e48831326c203a6556176ac3767472a3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3354475
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
2025-05-02 08:54:03 -07:00
Jon Hunter
3d806c0cd2 gpu/drm: tegra: Fix support for Linux v6.12
In Linux v6.12, commit 641bb4394f40 ("fs: move FMODE_UNSIGNED_OFFSET to
fop_flags") moves the setting of the FMODE_UNSIGNED_OFFSET into the
various drivers and renames this flag. This change is causing various
tests to fail because opening the DRM device is failing.

Use the presence of the new FOP_UNSIGNED_OFFSET flag in the kernel to
determine if we need to set this flag in the Tegra DRM driver.

Bug 4876974

Change-Id: Ie72a9340187b1c206f0cda6d7e3dab44d603a41c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3269063
(cherry picked from commit a680b4881fb8e6ace46f409c33307f3bc10366a4)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3338872
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Tested-by: Ilies Chergui <ichergui@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ilies Chergui <ichergui@nvidia.com>
2025-04-11 14:08:53 -07:00
Laxman Dewangan
1e837fca66 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>
2025-03-26 09:24:26 -07:00
Jon Hunter
a2b53ade55 virt: hvc_sysfs: Fix build for Linux v6.13
In Linux v6.13, commit 94a20fb9af16 ("sysfs: treewide: constify
attribute callback of bin_attribute::mmap()") changed the type of the
'struct bin_attribute' argument of the bin_attribute:mmap function
pointer to const. Use conftest to detect if this argument is const or
not in the kernel the driver is being compiled against to fix the build.

Bug 4991705

Change-Id: I791d6c9dde50f1444d0339ebd8a18434045f9026
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3261699
(cherry picked from commit fae042552e211199a160e5d6a82a67edd7b7e03c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3321698
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2025-03-19 10:23:57 -07:00
Jon Hunter
8a10ebd740 drivers: Fix build for Linux v6.12
In Linux v6.12 the definition 'no_llseek' was finally removed. Since
Linux v6.0 it had been redefined as NULL. Add a test to conftest to
determine if 'no_llseek' is present and if not then it is no longer
necessary to populate this and we can leave as NULL.

Bug 4876974

Change-Id: I051fdb285b32260b5913dad89cabe0be04253f67
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3222106
(cherry picked from commit 7bf81a5b445b01a2adc8b947a29e9ca7db325c6f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3270383
Reviewed-by: svcacv <svcacv@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-12-18 10:09:34 -08:00
Jon Hunter
91416b264c 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>
2024-10-18 13:10:39 -07:00
Jon Hunter
43f2b77b06 misc: nvsciipc: Fix build for Linux v6.12
In Linux v6.12, commit 88a2f6468d01 ("struct fd: representation change")
removed the 'struct file' pointer from 'struct fd'. This breaks building
the NVSCIIPC driver that tries to directly access the 'file' pointer
from the 'fd' structure. Fix this by using the helper macros 'fd_empty'
and 'fd_file' as necessary to fix the build.

Bug 4593750

Change-Id: I0f84736b408f533a732476175a8745091bc8542f
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3217429
(cherry picked from commit 0f21c4134eb08dfcafad832d97308f2d98601f1d)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3226681
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-10-10 09:54:44 -07:00
Johnny Liu
93b1b8542e conftest: update tests for devfreq and thermal
Introduce the following three tests:
1. devfreq_dev_profile_has_is_cooling_device
2. devfreq_has_freq_table
3. thermal_zone_for_each_trip

Bug 4854967

Signed-off-by: Johnny Liu <johnliu@nvidia.com>
Change-Id: I5fe2f7102f667a31d61550487a153590584ed638
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3213844
(cherry picked from commit ae9d7ea9479637e77732bc1842a5488653157d21)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3221294
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Tested-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
2024-10-01 04:23:56 -07:00
Jon Hunter
93ba193a32 pci: endpoint: Update drivers for Linux v6.11
For Linux v6.11, the 'pci_epc_event_ops' structure 'core_init' callback
was renamed to 'epc_init' and a new 'epc_deinit' callback was added.

Update the PCI endpoint drivers for Linux v6.11 by:

 1. Adding tests to conftest to detect the presence of 'epc_init' and
    'epc_deinit'.
 2. Update the drivers as necessary to use the appropriate callback
    depending upon what is present in the kernel.

Bug 4749580

Change-Id: Ife7e2d5d18332bf84f22142c9727dc1ece913c49
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3186686
(cherry picked from commit b0ff4f1358)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3219305
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-09-26 06:11:21 -07:00
Jon Hunter
c463c63993 scripts: Add scripts for platform_driver remove
In Linux v6.11, the 'platform_driver' structure 'remove' callback was
updated to return void instead of 'int'. This change impacts all OOT
platform drivers and so instead of editing each manually, add a
coccinelle script to handle updating all platform drivers. This script
is ran by executing the following command ...

 $ spatch --in-place \
   --sp-file /path/to/scripts/coccinelle/platform_driver_remove.cocci
   <driver-source-directory>

Finally, add a test to the conftest script that is used to detect if the
platform driver 'remove' callback returns 'void'.

Bug 4749580

Change-Id: I53d25cc36cc3be97a6eeeb4ccbdf9b7dfda338a9
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176834
(cherry picked from commit 24826db83f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3202689
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-09-11 04:39:39 -07:00
Jon Hunter
d19626ceee drivers: Fix bus->match for Linux v6.11
In Linux v6.11, the 'bus_type' structure match() callback was updated to
make its 'drv' argument constant. Add a conftest test to detect this and
update the relevant drivers according to fix building them for Linux
v6.11.

Bug 4749580

Change-Id: I895d97241a7357074bb34b8e7a5bdfa2e31d5ca5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3183068
(cherry picked from commit fc171fe539)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3185781
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-08-01 10:24:56 -07:00
Jon Hunter
1ae45fbaa7 hwmon: f75308: Fix build for Linux v6.11
The macro of_property_for_each_u32() was updated for Linux v6.11 to
remove two of the arguments that were only used internally in the macro
and do not need to be passed. Add a test to conftest to detect the
version of the of_property_for_each_u32() that is present in the kernel
and fix the f75308 driver accordingly.

Bug 4749580

Change-Id: If787a40d0af49989d93d9563dd6a84e906cb5209
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184092
(cherry picked from commit 8f1e881a2f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3185778
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-08-01 10:24:40 -07:00
Jon Hunter
8fbb56adb6 ASoC: tegra: Fix build for Linux v6.11
For Linux v6.11, the 'tx_slot' and 'rx_slot' arguments for the ASoC
set_channel_map() function were made constant. Add a test to conftest to
check for this and update the Tegra210 ADX and AMX driver accordingly.

Bug 4749580

Change-Id: I584d721ee46ae0af6312df4641fc4bbdbc1714f0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3184824
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-07-30 05:54:11 -07:00
Jon Hunter
55b09a913f nvmap: Implement nvmap_page_mapcount()
Upstream commit cdd9a571b7d8 ("fs/proc: move page_mapcount() to
fs/proc/internal.h") made page_mapcount() an internal function for Linux
v6.11. This function is used by the NVMAP driver and so implement this
function in the NVMAP driver directly instead. Note that newer kernels
implement folio_entire_mapcount() for compound page counts where as
older kernels use compound_mapcount(). Use conftest to detect which of
these functions is present in the kernel.

Bug 4749580

Change-Id: I6504448727d6b3e9f2caa8581a66aad464ae2426
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3180097
(cherry picked from commit f327656ea3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3183926
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Ketan Patil <ketanp@nvidia.com>
2024-07-30 01:54:01 -07:00
Jon Hunter
85be13c709 net: nvethernet: Fix build for Linux v6.11
In Linux v6.11, the structure 'kernel_ethtool_ts_info' was added as a
copy of the existing 'ethtool_ts_info' for the kernel and the various
kernel functions were updated to use the new structure. This broke the
build for the nvethernet driver, so add a test to the conftest script to
detect the presence of this new strucutue and update the nvethernet
driver accordingly.

Bug 4749580

Change-Id: I2c5daa0132edee8c98eec3a66e19144484325ab0
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3176868
(cherry picked from commit 9d6283ca4f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3178809
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Revanth Kumar Uppala <ruppala@nvidia.com>
2024-07-22 02:26:53 -07:00
Jon Hunter
537492a880 trace: Fix build for Linux v6.10
In Linux v6.10, the __assign_str() macro was updated to remove the 2nd
argument. Add a test to the conftest script to detect this and update
the various trace header files as necessary.

Bug 4593750

Change-Id: I495e78658249baa84cca5b864f4e172c1f3f0838
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3152310
(cherry picked from commit 083d7038d1)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3170281
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-07-08 17:54:00 -07:00
Jon Hunter
5e0562c90d media: virtual-i2c-mux: Fix build for Linux v6.10
In Linux v6.10, the 'class' argument was removed from the
i2c_mux_add_adapter() function. Add a test to conftest to detect the
correct number of arguments for i2c_mux_add_adapter() and update the
virtual-i2c-mux driver accordingly to fix the build for Linux v6.10.

Bug 4593750

Change-Id: I7333a511b487b7c2f2fa0ce7c34f2df5f061fbe4
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142398
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-24 07:40:09 -07:00
Jon Hunter
0104837e60 pwm: tachometer: Fix build for Linux v6.10
In Linux v6.10, a pointer to a dynamically allocated 'struct device'
was replaced with a statically allocated 'struct device' in the
'pwm_chip' structure. Update the Tegra PWM Tachometer driver accordingly
to fix the build for Linux v6.10.

Bug 4593750

Change-Id: I9d629746290282b5c1858f8308128d94ff155c49
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123219
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-05-24 07:39:53 -07:00
Jon Hunter
39e07fb02b block: virtual-storage: Allow build for Linux v6.10
The function blk_queue_max_hw_sectors() was removed in Linux v6.10 and
so add a test to conftest to see if this function is present or not to
allow the driver to build. The virtual-storage driver is currently
broken for Linux v5.19+ kernel due to other incompatibilities with these
newer kernels, but has been updated so that it still builds. Therefore,
allow the driver to build for Linux v6.10 while the driver is fixed
properly for these newer kernels.

Bug 4311184
Bug 4593750

Change-Id: Ic4054c87acdf3c77f03ff94fbdde513d84fe229b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142216
(cherry picked from commit c73cf3c92a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142204
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-23 04:11:55 -07:00
Jon Hunter
67b36c62c3 conftest: Fix tests for Linux v6.10
Some of the conftest tests are no longer working with the mainline
kernel and this is causing various build failures for drivers. Upstream
commit a3b00f10da80 ("objpool: enable inlining objpool_push() and
objpool_pop() operations") inlined some code that causes build error to
occur when the tests are built with 'Werror=address-of-packed-member'.

Upstream commit 6f303d60534c ("gcc-9: silence 'address-of-packed-member'
warning") disables the option 'address-of-packed-member' for the kernel
already and so fix these new build failures by disabling this option
for the conftest tests.

Bug 4593750

Change-Id: I37af97079bb7734fcd5bf10384b1afc071613594
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142214
(cherry picked from commit 1a635bb0ea)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3142203
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-23 04:11:44 -07:00
Jon Hunter
d259181558 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
(cherry picked from commit 6255ffef44)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123222
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: buildbot_gerritrpt <buildbot_gerritrpt@nvidia.com>
2024-05-23 04:11:18 -07:00
Jon Hunter
d95c0d0add thermal: Fix build for Linux v6.10
In Linux v6.10, commit b1ae92dcfa8e ("thermal: core: Make struct
thermal_zone_device definition internal") made the structure
'thermal_zone_device' internal and so the 'devdata' member is no longer
directly accessible. The function thermal_zone_device_priv() was added
in Linux v6.4 for retrieving the 'devdata' and so update the various
thermal drivers to use this function if present.

Bug 4593750

Change-Id: Ic53de9bbd5459c99a3ac26759aa8a966cd775fe5
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3123221
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-05-20 07:39:53 -07:00
Jon Hunter
28f1253514 PCI: Fix endpoint DMA test for Linux v6.9
Building the PCI EPF DMA test driver for Linux v6.9 is failing because
the parameters for the pci_epf_alloc_space() function has been updated
to pass the alignment value via the 'pci_epc_features' structure instead
of passing the value directly.

Instead of hard-coding the endpoint alignment in the EPF DMA test driver
use the 'pcie_epc_get_features()' function to retrieve the endpoint
features structure which has the endpoint alignment.

By using the conftest script to detect the parameters for the
pci_epf_alloc_space() function, we can then pass the appropriate
arguments to the pci_epf_alloc_space() function.

Bug 4471899

Change-Id: Id80259a4c90d6f6ae2132cccbec1a96113d22be7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3116548
(cherry picked from commit 971680aadb)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128431
Tested-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
2024-05-01 09:56:14 -07:00
Laxman Dewangan
83238f4563 pci: Use conftest to find if pci_epc_event_ops struct has core_deinit
Use the conftest to find if the struct pci_epc_event_ops has
core_deinit as callback function. This callback is added
by Nvidia in core kernel.

Bug 4346767

Change-Id: I399197917ac7746ca367f55b9dc4e3a5bd79f073
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028740
(cherry picked from commit 1e9fc00bc2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128430
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-05-01 09:56:09 -07:00
Laxman Dewangan
6ca4e1e64c misc: nvscic2c-pcie: Drop usage of enum pci_epc_irq_type from Linux 6.8
The enum pci_epc_irq_type is dropped from Linux 6.8 with
commit 74955cb8ccc385 ("PCI: endpoint: Drop PCI_EPC_IRQ_XXX definitions")
Use alternative definition from mainline.

Bug 4448428

Change-Id: Ic248ee2522f171c311ac1086c2792bcf3ad6ed64
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3062520
(cherry picked from commit 932f9757ab)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3128946
Tested-by: Brad Griffis <bgriffis@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Jon Hunter <jonathanh@nvidia.com>
2024-05-01 09:55:44 -07:00
Jon Hunter
315ceb951b net: nvethernet: Fix build for Linux v6.9
For Linux v6.9, the structure 'ethtool_eee' was replaced by
'ethtool_keee' and this new structure uses bitmaps for the structure
fields 'supported', 'advertised' and 'lp_advertised' as opposed to
'u32' types.

Add a test to conftest to detect the presence of the new 'ethtool_keee'
structure and update the nvethernet driver to use the various
linkmode_xxx helper functions for accessing the bitmap structure fields.

Bug 4471899

Change-Id: I275becfa665a36ed90e8bc227eaa4122825faa6a
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3110494
(cherry picked from commit 72761b8276)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3111548
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 16:09:35 -07:00
Jon Hunter
e351ba75c7 media: camera: Ensure gpio_device_get_chip is present
In Linux v6.7, both gpio_device_find() and gpio_device_get_chip() were
added. However, don't assume that if one is present then so is the other
and so add a test to check if gpio_device_get_chip() is also present.

Bug 4471899

Change-Id: I0c547a52b0f397aef43884ab76d815573e8ed3f8
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3112133
(cherry picked from commit 9458d6b97f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3119068
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 13:56:10 -07:00
Jon Hunter
94090ac30e media: camera: Update conftest for gpio_device_find
When adding conftest tests for detecting if specific functions are
present, it is always better to check if the newly added function is
present versus the function that has been removed. The reason being that
is the newly added function is modified in the future then the conftest
tests can be extended to check for updates to the function.

Therefore, instead of checking if the function gpiochip_find() is
present, which was removed in Linux v6.7, check if the function
gpio_device_find() is present, which replaced gpiochip_find in Linux
v6.7.

Bug 4346767
Bug 4471899

Change-Id: I32bf1c3da32abbf3c8d3ef9ea350decf1564e0bc
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
(cherry picked from commit 68e7840dd8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3111544
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 13:55:49 -07:00
Jon Hunter
f78df7fa59 video: tegra: virt: Fix build for Linux v6.9
The definition SLAB_MEM_SPREAD was removed in Linux v6.9 and this breaks
the compilation of the Tegra Graphics Virtualization Comms driver. Add a
test to conftest to detect if SLAB_MEM_SPREAD is defined and update the
driver accordingly to fix the build.

Bug 4471899

Change-Id: Ibcac2dbc6538bcda92e818b333a9db6b8234f1d7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104558
(cherry picked from commit 7acb255112)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104650
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 13:55:38 -07:00
Jon Hunter
1a5be9188a soc/tegra: bpmp: Fix build for Linux v6.9
In Linux v6.9-rc1, the typedef genpd_xlate_t was updated to make
'of_phandle_args' argument const. Add a test to the conftest script to
test if this argument is const and update the BPMP powergate driver
accordingly.

Bug 4471899

Change-Id: I85ddb3689ccf5dc769cd208575db69a2cf7b0a11
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3103819
(cherry picked from commit 9c180ac0c8)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104378
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-04-18 13:55:28 -07:00
Jon Hunter
6969153c7c block: virtual-storage: Fix build for Linux v6.9
In Linux v6.9-rc1, the function blk_mq_init_queue() was renamed
blk_mq_alloc_queue() and the arguments passed to the function were
updated. Add a test to conftest to detect if the function
blk_mq_alloc_queue() is present and update the virtual-storage driver
accordingly.

Bug 4471899

Change-Id: I7dc937eaad27445b1c140c57aafd36f4a4b769ba
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3095926
(cherry picked from commit 3b9f5783b2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3104377
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-04-18 13:55:17 -07:00
Laxman Dewangan
176a1bff8d tegra_hv: Use conftest to find if class_attribute function has const type arg
Determine if struct class_attribute function has const type
"struct class_attribute" argument or not.

Modified the argument by change
commit 75a2d4226b5371 ("driver core: class: mark the struct class
for sysfs callbacks as constant") for Linux 6.3

Bug 4346767

Change-Id: I2a36025b23af80761faf1da406481731289eedd2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3030734
(cherry picked from commit de4295cfa6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3059278
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-22 05:10:56 -08:00
Jon Hunter
3f5ba8f70b tty: wch: Fix build for Linux v6.8
In Linux v6.8, the argument for the struct tty_operations::send_xchar
function was updated from char to u8 and this breaks the build for the
'wch' driver. Add a test to the conftest script to detect the argument
type for this function and use the definition generated to fix the build
for the 'wch' driver.

Bug 4448428

Change-Id: I051861cf76e56cacb4b33053d4e6644265552df7
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3057714
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-19 06:39:15 -08:00
Jon Hunter
f1f3771dec conftest: Fix 'type' compile tests
The Conftest Makefile was incorrectly updated changing variable
NV_CONFTEST_TYPE_COMPILE_TESTS to NV_CONFTEST_TYPES_COMPILE_TESTS. Fix
this by correcting the name.

Bug 4346767

Change-Id: Ia34c076526a1ee6870301382e01bfdcc8cd550d3
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053809
(cherry picked from commit 93360eb080)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055874
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-17 20:39:37 -08:00
Laxman Dewangan
e30e21ebd1 v4l2: Add conftest for v4l2 API changes in Linux 6.6
Add conftest to determine the API changes/deprecation
for V4L2 in Linux6.6. The changes are:
  The device argument is added in the API v4l2_async_nf_init() with
  commit b8ec754ae4c5 ("media: v4l: async: Set v4l2_device and subdev
  in async notifier init") in Linux 6.6.

  The API is removed with commit bda8953e8c3e ("media: v4l: async: Drop
  v4l2_async_nf_parse_fwnode_endpoints()") in Linux 6.6

Bug 4346767

Change-Id: Ia225be8b4fb17003ec2899e872573dc05e9fde87
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3042900
(cherry picked from commit 8df8cfc8e6)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055495
Tested-by: Jonathan Hunter <jonathanh@nvidia.com>
Reviewed-by: Paritosh Dixit <paritoshd@nvidia.com>
Reviewed-by: Jonathan Hunter <jonathanh@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 15:24:14 -08:00
Laxman Dewangan
822abd1943 ufs: Port UFS driver to use headers from core kernel for Linux 6.7
Some of the drivers-private headers are now available in public
header path in core kernel. Use such headers directly from the
core kernel for Linux 6.7 and later instead of copying it in the
nvidia-oot/include/driver-private.

Also match the quirks definition with core kernel for Linux 6.0 and
later.

Bug 4346767

Change-Id: If994466a3cabc6df8eeb0e97018f48d48a8306dc
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3038489
(cherry picked from commit dfff2311c3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055485
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-17 09:09:57 -08:00
Jon Hunter
abeacc3534 scsi: ufs: Use conftest for Tegra264
The chip ID for Tegra264 was added in Linux v6.5 and not Linux v6.1 as
indicated in the Tegra UFS driver. Hence, the Tegra UFS driver does not
build against any generic Linux v6.1 to v6.4 kernel. Fix this by using
conftest to determine if the chip ID definition is present in the
kernel.

Bug 4221847

Change-Id: If2ca1202b2a69bf7de36fc327406f1579d2f4969
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3054870
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-17 06:54:45 -08:00
Jon Hunter
902712a236 scsi: ufs: Use conftest for suspend differences
In Linux v5.19, the arguments to the 'suspend' function pointer defined
in the structure 'ufs_hba_variant_ops' was updated to add a 'status'
argument. Add a new test to the conftest script that checks if the
'suspend' function has a 'status' argument and use the definition
created by conftest to select which structure member is 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 4221847

Change-Id: I05011a4a1aff7c54cd258147d6519b696904a2de
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2996214
(cherry picked from commit f748f0ef72)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3032086
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-17 06:54:34 -08:00
Jon Hunter
11e0abc8a3 media: camera: Fix build for Linux v6.8
In Linux v6.8, the 'g_frame_interval' function pointer was removed from
the 'v4l2_subdev_video_ops' structure and replaced by
'get_frame_interval' that was added to the 'v4l2_subdev_pad_ops'
structure. Add a test to conftest to detect if 'get_frame_interval' is
supported and update the camera CSI driver accordingly to populate the
appropriate function pointer.

Note that the new 'get_frame_interval' function pointer has an
additional 'state' argument but is otherwise the same as the previous
'g_frame_interval' function pointer.

Bug 4448428

Change-Id: Iff049c3bffda11c677ac879b2b91e10deb78060c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053901
(cherry picked from commit a1f59dfc30)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055255
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 04:40:24 -08:00
Jon Hunter
5d31085674 net: nvethernet: Fix build for Linux v6.8
The ethtool_ops function pointers get_rxfh and set_rxfh were updated for
Linux v6.8 to pass arguments via a new 'ethtool_rxfh_param' structure.
Add a new test for conftest to detect if the get_rxfh and set_rxfh
functions support the 'ethtool_rxfh_param' structure and update the
nvethernet driver accordingly for Linux v6.8.

Bug 4448428

Change-Id: Ia1c49d88c4ac73539454b010af92c261e14be4bf
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037949
(cherry picked from commit 0356a563b3)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055254
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 04:40:20 -08:00
Jon Hunter
a86b3af506 drivers: pwm: Fix build for Linux v6.8
Commit 54c86dd20bba ("pwm: Replace PWM chip unique base by unique ID")
removed the 'base' field of the 'pwm_chip' structure replacing it with
an 'id' field. The new 'id' is initialised by the PWM driver core and
does not need to be configured by the PWM drivers.

Add a test for conftest to detect if the 'pwm_chip' structure has the
'base' field and update the various PWM driver to only set this field if
present.

Bug 4448428

Change-Id: I7cf466eddba4aedb57db84534e3cbf99be64151e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027486
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
(cherry picked from commit 10fd025187)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055253
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 04:40:15 -08:00
Jon Hunter
32f23c8ab2 gpu/drm: tegra: Fix build for Linux v6.8
Building the Tegra DRM driver with Linux v6.8 fails with the following
error ...

 drivers/gpu/drm/tegra/hdmi.c:623:25: error: implicit declaration of
 function ‘drm_eld_size’; did you mean ‘mm_cid_size’?
 [-Werror=implicit-function-declaration]
  623 |    size_t length = drm_eld_size(hdmi->output.connector.eld), i;
      |                    ^~~~~~~~~~~~

Commit ("8eb80946ab0c drm/edid: split out drm_eld.h from drm_edid.h")
added the header file 'drm/drm_eld.h' which now needs to be included to
build the Tegra DRM driver. Fix the build issue by using conftest to
detect the presence of the header 'drm/drm_eld.h' and include this
header if present.

Bug 4448428

Change-Id: Ifb17648d1dc721e1f0de3f864f4cc76450eea394
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3027485
(cherry picked from commit 8d5286c379)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3055252
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
2024-01-17 04:40:10 -08:00
Bitan Biswas
4a32aa94e5 crypto: conftest struct crypto_engine_ctx support
struct crypto_engine_ctx removed in k6.6 hence use
conftest helper based macro to select updated data types

Bug 4346767

Change-Id: I23e8f054719f399877b11f42d355f940d8e07186
Signed-off-by: Bitan Biswas <bbiswas@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3026513
(cherry picked from commit 2a9ce8d0e2)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053713
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-16 14:55:59 -08:00
Laxman Dewangan
f8e977a8c9 camera: Use conftest to find if v4l2_async_notifier_* present
use conftest to determine if APIs v4l2_async_notifier_*()
present or not.
These APIs have been renamed in
commit 3c8c15391481 ("media: v4l: async: Rename async
nf functions, clean up long lines") in Linux 5.16

Bug 4387902

Change-Id: Id2023543f487c3867ef4e140662141803ac63f04
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3037918
(cherry picked from commit 702def895c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053709
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-16 14:55:39 -08:00
Laxman Dewangan
1f0954f43d media: Use conftest to find if v4l2_async_subdev_nf_init() present
Use conftest to find if function v4l2_async_subdev_nf_init() is present
or not.

In Linux 6.5, with change commit bda8953e8c3e7e ("media: v4l: async:
Drop v4l2_async_nf_parse_fwnode_endpoints()"), added the function
v4l2_async_subdev_nf_init() and dropped v4l2_async_nf_init().

Bug 4346767

Change-Id: I345db2acf0a07d05722611d9eacc7134aff0c35a
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028766
(cherry picked from commit 3839cecd1c)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053708
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-16 14:55:29 -08:00
Laxman Dewangan
711d4aee8d 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
(cherry picked from commit 5f77d6d51a)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053707
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-16 14:55:19 -08:00
Laxman Dewangan
afe9bdc7c0 media: Use conftest to find if struct v4l2_async_connection present
Use conftest to find if struct v4l2_async_connection present
or not. The struct v4l2_async_subdev is renamed to struct
v4l2_async_connection with change commit adb2dcd5f2d49d3
("media: v4l: async: Rename v4l2_async_subdev as v4l2_async_connection")
in Linux 6.5

Bug 4346767

Change-Id: Id15c8ce747a8642b7831b79f45e15f26e95744b2
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3028744
(cherry picked from commit 234ba9c75f)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3053706
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
2024-01-16 14:55:08 -08:00