File tree Expand file tree Collapse file tree 5 files changed +33
-1
lines changed
Expand file tree Collapse file tree 5 files changed +33
-1
lines changed Original file line number Diff line number Diff 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.
Original file line number Diff line number Diff 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 \
Original file line number Diff line number Diff line change 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>
7882
@@ -1851,7 +1855,11 @@ void nv_drm_register_drm_device(const nv_gpu_info_t *gpu_info)
18511855 drm_aperture_remove_conflicting_pci_framebuffers (pdev , nv_drm_driver .name );
18521856#endif
18531857 }
1858+ #if defined(NV_DRM_FBDEV_TTM_AVAILABLE )
1859+ drm_fbdev_ttm_setup (dev , 32 );
1860+ #else
18541861 drm_fbdev_generic_setup (dev , 32 );
1862+ #endif
18551863 }
18561864#endif /* defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) */
18571865
Original file line number Diff line number Diff line change @@ -58,8 +58,11 @@ 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
63+ #if defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT )
64+ #define NV_DRM_FBDEV_TTM_AVAILABLE
65+ #endif
6366#endif
6467
6568struct page ;
Original file line number Diff line number Diff line change @@ -67,6 +67,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += fence_set_error
6767NV_CONFTEST_FUNCTION_COMPILE_TESTS += sync_file_get_fence
6868NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_aperture_remove_conflicting_pci_framebuffers
6969NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_generic_setup
70+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_ttm_setup
7071NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_connector_attach_hdr_output_metadata_property
7172NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_helper_crtc_enable_color_mgmt
7273NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_crtc_enable_color_mgmt
You can’t perform that action at this time.
0 commit comments