At a glance this should(?) only be affecting fbdev=1 (default-off and marked experimental in nvidia.conf). Compiles fine either way given the test would've failed resulting in usage being skipped. NVIDIA is already aware[1] and this should be unnecessary next bumps. [1] https://github.com/NVIDIA/open-gpu-kernel-modules/pull/692 --- a/kernel/conftest.sh +++ b/kernel/conftest.sh @@ -6612,2 +6612,21 @@ + drm_fbdev_ttm_setup) + # + # Determine whether drm_fbdev_ttm_setup is present. + # + # Added by commit 9060d7f49376 ("drm/fb-helper: Finish the + # generic fbdev emulation") in v4.19. + # + CODE=" + #include + #if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT) + #include + #endif + void conftest_drm_fbdev_ttm_setup(void) { + drm_fbdev_ttm_setup(); + }" + + compile_check_conftest "$CODE" "NV_DRM_FBDEV_TTM_SETUP_PRESENT" "" "functions" + ;; + drm_aperture_remove_conflicting_pci_framebuffers) --- a/kernel/header-presence-tests.mk +++ b/kernel/header-presence-tests.mk @@ -17,2 +17,3 @@ drm/drm_fbdev_generic.h \ + drm/drm_fbdev_ttm.h \ drm/drm_framebuffer.h \ --- a/kernel/nvidia-drm/nvidia-drm-drv.c +++ b/kernel/nvidia-drm/nvidia-drm-drv.c @@ -75,2 +75,6 @@ +#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT) +#include +#endif + #include @@ -1853,3 +1857,7 @@ } +#if defined(NV_DRM_FBDEV_TTM_AVAILABLE) + drm_fbdev_ttm_setup(dev, 32); +#else drm_fbdev_generic_setup(dev, 32); +#endif } --- a/kernel/nvidia-drm/nvidia-drm-os-interface.h +++ b/kernel/nvidia-drm/nvidia-drm-os-interface.h @@ -60,4 +60,7 @@ -#if defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) +#if (defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) || defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT)) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) #define NV_DRM_FBDEV_GENERIC_AVAILABLE +#if defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT) +#define NV_DRM_FBDEV_TTM_AVAILABLE +#endif #endif --- a/kernel/nvidia-drm/nvidia-drm-sources.mk +++ b/kernel/nvidia-drm/nvidia-drm-sources.mk @@ -69,2 +69,3 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_generic_setup +NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_ttm_setup NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_connector_attach_hdr_output_metadata_property --- a/kernel-module-source/kernel-open/conftest.sh +++ b/kernel-module-source/kernel-open/conftest.sh @@ -6612,2 +6612,21 @@ + drm_fbdev_ttm_setup) + # + # Determine whether drm_fbdev_ttm_setup is present. + # + # Added by commit 9060d7f49376 ("drm/fb-helper: Finish the + # generic fbdev emulation") in v4.19. + # + CODE=" + #include + #if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT) + #include + #endif + void conftest_drm_fbdev_ttm_setup(void) { + drm_fbdev_ttm_setup(); + }" + + compile_check_conftest "$CODE" "NV_DRM_FBDEV_TTM_SETUP_PRESENT" "" "functions" + ;; + drm_aperture_remove_conflicting_pci_framebuffers) --- a/kernel-module-source/kernel-open/header-presence-tests.mk +++ b/kernel-module-source/kernel-open/header-presence-tests.mk @@ -17,2 +17,3 @@ drm/drm_fbdev_generic.h \ + drm/drm_fbdev_ttm.h \ drm/drm_framebuffer.h \ --- a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-drv.c +++ b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-drv.c @@ -75,2 +75,6 @@ +#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT) +#include +#endif + #include @@ -1853,3 +1857,7 @@ } +#if defined(NV_DRM_FBDEV_TTM_AVAILABLE) + drm_fbdev_ttm_setup(dev, 32); +#else drm_fbdev_generic_setup(dev, 32); +#endif } --- a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-os-interface.h +++ b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-os-interface.h @@ -60,4 +60,7 @@ -#if defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) +#if (defined(NV_DRM_FBDEV_GENERIC_SETUP_PRESENT) || defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT)) && defined(NV_DRM_APERTURE_REMOVE_CONFLICTING_PCI_FRAMEBUFFERS_PRESENT) #define NV_DRM_FBDEV_GENERIC_AVAILABLE +#if defined(NV_DRM_FBDEV_TTM_SETUP_PRESENT) +#define NV_DRM_FBDEV_TTM_AVAILABLE +#endif #endif --- a/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-sources.mk +++ b/kernel-module-source/kernel-open/nvidia-drm/nvidia-drm-sources.mk @@ -69,2 +69,3 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_generic_setup +NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_fbdev_ttm_setup NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_connector_attach_hdr_output_metadata_property