File tree Expand file tree Collapse file tree 5 files changed +31
-1
lines changed Expand file tree Collapse file tree 5 files changed +31
-1
lines changed Original file line number Diff line number Diff line change @@ -6610,6 +6610,25 @@ compile_test() {
6610
6610
compile_check_conftest " $CODE " " NV_DRM_FBDEV_GENERIC_SETUP_PRESENT" " " " functions"
6611
6611
;;
6612
6612
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
+
6613
6632
drm_aperture_remove_conflicting_pci_framebuffers)
6614
6633
#
6615
6634
# Determine whether drm_aperture_remove_conflicting_pci_framebuffers is present.
Original file line number Diff line number Diff line change @@ -15,6 +15,7 @@ NV_HEADER_PRESENCE_TESTS = \
15
15
drm/drm_atomic_uapi.h \
16
16
drm/drm_drv.h \
17
17
drm/drm_fbdev_generic.h \
18
+ drm/drm_fbdev_ttm.h \
18
19
drm/drm_framebuffer.h \
19
20
drm/drm_connector.h \
20
21
drm/drm_probe_helper.h \
Original file line number Diff line number Diff line change 73
73
#include <drm/drm_fbdev_generic.h>
74
74
#endif
75
75
76
+ #if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT )
77
+ #include <drm/drm_fbdev_ttm.h>
78
+ #endif
79
+
76
80
#include <linux/pci.h>
77
81
#include <linux/workqueue.h>
82
+ #include <linux/version.h>
78
83
79
84
/*
80
85
* 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)
1851
1856
drm_aperture_remove_conflicting_pci_framebuffers (pdev , nv_drm_driver .name );
1852
1857
#endif
1853
1858
}
1859
+ #if LINUX_VERSION_CODE < KERNEL_VERSION (6 , 11 , 0 )
1854
1860
drm_fbdev_generic_setup (dev , 32 );
1861
+ #else
1862
+ drm_fbdev_ttm_setup (dev , 32 );
1863
+ #endif
1855
1864
}
1856
1865
#endif /* defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) */
1857
1866
Original file line number Diff line number Diff line change @@ -58,7 +58,7 @@ typedef struct nv_timer nv_drm_timer;
58
58
#error "Need to define kernel timer callback primitives for this OS"
59
59
#endif
60
60
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 )
62
62
#define NV_DRM_FBDEV_GENERIC_AVAILABLE
63
63
#endif
64
64
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += fence_set_error
67
67
NV_CONFTEST_FUNCTION_COMPILE_TESTS += sync_file_get_fence
68
68
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_aperture_remove_conflicting_pci_framebuffers
69
69
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_generic_setup
70
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_ttm_setup
70
71
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_connector_attach_hdr_output_metadata_property
71
72
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_helper_crtc_enable_color_mgmt
72
73
NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_crtc_enable_color_mgmt
You can’t perform that action at this time.
0 commit comments