[nvidia-470xx-kmod] Add patches to fix kernel-6.12 build and runtime issues
by Leigh Scott
commit 04bfe536b9932785c9f5ea83c7af7f53aaa693ca
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Dec 13 15:01:49 2024 +0000
Add patches to fix kernel-6.12 build and runtime issues
kernel-612-buildfix.patch | 71 ++++++++++++++++++++++++++++++++++++++++++++
kernel-612_runtime_fix.patch | 14 +++++++++
nvidia-470xx-kmod.spec | 9 +++++-
3 files changed, 93 insertions(+), 1 deletion(-)
---
diff --git a/kernel-612-buildfix.patch b/kernel-612-buildfix.patch
new file mode 100644
index 0000000..d64395c
--- /dev/null
+++ b/kernel-612-buildfix.patch
@@ -0,0 +1,71 @@
+diff -uNrp a/conftest.sh b/conftest.sh
+--- a/conftest.sh 2024-05-02 15:25:33.000000000 +0100
++++ b/conftest.sh 2024-12-13 13:54:11.908441973 +0000
+@@ -5055,6 +5055,30 @@ compile_test() {
+ compile_check_conftest "$CODE" "NV_DRM_UNLOCKED_IOCTL_FLAG_PRESENT" "" "types"
+ ;;
+
++ 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"
++ ;;
++
++
+ # When adding a new conftest entry, please use the correct format for
+ # specifying the relevant upstream Linux kernel commit.
+ #
+diff -uNrp a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
+--- a/nvidia-drm/nvidia-drm-drv.c 2024-05-02 15:50:00.000000000 +0100
++++ b/nvidia-drm/nvidia-drm-drv.c 2024-12-13 13:54:11.909442018 +0000
+@@ -88,6 +88,7 @@ static struct nv_drm_device *dev_list =
+
+ #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;
+@@ -131,6 +132,7 @@ static void nv_drm_output_poll_changed(s
+ 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,
+@@ -168,7 +170,9 @@ static const struct drm_mode_config_func
+ .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 -uNrp a/nvidia-drm/nvidia-drm.Kbuild b/nvidia-drm/nvidia-drm.Kbuild
+--- a/nvidia-drm/nvidia-drm.Kbuild 2024-05-02 15:28:12.000000000 +0100
++++ b/nvidia-drm/nvidia-drm.Kbuild 2024-12-13 13:54:11.909442018 +0000
+@@ -122,3 +122,4 @@ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_co
+ NV_CONFTEST_TYPE_COMPILE_TESTS += vm_area_struct_has_const_vm_flags
+ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_driver_has_dumb_destroy
+ NV_CONFTEST_TYPE_COMPILE_TESTS += drm_unlocked_ioctl_flag_present
++NV_CONFTEST_TYPE_COMPILE_TESTS += drm_output_poll_changed
diff --git a/kernel-612_runtime_fix.patch b/kernel-612_runtime_fix.patch
new file mode 100644
index 0000000..197f31e
--- /dev/null
+++ b/kernel-612_runtime_fix.patch
@@ -0,0 +1,14 @@
+diff -uNrp 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-10-10 12:58:12.000000000 +0100
++++ b/kernel/nvidia-drm/nvidia-drm-drv.c 2024-11-19 13:34:31.798764897 +0000
+@@ -743,6 +743,10 @@ static const struct file_operations nv_d
+ .read = drm_read,
+
+ .llseek = noop_llseek,
++
++#if defined(FOP_UNSIGNED_OFFSET)
++ .fop_flags = FOP_UNSIGNED_OFFSET,
++#endif
+ };
+
+ static const struct drm_ioctl_desc nv_drm_ioctls[] = {
diff --git a/nvidia-470xx-kmod.spec b/nvidia-470xx-kmod.spec
index 8a457d9..e6dde94 100644
--- a/nvidia-470xx-kmod.spec
+++ b/nvidia-470xx-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-470xx-kmod
Epoch: 3
Version: 470.256.02
# Taken over by kmodtool
-Release: 4%{?dist}
+Release: 5%{?dist}
License: Redistributable, no modification permitted
Summary: NVIDIA 470xx display driver kernel module
@@ -25,6 +25,8 @@ Patch2: 0037-import-pfn_valid-w-o-GPL-rcu_read_lock-unlock-from-v.patch
Patch3: 0043-backport-follow_pfn-changes-from-550.90.07.patch
Patch4: 0045-let-the-virt_addr_valid-macro-use-nv_pfn_valid-on-pp.patch
Patch5: 0046-backport-nv_get_kern_phys_address-changes-from-555.4.patch
+Patch6: kernel-612-buildfix.patch
+Patch7: kernel-612_runtime_fix.patch
# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: x86_64
@@ -53,6 +55,8 @@ tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch -P3 -p1 -d kernel/
%patch -P4 -p1 -d kernel/
%patch -P5 -p1 -d kernel/
+%patch -P6 -p1 -d kernel/
+%patch -P7 -p1
for kernel_version in %{?kernel_versions} ; do
cp -a kernel _kmod_build_${kernel_version%%___*}
@@ -84,6 +88,9 @@ done
%{?akmod_install}
%changelog
+* Fri Dec 13 2024 Leigh Scott <leigh123linux(a)gmail.com> - 3:470.256.02-5
+- Add patches to fix kernel-6.12 build and runtime issues
+
* Sun Nov 10 2024 Sérgio Basto <sergio(a)serjux.com> - 3:470.256.02-4
- Update Debian patches
3 weeks, 4 days
[nvidia-xconfig/f40: 3/3] Merge branch 'master' into f40
by Leigh Scott
commit a4c2b4540dc0b643a3c0416d467325eb61087b8d
Merge: deb46f2 c4e7aab
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Dec 13 12:11:57 2024 +0000
Merge branch 'master' into f40
nvidia-xconfig.spec | 8 +++++++-
sources | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
---
3 weeks, 4 days
[nvidia-settings/f40: 3/3] Merge branch 'master' into f40
by Leigh Scott
commit 7b84831cb69d67dbc83242e0abcd9fa2d81d2aaf
Merge: 28960ea f0e6188
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Dec 13 12:11:03 2024 +0000
Merge branch 'master' into f40
nvidia-settings.spec | 8 +++++++-
sources | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
---
3 weeks, 4 days
[nvidia-persistenced/f40: 3/3] Merge branch 'master' into f40
by Leigh Scott
commit 83fb6204815c95a55cb9469825f99568a6230cca
Merge: 6769b13 c85987d
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Dec 13 12:09:13 2024 +0000
Merge branch 'master' into f40
nvidia-persistenced.spec | 8 +++++++-
sources | 2 +-
2 files changed, 8 insertions(+), 2 deletions(-)
---
3 weeks, 4 days
[nvidia-open-kmod/f40: 6/6] Merge branch 'master' into f40
by Leigh Scott
commit 7ba0c834a94897f85beaa9cfaf8586e302836b5c
Merge: 34d61a9 ab1d976
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Fri Dec 13 12:08:34 2024 +0000
Merge branch 'master' into f40
kernel-611-framebuffer.patch | 111 -------------------------------------------
linker_fix.patch | 20 ++++++++
make_modeset_default.patch | 2 +-
nvidia-open-kmod.spec | 15 ++++--
sources | 2 +-
5 files changed, 34 insertions(+), 116 deletions(-)
---
3 weeks, 4 days
[nvidia-open-kmod/f40] (6 commits) ...Merge branch 'master' into f40
by Leigh Scott
Summary of changes:
0a3fe83... Switch to make_build and un-hardcode CC (*)
c596dca... Update to 565.57.01 beta (*)
9acf3da... add source (*)
f4e99d3... Fix linker issue (*)
ab1d976... Update to 565.77 release (*)
7ba0c83... Merge branch 'master' into f40
(*) This commit already existed in another branch; no separate mail sent
3 weeks, 4 days