summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-550.107.02-r1 (renamed from metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-550.107.02)2
-rw-r--r--metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02-r4 (renamed from metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02-r3)2
-rw-r--r--metadata/pkg_desc_index4
-rw-r--r--sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch186
-rw-r--r--sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-550.107.02-r1.ebuild (renamed from sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-550.107.02.ebuild)1
-rw-r--r--x11-drivers/nvidia-drivers/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch186
-rw-r--r--x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02-r4.ebuild (renamed from x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02-r3.ebuild)1
7 files changed, 378 insertions, 4 deletions
diff --git a/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-550.107.02 b/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-550.107.02-r1
index d725484a..707583a0 100644
--- a/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-550.107.02
+++ b/metadata/md5-cache/sys-kernel/nvidia-drivers-dkms-550.107.02-r1
@@ -10,4 +10,4 @@ RDEPEND=sys-kernel/dkms !!sys-kernel/nvidia-drivers-dkms:3 !!sys-kernel/nvidia-d
RESTRICT=strip
SLOT=5
SRC_URI=amd64? ( http://us.download.nvidia.com/XFree86/Linux-x86_64/550.107.02/NVIDIA-Linux-x86_64-550.107.02.run )
-_md5_=10129d2f1e2bedd29d9fcecaeaabf620
+_md5_=15a7e6a2a723247812d21684fda06a43
diff --git a/metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02-r3 b/metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02-r4
index b6422f54..f4803c0c 100644
--- a/metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02-r3
+++ b/metadata/md5-cache/x11-drivers/nvidia-drivers-550.107.02-r4
@@ -14,4 +14,4 @@ RESTRICT=strip
SLOT=5
SRC_URI=https://download.nvidia.com/XFree86/Linux-x86_64/550.107.02/NVIDIA-Linux-x86_64-550.107.02.run https://download.nvidia.com/XFree86/nvidia-installer/nvidia-installer-550.107.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-modprobe/nvidia-modprobe-550.107.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-persistenced/nvidia-persistenced-550.107.02.tar.bz2 https://download.nvidia.com/XFree86/nvidia-xconfig/nvidia-xconfig-550.107.02.tar.bz2
_eclasses_=desktop 3a72ffe0d8e1dd73af3a1c8c15a59fed flag-o-matic f14aba975c94ccaa9f357a27e3b17ffe multilib b2a329026f2e404e9e371097dda47f96 multiprocessing 1e32df7deee68372153dca65f4a7c21f readme.gentoo-r1 b045f3acf546393ab6b3170781875358 systemd 54bd206bb5c4efac6ae28b6b006713b0 toolchain-funcs d3d42b22a610ce81c267b644bcec9b87 unpacker fb4b84181244b3b9990fa0bf40232dd2 user-info 9951b1a0e4f026d16c33a001fd2d5cdf
-_md5_=afe4bbbf8f25eede2301ac71be036c42
+_md5_=56a4e8cbccb531155d43b1aa02cb10e4
diff --git a/metadata/pkg_desc_index b/metadata/pkg_desc_index
index 9d2b509f..5e51fb98 100644
--- a/metadata/pkg_desc_index
+++ b/metadata/pkg_desc_index
@@ -71,7 +71,7 @@ sys-kernel/linux-image-redcore 6.10.14: Redcore Linux Kernel Image
sys-kernel/linux-image-redcore-lts 5.15.167 6.1.112 6.6.56: Redcore Linux LTS Kernel Image
sys-kernel/linux-sources-redcore 6.10.14: Redcore Linux Kernel Sources
sys-kernel/linux-sources-redcore-lts 5.15.167 6.1.112 6.6.56: Redcore Linux LTS Kernel Sources
-sys-kernel/nvidia-drivers-dkms 390.157-r8 470.256.02 550.107.02: NVIDIA driver sources for linux
+sys-kernel/nvidia-drivers-dkms 390.157-r8 470.256.02 550.107.02-r1: NVIDIA driver sources for linux
sys-kernel/tp_smapi-dkms 0.44-r2: IBM ThinkPad SMAPI BIOS driver sources
sys-kernel/vhba-dkms 20240202-r2: Virtual (SCSI) Host Bus Adapter kernel module for the CDEmu suite sources
sys-kernel/virtualbox-modules-dkms 7.1.2: Kernel Modules source for Virtualbox
@@ -85,7 +85,7 @@ virtual/tmpfiles 1.314.1337-r1: Virtual to select between different tmpfiles.d h
virtual/udev 314.1337-r1: Virtual to select between different udev daemon providers
www-client/ungoogled-chromium 129.0.6668.58: Modifications to Chromium for removing Google integration and enhancing privacy
x11-base/xorg-drivers 21.1-r100: Meta package containing deps on all xorg drivers (dummy package)
-x11-drivers/nvidia-drivers 390.157-r11 470.256.02-r3 550.107.02-r3: NVIDIA Accelerated Graphics Driver
+x11-drivers/nvidia-drivers 390.157-r11 470.256.02-r3 550.107.02-r4: NVIDIA Accelerated Graphics Driver
x11-libs/gtk+ 2.24.33-r6 3.24.41-r6: Gimp ToolKit +
x11-misc/nvidia-prime 314: NVIDIA Prime Render Offload configuration and utilities
x11-misc/nvidia-settings 390.157-r7 470.256.02 550.107.02-r1: NVIDIA Linux X11 Settings Utility
diff --git a/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch b/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch
new file mode 100644
index 00000000..047078dd
--- /dev/null
+++ b/sys-kernel/nvidia-drivers-dkms/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch
@@ -0,0 +1,186 @@
+diff '--color=auto' -Nur a/kernel/conftest.sh b/kernel/conftest.sh
+--- a/kernel/conftest.sh 2024-07-24 23:57:19.000000000 +0100
++++ b/kernel/conftest.sh 2024-10-18 10:22:27.367073132 +0100
+@@ -6593,6 +6593,25 @@
+ compile_check_conftest "$CODE" "NV_DRM_FBDEV_GENERIC_SETUP_PRESENT" "" "functions"
+ ;;
+
++ 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 <drm/drm_fb_helper.h>
++ #if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
++ #include <drm/drm_fbdev_ttm.h>
++ #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)
+ #
+ # Determine whether drm_aperture_remove_conflicting_pci_framebuffers is present.
+diff '--color=auto' -Nur a/kernel/header-presence-tests.mk b/kernel/header-presence-tests.mk
+--- a/kernel/header-presence-tests.mk 2024-07-24 23:57:19.000000000 +0100
++++ b/kernel/header-presence-tests.mk 2024-10-18 10:22:27.368073132 +0100
+@@ -15,6 +15,7 @@
+ drm/drm_atomic_uapi.h \
+ drm/drm_drv.h \
+ drm/drm_fbdev_generic.h \
++ drm/drm_fbdev_ttm.h \
+ drm/drm_framebuffer.h \
+ drm/drm_connector.h \
+ drm/drm_probe_helper.h \
+diff '--color=auto' -Nur a/kernel/nvidia-drm/nvidia-drm-drv.c b/kernel/nvidia-drm/nvidia-drm-drv.c
+--- a/kernel/nvidia-drm/nvidia-drm-drv.c 2024-07-25 00:22:50.000000000 +0100
++++ b/kernel/nvidia-drm/nvidia-drm-drv.c 2024-10-18 10:22:27.368073132 +0100
+@@ -73,6 +73,10 @@
+ #include <drm/drm_fbdev_generic.h>
+ #endif
+
++#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
++#include <drm/drm_fbdev_ttm.h>
++#endif
++
+ #include <linux/pci.h>
+ #include <linux/workqueue.h>
+
+@@ -1823,7 +1827,11 @@
+ drm_aperture_remove_conflicting_pci_framebuffers(pdev, nv_drm_driver.name);
+ #endif
+ }
++#if defined(NV_DRM_FBDEV_TTM_AVAILABLE)
++ drm_fbdev_ttm_setup(dev, 32);
++#else
+ drm_fbdev_generic_setup(dev, 32);
++#endif
+ }
+ #endif /* defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) */
+
+diff '--color=auto' -Nur a/kernel/nvidia-drm/nvidia-drm-os-interface.h b/kernel/nvidia-drm/nvidia-drm-os-interface.h
+--- a/kernel/nvidia-drm/nvidia-drm-os-interface.h 2024-07-25 00:22:50.000000000 +0100
++++ b/kernel/nvidia-drm/nvidia-drm-os-interface.h 2024-10-18 10:22:27.368073132 +0100
+@@ -58,8 +58,11 @@
+ #error "Need to define kernel timer callback primitives for this OS"
+ #endif
+
+-#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
+
+ struct page;
+diff '--color=auto' -Nur a/kernel/nvidia-drm/nvidia-drm-sources.mk b/kernel/nvidia-drm/nvidia-drm-sources.mk
+--- a/kernel/nvidia-drm/nvidia-drm-sources.mk 2024-07-24 23:59:33.000000000 +0100
++++ b/kernel/nvidia-drm/nvidia-drm-sources.mk 2024-10-18 10:22:27.368073132 +0100
+@@ -67,6 +67,7 @@
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += sync_file_get_fence
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_aperture_remove_conflicting_pci_framebuffers
+ 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
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_helper_crtc_enable_color_mgmt
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_crtc_enable_color_mgmt
+diff '--color=auto' -Nur a/kernel-open/conftest.sh b/kernel-open/conftest.sh
+--- a/kernel-open/conftest.sh 2024-07-24 23:57:19.000000000 +0100
++++ b/kernel-open/conftest.sh 2024-10-18 10:22:27.369073132 +0100
+@@ -6593,6 +6593,25 @@
+ compile_check_conftest "$CODE" "NV_DRM_FBDEV_GENERIC_SETUP_PRESENT" "" "functions"
+ ;;
+
++ 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 <drm/drm_fb_helper.h>
++ #if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
++ #include <drm/drm_fbdev_ttm.h>
++ #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)
+ #
+ # Determine whether drm_aperture_remove_conflicting_pci_framebuffers is present.
+diff '--color=auto' -Nur a/kernel-open/header-presence-tests.mk b/kernel-open/header-presence-tests.mk
+--- a/kernel-open/header-presence-tests.mk 2024-07-24 23:57:19.000000000 +0100
++++ b/kernel-open/header-presence-tests.mk 2024-10-18 10:22:27.369073132 +0100
+@@ -15,6 +15,7 @@
+ drm/drm_atomic_uapi.h \
+ drm/drm_drv.h \
+ drm/drm_fbdev_generic.h \
++ drm/drm_fbdev_ttm.h \
+ drm/drm_framebuffer.h \
+ drm/drm_connector.h \
+ drm/drm_probe_helper.h \
+diff '--color=auto' -Nur a/kernel-open/nvidia-drm/nvidia-drm-drv.c b/kernel-open/nvidia-drm/nvidia-drm-drv.c
+--- a/kernel-open/nvidia-drm/nvidia-drm-drv.c 2024-07-25 00:22:48.000000000 +0100
++++ b/kernel-open/nvidia-drm/nvidia-drm-drv.c 2024-10-18 10:22:27.370073132 +0100
+@@ -73,6 +73,10 @@
+ #include <drm/drm_fbdev_generic.h>
+ #endif
+
++#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
++#include <drm/drm_fbdev_ttm.h>
++#endif
++
+ #include <linux/pci.h>
+ #include <linux/workqueue.h>
+
+@@ -1823,7 +1827,11 @@
+ drm_aperture_remove_conflicting_pci_framebuffers(pdev, nv_drm_driver.name);
+ #endif
+ }
++#if defined(NV_DRM_FBDEV_TTM_AVAILABLE)
++ drm_fbdev_ttm_setup(dev, 32);
++#else
+ drm_fbdev_generic_setup(dev, 32);
++#endif
+ }
+ #endif /* defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) */
+
+diff '--color=auto' -Nur a/kernel-open/nvidia-drm/nvidia-drm-os-interface.h b/kernel-open/nvidia-drm/nvidia-drm-os-interface.h
+--- a/kernel-open/nvidia-drm/nvidia-drm-os-interface.h 2024-07-25 00:22:48.000000000 +0100
++++ b/kernel-open/nvidia-drm/nvidia-drm-os-interface.h 2024-10-18 10:22:27.370073132 +0100
+@@ -58,8 +58,11 @@
+ #error "Need to define kernel timer callback primitives for this OS"
+ #endif
+
+-#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
+
+ struct page;
+diff '--color=auto' -Nur a/kernel-open/nvidia-drm/nvidia-drm-sources.mk b/kernel-open/nvidia-drm/nvidia-drm-sources.mk
+--- a/kernel-open/nvidia-drm/nvidia-drm-sources.mk 2024-07-24 23:59:33.000000000 +0100
++++ b/kernel-open/nvidia-drm/nvidia-drm-sources.mk 2024-10-18 10:22:27.370073132 +0100
+@@ -67,6 +67,7 @@
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += sync_file_get_fence
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_aperture_remove_conflicting_pci_framebuffers
+ 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
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_helper_crtc_enable_color_mgmt
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_crtc_enable_color_mgmt
diff --git a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-550.107.02.ebuild b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-550.107.02-r1.ebuild
index 1bc82c27..dca545f1 100644
--- a/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-550.107.02.ebuild
+++ b/sys-kernel/nvidia-drivers-dkms/nvidia-drivers-dkms-550.107.02-r1.ebuild
@@ -24,6 +24,7 @@ RDEPEND="${DEPEND}
PATCHES=(
"${FILESDIR}"/dkms550.patch
+ "${FILESDIR}"/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch
)
S="${WORKDIR}/${AMD64_NV_PACKAGE}"
diff --git a/x11-drivers/nvidia-drivers/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch b/x11-drivers/nvidia-drivers/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch
new file mode 100644
index 00000000..047078dd
--- /dev/null
+++ b/x11-drivers/nvidia-drivers/files/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch
@@ -0,0 +1,186 @@
+diff '--color=auto' -Nur a/kernel/conftest.sh b/kernel/conftest.sh
+--- a/kernel/conftest.sh 2024-07-24 23:57:19.000000000 +0100
++++ b/kernel/conftest.sh 2024-10-18 10:22:27.367073132 +0100
+@@ -6593,6 +6593,25 @@
+ compile_check_conftest "$CODE" "NV_DRM_FBDEV_GENERIC_SETUP_PRESENT" "" "functions"
+ ;;
+
++ 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 <drm/drm_fb_helper.h>
++ #if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
++ #include <drm/drm_fbdev_ttm.h>
++ #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)
+ #
+ # Determine whether drm_aperture_remove_conflicting_pci_framebuffers is present.
+diff '--color=auto' -Nur a/kernel/header-presence-tests.mk b/kernel/header-presence-tests.mk
+--- a/kernel/header-presence-tests.mk 2024-07-24 23:57:19.000000000 +0100
++++ b/kernel/header-presence-tests.mk 2024-10-18 10:22:27.368073132 +0100
+@@ -15,6 +15,7 @@
+ drm/drm_atomic_uapi.h \
+ drm/drm_drv.h \
+ drm/drm_fbdev_generic.h \
++ drm/drm_fbdev_ttm.h \
+ drm/drm_framebuffer.h \
+ drm/drm_connector.h \
+ drm/drm_probe_helper.h \
+diff '--color=auto' -Nur a/kernel/nvidia-drm/nvidia-drm-drv.c b/kernel/nvidia-drm/nvidia-drm-drv.c
+--- a/kernel/nvidia-drm/nvidia-drm-drv.c 2024-07-25 00:22:50.000000000 +0100
++++ b/kernel/nvidia-drm/nvidia-drm-drv.c 2024-10-18 10:22:27.368073132 +0100
+@@ -73,6 +73,10 @@
+ #include <drm/drm_fbdev_generic.h>
+ #endif
+
++#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
++#include <drm/drm_fbdev_ttm.h>
++#endif
++
+ #include <linux/pci.h>
+ #include <linux/workqueue.h>
+
+@@ -1823,7 +1827,11 @@
+ drm_aperture_remove_conflicting_pci_framebuffers(pdev, nv_drm_driver.name);
+ #endif
+ }
++#if defined(NV_DRM_FBDEV_TTM_AVAILABLE)
++ drm_fbdev_ttm_setup(dev, 32);
++#else
+ drm_fbdev_generic_setup(dev, 32);
++#endif
+ }
+ #endif /* defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) */
+
+diff '--color=auto' -Nur a/kernel/nvidia-drm/nvidia-drm-os-interface.h b/kernel/nvidia-drm/nvidia-drm-os-interface.h
+--- a/kernel/nvidia-drm/nvidia-drm-os-interface.h 2024-07-25 00:22:50.000000000 +0100
++++ b/kernel/nvidia-drm/nvidia-drm-os-interface.h 2024-10-18 10:22:27.368073132 +0100
+@@ -58,8 +58,11 @@
+ #error "Need to define kernel timer callback primitives for this OS"
+ #endif
+
+-#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
+
+ struct page;
+diff '--color=auto' -Nur a/kernel/nvidia-drm/nvidia-drm-sources.mk b/kernel/nvidia-drm/nvidia-drm-sources.mk
+--- a/kernel/nvidia-drm/nvidia-drm-sources.mk 2024-07-24 23:59:33.000000000 +0100
++++ b/kernel/nvidia-drm/nvidia-drm-sources.mk 2024-10-18 10:22:27.368073132 +0100
+@@ -67,6 +67,7 @@
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += sync_file_get_fence
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_aperture_remove_conflicting_pci_framebuffers
+ 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
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_helper_crtc_enable_color_mgmt
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_crtc_enable_color_mgmt
+diff '--color=auto' -Nur a/kernel-open/conftest.sh b/kernel-open/conftest.sh
+--- a/kernel-open/conftest.sh 2024-07-24 23:57:19.000000000 +0100
++++ b/kernel-open/conftest.sh 2024-10-18 10:22:27.369073132 +0100
+@@ -6593,6 +6593,25 @@
+ compile_check_conftest "$CODE" "NV_DRM_FBDEV_GENERIC_SETUP_PRESENT" "" "functions"
+ ;;
+
++ 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 <drm/drm_fb_helper.h>
++ #if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
++ #include <drm/drm_fbdev_ttm.h>
++ #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)
+ #
+ # Determine whether drm_aperture_remove_conflicting_pci_framebuffers is present.
+diff '--color=auto' -Nur a/kernel-open/header-presence-tests.mk b/kernel-open/header-presence-tests.mk
+--- a/kernel-open/header-presence-tests.mk 2024-07-24 23:57:19.000000000 +0100
++++ b/kernel-open/header-presence-tests.mk 2024-10-18 10:22:27.369073132 +0100
+@@ -15,6 +15,7 @@
+ drm/drm_atomic_uapi.h \
+ drm/drm_drv.h \
+ drm/drm_fbdev_generic.h \
++ drm/drm_fbdev_ttm.h \
+ drm/drm_framebuffer.h \
+ drm/drm_connector.h \
+ drm/drm_probe_helper.h \
+diff '--color=auto' -Nur a/kernel-open/nvidia-drm/nvidia-drm-drv.c b/kernel-open/nvidia-drm/nvidia-drm-drv.c
+--- a/kernel-open/nvidia-drm/nvidia-drm-drv.c 2024-07-25 00:22:48.000000000 +0100
++++ b/kernel-open/nvidia-drm/nvidia-drm-drv.c 2024-10-18 10:22:27.370073132 +0100
+@@ -73,6 +73,10 @@
+ #include <drm/drm_fbdev_generic.h>
+ #endif
+
++#if defined(NV_DRM_DRM_FBDEV_TTM_H_PRESENT)
++#include <drm/drm_fbdev_ttm.h>
++#endif
++
+ #include <linux/pci.h>
+ #include <linux/workqueue.h>
+
+@@ -1823,7 +1827,11 @@
+ drm_aperture_remove_conflicting_pci_framebuffers(pdev, nv_drm_driver.name);
+ #endif
+ }
++#if defined(NV_DRM_FBDEV_TTM_AVAILABLE)
++ drm_fbdev_ttm_setup(dev, 32);
++#else
+ drm_fbdev_generic_setup(dev, 32);
++#endif
+ }
+ #endif /* defined(NV_DRM_FBDEV_GENERIC_AVAILABLE) */
+
+diff '--color=auto' -Nur a/kernel-open/nvidia-drm/nvidia-drm-os-interface.h b/kernel-open/nvidia-drm/nvidia-drm-os-interface.h
+--- a/kernel-open/nvidia-drm/nvidia-drm-os-interface.h 2024-07-25 00:22:48.000000000 +0100
++++ b/kernel-open/nvidia-drm/nvidia-drm-os-interface.h 2024-10-18 10:22:27.370073132 +0100
+@@ -58,8 +58,11 @@
+ #error "Need to define kernel timer callback primitives for this OS"
+ #endif
+
+-#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
+
+ struct page;
+diff '--color=auto' -Nur a/kernel-open/nvidia-drm/nvidia-drm-sources.mk b/kernel-open/nvidia-drm/nvidia-drm-sources.mk
+--- a/kernel-open/nvidia-drm/nvidia-drm-sources.mk 2024-07-24 23:59:33.000000000 +0100
++++ b/kernel-open/nvidia-drm/nvidia-drm-sources.mk 2024-10-18 10:22:27.370073132 +0100
+@@ -67,6 +67,7 @@
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += sync_file_get_fence
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_aperture_remove_conflicting_pci_framebuffers
+ 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
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_helper_crtc_enable_color_mgmt
+ NV_CONFTEST_FUNCTION_COMPILE_TESTS += drm_crtc_enable_color_mgmt
diff --git a/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02-r3.ebuild b/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02-r4.ebuild
index 001889c6..cb0a33e8 100644
--- a/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02-r3.ebuild
+++ b/x11-drivers/nvidia-drivers/nvidia-drivers-550.107.02-r4.ebuild
@@ -69,6 +69,7 @@ QA_PREBUILT="lib/firmware/* opt/bin/* usr/lib*"
PATCHES=(
"${FILESDIR}"/nvidia-modprobe-390.141-uvm-perms.patch
+ "${FILESDIR}"/nvidia-drivers-550.107.02-kernel-6.11-fbdev.patch
)
pkg_setup() {