[packages/xorg-driver-video-nvidia-legacy-390xx] fix build with kernel 6.12
atler
atler at pld-linux.org
Fri Dec 6 01:52:42 CET 2024
commit d3c484c5b88231022930fd7da1d9cf997d0a2e0c
Author: Jan Palus <jpalus at fastmail.com>
Date: Thu Dec 5 23:54:42 2024 +0100
fix build with kernel 6.12
kernel-6.12.patch | 70 ++++++++++++++++++++++++++++++
xorg-driver-video-nvidia-legacy-390xx.spec | 2 +
2 files changed, 72 insertions(+)
---
diff --git a/xorg-driver-video-nvidia-legacy-390xx.spec b/xorg-driver-video-nvidia-legacy-390xx.spec
index a24b2e1..08bdf23 100644
--- a/xorg-driver-video-nvidia-legacy-390xx.spec
+++ b/xorg-driver-video-nvidia-legacy-390xx.spec
@@ -62,6 +62,7 @@ Patch9: kernel-6.6-backport-drm_gem_prime_handle_to_fd-changes-from-470.patch
Patch10: kernel-6.8.patch
Patch11: kernel-6.10.patch
Patch12: gcc14.patch
+Patch13: kernel-6.12.patch
URL: https://www.nvidia.com/en-us/drivers/unix/
BuildRequires: rpm-build >= 4.6
BuildRequires: rpmbuild(macros) >= 1.752
@@ -342,6 +343,7 @@ rm -rf NVIDIA-Linux-x86*-%{version}*
%patch10 -p1
%patch11 -p1
%patch12 -p1
+%patch13 -p1
echo 'EXTRA_CFLAGS += -Wno-int-conversion' >> kernel/Kbuild
%build
diff --git a/kernel-6.12.patch b/kernel-6.12.patch
new file mode 100644
index 0000000..c0f854b
--- /dev/null
+++ b/kernel-6.12.patch
@@ -0,0 +1,70 @@
+diff -ur NVIDIA-Linux-x86_64-390.157-no-compat32.orig/kernel/conftest.sh NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/conftest.sh
+--- NVIDIA-Linux-x86_64-390.157-no-compat32.orig/kernel/conftest.sh 2024-12-05 23:20:04.800852987 +0100
++++ NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/conftest.sh 2024-12-05 23:36:51.609889959 +0100
+@@ -4559,6 +4559,29 @@
+
+ compile_check_conftest "$CODE" "NV_VM_AREA_STRUCT_HAS_CONST_VM_FLAGS" "" "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"
++ ;;
+ esac
+ }
+
+diff -ur NVIDIA-Linux-x86_64-390.157-no-compat32.orig/kernel/nvidia-drm/nvidia-drm-drv.c NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-drm/nvidia-drm-drv.c
+--- NVIDIA-Linux-x86_64-390.157-no-compat32.orig/kernel/nvidia-drm/nvidia-drm-drv.c 2024-12-05 23:20:04.797519615 +0100
++++ NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-drm/nvidia-drm-drv.c 2024-12-05 23:40:32.633126670 +0100
+@@ -88,6 +88,7 @@
+
+ #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 @@
+ 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 @@
+ .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 -ur NVIDIA-Linux-x86_64-390.157-no-compat32.orig/kernel/nvidia-drm/nvidia-drm.Kbuild NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-drm/nvidia-drm.Kbuild
+--- NVIDIA-Linux-x86_64-390.157-no-compat32.orig/kernel/nvidia-drm/nvidia-drm.Kbuild 2024-12-05 23:20:04.797519615 +0100
++++ NVIDIA-Linux-x86_64-390.157-no-compat32/kernel/nvidia-drm/nvidia-drm.Kbuild 2024-12-05 23:38:43.896530083 +0100
+@@ -107,3 +107,4 @@
+ NV_CONFTEST_TYPE_COMPILE_TESTS += dma_resv_add_fence
+ NV_CONFTEST_TYPE_COMPILE_TESTS += dma_resv_reserve_fences
+ NV_CONFTEST_TYPE_COMPILE_TESTS += reservation_object_reserve_shared_has_num_fences_arg
++NV_CONFTEST_TYPE_COMPILE_TESTS += drm_output_poll_changed
================================================================
---- gitweb:
http://git.pld-linux.org/gitweb.cgi/packages/xorg-driver-video-nvidia-legacy-390xx.git/commitdiff/d3c484c5b88231022930fd7da1d9cf997d0a2e0c
More information about the pld-cvs-commit
mailing list