Skip to content

Commit 924fd0e

Browse files
committed
Fix 6.11 drm_fbdev_generic.h rename to drm_fbdev_ttm.h
1 parent 315fd96 commit 924fd0e

File tree

5 files changed

+31
-1
lines changed

5 files changed

+31
-1
lines changed

kernel-open/conftest.sh

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6610,6 +6610,25 @@ compile_test() {
66106610
compile_check_conftest "$CODE" "NV_DRM_FBDEV_GENERIC_SETUP_PRESENT" "" "functions"
66116611
;;
66126612

6613+
drm_fbdev_ttm_setup)
6614+
#
6615+
# Determine whether drm_fbdev_ttm_setup is present.
6616+
#
6617+
# Added by commit 9060d7f49376 ("drm/fb-helper: Finish the
6618+
# generic fbdev emulation") in v4.19.
6619+
#
6620+
CODE="
6621+
#include <drm/drm_fb_helper.h>
6622+
#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
6623+
#include <drm/drm_fbdev_ttm.h>
6624+
#endif
6625+
void conftest_drm_fbdev_ttm_setup(void) {
6626+
drm_fbdev_ttm_setup();
6627+
}"
6628+
6629+
compile_check_conftest "$CODE" "NV_DRM_FBDEV_TTM_SETUP_PRESENT" "" "functions"
6630+
;;
6631+
66136632
drm_aperture_remove_conflicting_pci_framebuffers)
66146633
#
66156634
# Determine whether drm_aperture_remove_conflicting_pci_framebuffers is present.

kernel-open/header-presence-tests.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ NV_HEADER_PRESENCE_TESTS = \
1515
drm/drm_atomic_uapi.h \
1616
drm/drm_drv.h \
1717
drm/drm_fbdev_generic.h \
18+
drm/drm_fbdev_ttm.h \
1819
drm/drm_framebuffer.h \
1920
drm/drm_connector.h \
2021
drm/drm_probe_helper.h \

kernel-open/nvidia-drm/nvidia-drm-drv.c

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -73,8 +73,13 @@
7373
#include <drm/drm_fbdev_generic.h>
7474
#endif
7575

76+
#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
77+
#include <drm/drm_fbdev_ttm.h>
78+
#endif
79+
7680
#include <linux/pci.h>
7781
#include <linux/workqueue.h>
82+
#include <linux/version.h>
7883

7984
/*
8085
* Commit fcd70cd36b9b ("drm: Split out drm_probe_helper.h")
@@ -1851,7 +1856,11 @@ void nv_drm_register_drm_device(const nv_gpu_info_t *gpu_info)
18511856
drm_aperture_remove_conflicting_pci_framebuffers(pdev, nv_drm_driver.name);
18521857
#endif
18531858
}
1859+
#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 11, 0)
18541860
drm_fbdev_generic_setup(dev, 32);
1861+
#else
1862+
drm_fbdev_ttm_setup(dev, 32);
1863+
#endif
18551864
}
18561865
#endif /* defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) */
18571866

kernel-open/nvidia-drm/nvidia-drm-os-interface.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,7 +58,7 @@ typedef struct nv_timer nv_drm_timer;
5858
#error "Need to define kernel timer callback primitives for this OS"
5959
#endif
6060

61-
#if defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT)
61+
#if defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) || defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT)
6262
#define NV_DRM_FBDEV_GENERIC_AVAILABLE
6363
#endif
6464

kernel-open/nvidia-drm/nvidia-drm-sources.mk

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -67,6 +67,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += fence_set_error
6767
NV_CONFTEST_FUNCTION_COMPILE_TESTS += sync_file_get_fence
6868
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_aperture_remove_conflicting_pci_framebuffers
6969
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_generic_setup
70+
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_ttm_setup
7071
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_connector_attach_hdr_output_metadata_property
7172
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_helper_crtc_enable_color_mgmt
7273
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_crtc_enable_color_mgmt

0 commit comments

Comments
 (0)