commit 170b640c0ea1bab8edd6a282aed4da4ac9f5d3e3
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Sat Oct 19 23:18:09 2024 +0100
Patch for 6.12rc kernel
kernel-612-buildfix.patch | 86 +++++++++++++++++++++++++++++++++++++++++++++++
nvidia-kmod.spec | 12 +++++--
2 files changed, 95 insertions(+), 3 deletions(-)
---
diff --git a/kernel-612-buildfix.patch b/kernel-612-buildfix.patch
new file mode 100644
index 0000000..c9d0add
--- /dev/null
+++ b/kernel-612-buildfix.patch
@@ -0,0 +1,86 @@
+From 94ad29389cd5129401adea6925f987f4529abb1c Mon Sep 17 00:00:00 2001
+From: Peter Jung <admin(a)ptr1337.dev>
+Date: Thu, 26 Sep 2024 14:53:31 +0200
+Subject: [PATCH 5/5] 6.12: drm_outpull_pill changed check
+
+---
+ kernel/conftest.sh | 23 ++++++++++++++++++++
+ kernel/nvidia-drm/nvidia-drm-drv.c | 4 ++++
+ kernel/nvidia-drm/nvidia-drm-sources.mk | 1 +
+ 3 files changed, 28 insertions(+)
+
+diff --git a/kernel/conftest.sh b/kernel/conftest.sh
+index 4a239e63..4d6fff64 100755
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -6631,6 +6631,29 @@ compile_test() {
+ compile_check_conftest "$CODE"
"NV_DRM_FBDEV_TTM_SETUP_PRESENT" "" "functions"
+ ;;
+
++ drm_output_poll_changed)
++ #
++ # Determine whether drm_mode_config_funcs.output_poll_changed
++ # callback is present
++ #
++ # Removed by commit 446d0f4849b1 ("drm: Remove struct
++ # drm_mode_config_funcs.output_poll_changed") in v6.12. Hotplug
++ # event support is handled through the fbdev emulation interface
++ # going forward.
++ #
++ CODE="
++ #if defined(NV_DRM_DRM_MODE_CONFIG_H_PRESENT)
++ #include <drm/drm_mode_config.h>
++ #else
++ #include <drm/drm_crtc.h>
++ #endif
++ int conftest_drm_output_poll_changed_available(void) {
++ return offsetof(struct drm_mode_config_funcs, output_poll_changed);
++ }"
++
++ compile_check_conftest "$CODE"
"NV_DRM_OUTPUT_POLL_CHANGED_PRESENT" "" "types"
++ ;;
++
+ drm_aperture_remove_conflicting_pci_framebuffers)
+ #
+ # Determine whether drm_aperture_remove_conflicting_pci_framebuffers is
present.
+diff --git a/kernel/nvidia-drm/nvidia-drm-drv.c b/kernel/nvidia-drm/nvidia-drm-drv.c
+index 50028c26..034dda66 100644
+--- a/kernel/nvidia-drm/nvidia-drm-drv.c
++++ b/kernel/nvidia-drm/nvidia-drm-drv.c
+@@ -126,6 +126,7 @@ static const char* nv_get_input_colorspace_name(
+
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+
++#if defined(NV_DRM_OUTPUT_POLL_CHANGED_PRESENT)
+ static void nv_drm_output_poll_changed(struct drm_device *dev)
+ {
+ struct drm_connector *connector = NULL;
+@@ -169,6 +170,7 @@ static void nv_drm_output_poll_changed(struct drm_device *dev)
+ nv_drm_connector_list_iter_end(&conn_iter);
+ #endif
+ }
++#endif /* NV_DRM_OUTPUT_POLL_CHANGED_PRESENT */
+
+ static struct drm_framebuffer *nv_drm_framebuffer_create(
+ struct drm_device *dev,
+@@ -206,7 +208,9 @@ static const struct drm_mode_config_funcs nv_mode_config_funcs = {
+ .atomic_check = nv_drm_atomic_check,
+ .atomic_commit = nv_drm_atomic_commit,
+
++ #if defined(NV_DRM_OUTPUT_POLL_CHANGED_PRESENT)
+ .output_poll_changed = nv_drm_output_poll_changed,
++ #endif
+ };
+
+ static void nv_drm_event_callback(const struct NvKmsKapiEvent *event)
+diff --git a/kernel/nvidia-drm/nvidia-drm-sources.mk
b/kernel/nvidia-drm/nvidia-drm-sources.mk
+index 247096b7..f5964a57 100644
+--- a/kernel/nvidia-drm/nvidia-drm-sources.mk
++++ b/kernel/nvidia-drm/nvidia-drm-sources.mk
+@@ -131,3 +131,4 @@ NV_CONFTEST_TYPE_COMPILE_TESTS +=
drm_aperture_remove_conflicting_pci_framebuffe
+ NV_CONFTEST_TYPE_COMPILE_TESTS +=
drm_mode_create_dp_colorspace_property_has_supported_colorspaces_arg
+ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_syncobj_features_present
+ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_unlocked_ioctl_flag_present
++NV_CONFTEST_TYPE_COMPILE_TESTS += drm_output_poll_changed
+--
+2.46.2
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index c6bfd83..8331093 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-kmod
Epoch: 3
Version: 560.35.03
# Taken over by kmodtool
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: NVIDIA display driver kernel module
License: Redistributable, no modification permitted
URL:
https://www.nvidia.com/
@@ -20,6 +20,7 @@ URL:
https://www.nvidia.com/
Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: make_modeset_default.patch
Patch1: kernel-611-framebuffer.patch
+Patch2: kernel-612-buildfix.patch
ExclusiveArch: x86_64 aarch64
@@ -52,8 +53,10 @@ echo "Using original nvidia defaults"
%else
echo "Set nvidia to fbdev=1 modeset=1"
%patch -P0 -p1
-%patch -P1 -p1 -d kernel/
%endif
+%patch -P1 -p1 -d kernel/
+%patch -P2 -p1
+
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
done
@@ -87,6 +90,9 @@ done
%changelog
+* Thu Oct 03 2024 Leigh Scott <leigh123linux(a)gmail.com> - 3:560.35.03-2
+- Patch for 6.12rc kernel
+
* Wed Aug 21 2024 Leigh Scott <leigh123linux(a)gmail.com> - 3:560.35.03-1
- Update to 560.35.03 Release
@@ -130,7 +136,7 @@ done
- Update to 550.54.14 release
* Thu Feb 01 2024 Leigh Scott <leigh123linux(a)gmail.com> - 3:550.40.07-2
-- fix build with gcc-14 ad kernel-6.7.3
+- fix build with gcc-14 and kernel-6.7.3
* Wed Jan 24 2024 Leigh Scott <leigh123linux(a)gmail.com> - 3:550.40.07-1
- Update to 550.40.07 beta