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>
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>
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>
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>
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>
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>
For Linux v6.8, support for SPI controllers with multiple chip-selects
was added to the SPI core and this updated the 'chip_select' member of
the 'spi_device' structure to be an array. This breaks building the
Tegra124 SPI Slave driver and Tegra210 QUAD SPI driver.
A helper function, spi_get_chipselect(), was added for Linux v6.3 to
retrieve the chip-select for a SPI device and can be used for retrieving
the chip-select for all Linux v6.3+ kernels.
Add a conftest rule to detecting if spi_get_chipselect() is present and
if so use this for getting the chip-select. This fixes the build issues
for Linux v6.8.
Bug 4448428
Change-Id: Ia4f95ed96b9a18cc7da7a4a52305fc64bc31905c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3050146
(cherry picked from commit 9e2f7ecdf7)
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3051189
Reviewed-by: Laxman Dewangan <ldewangan@nvidia.com>
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Use conftest to determine if the uevent() function pointer in the
bus_type structure has a const dev argument. This fixes the build for
Linux kernels prior to Linux v6.3 that include the upstream change that
changed the arguments to this function.
Bug 4014315
Change-Id: I1553e08c951be9dd27141c273bf91be38dd954a6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3019964
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Add tests to conftest for detecting if the mii_bus structure has the
read_c45 and write_c45 function pointers and use the definitions
generated by conftest in the nvethernet driver.
This fixes support for nvethernet in 3rd party Linux kernels that have
backported the mii_bus structure changes to their kernel that have a
kernel version prior to Linux v6.3.
Bug 4014315
Change-Id: I5ae98fc5077337286921da6e9347df9781565a70
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3018935
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Add tests to the conftest script to check if the functions
drm_gem_prime_fd_to_handle() and drm_gem_prime_handle_to_fd() are
exported in the Linux kernel and use the definition generated by
conftest for compiling the Tegra DRM driver.
Bug 4346767
Change-Id: I56b76617bf4644a5851484dd7d4eecd3888f3b5b
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/3015841
GVS: Gerrit_Virtual_Submit <buildbot_gerritrpt@nvidia.com>
Reviewed-by: Brad Griffis <bgriffis@nvidia.com>
Rather than using kernel version checks to determine which kernel APIs
to use, add the necessary tests to the conftest script to determine
which kernel APIs are present in the kernel.
Note that the function snd_soc_dai_init_dma_data() has been present
in the Linux kernel since v3.13 and so use this for all kernel versions.
In Linux v6.3, the 'playback_dma_data' and 'capture_dma_data' members of
the snd_soc_dai_driver structure were replaced and so these could no
longer be set directly. However, the arguments to
snd_soc_dai_init_dma_data() have not changed and so can be used for
older kernels and well has the current.
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: Ibac0c6bab78e93f03981dfe3d1b2025ea19d4c92
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2993795
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Rather than using kernel version checks to determine which kernel APIs
to use, add the necessary tests to the conftest script to determine
which kernel APIs are present in the kernel.
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: I159cd7d5feca050c8a8014d9c2a3b43e8974fdfd
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2993807
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
Rather than using kernel version checks to determine which kernel APIs
to use, add the necessary tests to the conftest script to determine
which kernel APIs are present in the kernel.
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: Iec2c793ce408dab1cf7e5118c019dfe656dfa87c
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2992630
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.5, commit 62aeaeaa1b26 ("drm/aperture: Remove primary
argument") removed the 'primary' argument from the function
drm_aperture_remove_framebuffers(). Update the test in conftest script
for drm_aperture_remove_framebuffers() to test for this and use the
generated definition accordlingly in the Tegra DRM driver to fix the
build for Linux v6.5.
Bug 4221847
Change-Id: I7a7bb3a029b236e0ce42c1a404085757d95374d1
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990528
In Linux v6.5, the arguments to the function snd_soc_of_get_dai_name()
were updated and this is causing the Tegra ASoC machine driver build to
fail. Add a new test to the conftest script to check the arguments for
snd_soc_of_get_dai_name() and use the definition generated by the
conftest script accordingly.
Bug 4221847
Change-Id: I32772da12ab59eb09e2f9d8bc66471d859201f8e
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990531
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>
In Linux v6.5, the 'vmas' parameter is removed from get_user_pages() by
commit 54d020692b34 ("mm/gup: remove unused vmas parameter from
get_user_pages()"). Update the conftest script test for
'get_user_pages' to test for this and use the generated definition in
the NVMAP driver accordingly.
Bug 4221847
Change-Id: I3b2b2b9937bba86a8924cf5852fe62d57cd5d3b6
Signed-off-by: Jon Hunter <jonathanh@nvidia.com>
Reviewed-on: https://git-master.nvidia.com/r/c/linux-nv-oot/+/2990512
Tested-by: mobile promotions <svcmobile_promotions@nvidia.com>
Reviewed-by: mobile promotions <svcmobile_promotions@nvidia.com>