@@ -5321,6 +5321,45 @@ compile_test() {
53215321
53225322 compile_check_conftest " $CODE " " NV_FOLLOW_PFN_PRESENT" " " " functions"
53235323 ;;
5324+
5325+ follow_pte_arg_vma)
5326+ #
5327+ # Determine if the first argument of follow_pte is
5328+ # mm_struct or vm_area_struct.
5329+ #
5330+ # The first argument was changed from mm_struct to vm_area_struct by
5331+ # commit 29ae7d96d166 ("mm: pass VMA instead of MM to follow_pte()")
5332+ #
5333+ CODE="
5334+ #include <linux/mm.h>
5335+
5336+ typeof(follow_pte) conftest_follow_pte_has_vma_arg;
5337+ int conftest_follow_pte_has_vma_arg(struct vm_area_struct *vma,
5338+ unsigned long address,
5339+ pte_t **ptep,
5340+ spinlock_t **ptl) {
5341+ return 0;
5342+ }"
5343+
5344+ compile_check_conftest " $CODE " " NV_FOLLOW_PTE_ARG1_VMA" " " " types"
5345+ ;;
5346+
5347+ ptep_get)
5348+ #
5349+ # Determine if ptep_get() is present.
5350+ #
5351+ # ptep_get() was added by commit 481e980a7c19
5352+ # ("mm: Allow arches to provide ptep_get()")
5353+ #
5354+ CODE="
5355+ #include <linux/mm.h>
5356+ void conftest_ptep_get(void) {
5357+ ptep_get();
5358+ }"
5359+
5360+ compile_check_conftest " $CODE " " NV_PTEP_GET_PRESENT" " " " functions"
5361+ ;;
5362+
53245363 drm_plane_atomic_check_has_atomic_state_arg)
53255364 #
53265365 # Determine if drm_plane_helper_funcs::atomic_check takes 'state'
@@ -6269,6 +6308,32 @@ compile_test() {
62696308 compile_check_conftest " $CODE " " NV_NUM_REGISTERED_FB_PRESENT" " " " types"
62706309 ;;
62716310
6311+ acpi_video_register_backlight)
6312+ #
6313+ # Determine if acpi_video_register_backlight() function is present
6314+ #
6315+ # acpi_video_register_backlight was added by commit 3dbc80a3e4c55c
6316+ # (ACPI: video: Make backlight class device registration a separate
6317+ # step (v2)) for v6.0 (2022-09-02).
6318+ # Note: the include directive for <linux/types> in this conftest is
6319+ # necessary in order to support kernels between commit 0b9f7d93ca61
6320+ # ("ACPI / i915: ignore firmware requests backlight change") for
6321+ # v3.16 (2014-07-07) and commit 3bd6bce369f5 ("ACPI / video: Port
6322+ # to new backlight interface selection API") for v4.2 (2015-07-16).
6323+ # Kernels within this range use the 'bool' type and the related
6324+ # 'false' value in <acpi/video.h> without first including the
6325+ # definitions of that type and value.
6326+ #
6327+ CODE="
6328+ #include <linux/types.h>
6329+ #include <acpi/video.h>
6330+ void conftest_acpi_video_register_backlight(void) {
6331+ acpi_video_register_backlight(0);
6332+ }"
6333+
6334+ compile_check_conftest " $CODE " " NV_ACPI_VIDEO_REGISTER_BACKLIGHT" " " " functions"
6335+ ;;
6336+
62726337 acpi_video_backlight_use_native)
62736338 #
62746339 # Determine if acpi_video_backlight_use_native() function is present
@@ -6652,13 +6717,18 @@ compile_test() {
66526717 #
66536718 # Determine whether drm_client_setup is present.
66546719 #
6655- # Added by commit d07fdf922592 ("drm/fbdev-ttm:
6656- # Convert to client-setup") in v6.13.
6720+ # Added by commit d07fdf922592 ("drm/fbdev-ttm: Convert to
6721+ # client-setup") in v6.13 in drm/drm_client_setup.h, but then moved
6722+ # to drm/clients/drm_client_setup.h by commit b86711c6d6e2
6723+ # ("drm/client: Move public client header to clients/ subdirectory")
6724+ # in linux-next b86711c6d6e2.
66576725 #
66586726 CODE="
66596727 #include <drm/drm_fb_helper.h>
66606728 #if defined(NV_DRM_DRM_CLIENT_SETUP_H_PRESENT)
66616729 #include <drm/drm_client_setup.h>
6730+ #elif defined(NV_DRM_CLIENTS_DRM_CLIENT_SETUP_H_PRESENT)
6731+ #include <drm/clients/drm_client_setup.h>
66626732 #endif
66636733 void conftest_drm_client_setup(void) {
66646734 drm_client_setup();
@@ -7038,6 +7108,58 @@ compile_test() {
70387108 compile_check_conftest " $CODE " " NV_FOLIO_TEST_SWAPCACHE_PRESENT" " " " functions"
70397109 ;;
70407110
7111+
7112+ drm_driver_has_date)
7113+ #
7114+ # Determine if the 'drm_driver' structure has a 'date' field.
7115+ #
7116+ # Removed by commit cb2e1c2136f7 ("drm: remove driver date from
7117+ # struct drm_driver and all drivers") in linux-next, expected in
7118+ # v6.14.
7119+ #
7120+ CODE="
7121+ #if defined(NV_DRM_DRMP_H_PRESENT)
7122+ #include <drm/drmP.h>
7123+ #endif
7124+
7125+ #if defined(NV_DRM_DRM_DRV_H_PRESENT)
7126+ #include <drm/drm_drv.h>
7127+ #endif
7128+
7129+ int conftest_drm_driver_has_date(void) {
7130+ return offsetof(struct drm_driver, date);
7131+ }"
7132+
7133+ compile_check_conftest " $CODE " " NV_DRM_DRIVER_HAS_DATE" " " " types"
7134+ ;;
7135+
7136+ drm_connector_helper_funcs_mode_valid_has_const_mode_arg)
7137+ #
7138+ # Determine if the 'mode' pointer argument is const in
7139+ # drm_connector_helper_funcs::mode_valid.
7140+ #
7141+ # The 'mode' pointer argument in
7142+ # drm_connector_helper_funcs::mode_valid was made const by commit
7143+ # 26d6fd81916e ("drm/connector: make mode_valid take a const struct
7144+ # drm_display_mode") in linux-next, expected in v6.15.
7145+ #
7146+ CODE="
7147+ #if defined(NV_DRM_DRM_ATOMIC_HELPER_H_PRESENT)
7148+ #include <drm/drm_atomic_helper.h>
7149+ #endif
7150+
7151+ static int conftest_drm_connector_mode_valid(struct drm_connector *connector,
7152+ const struct drm_display_mode *mode) {
7153+ return 0;
7154+ }
7155+
7156+ const struct drm_connector_helper_funcs conftest_drm_connector_helper_funcs = {
7157+ .mode_valid = conftest_drm_connector_mode_valid,
7158+ };"
7159+
7160+ compile_check_conftest " $CODE " " NV_DRM_CONNECTOR_HELPER_FUNCS_MODE_VALID_HAS_CONST_MODE_ARG" " " " types"
7161+ ;;
7162+
70417163 # When adding a new conftest entry, please use the correct format for
70427164 # specifying the relevant upstream Linux kernel commit. Please
70437165 # avoid specifying -rc kernels, and only use SHAs that actually exist
0 commit comments