[nvidia-kmod] Use make_build macro
by Nicolas Chauvet
commit 1a2698569a7e28ce85b34848889ee20f71e9ae40
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Aug 20 08:34:58 2024 +0200
Use make_build macro
nvidia-kmod.spec | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
---
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index 2fdceea..b4759da 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -68,7 +68,7 @@ export NV_EXCLUDE_KERNEL_MODULES="${NV_EXCLUDE_KERNEL_MODULES} nvidia_modeset "
for kernel_version in %{?kernel_versions}; do
pushd _kmod_build_${kernel_version%%___*}/
- make V=1 %{?_smp_mflags} \
+ %make_build \
KERNEL_UNAME="${kernel_version%%___*}" SYSSRC="${kernel_version##*___}" \
IGNORE_CC_MISMATCH=1 IGNORE_XEN_PRESENCE=1 IGNORE_PREEMPT_RT_PRESENCE=1 \
module
3 months, 1 week
[nvidia-kmod] Outdated comment
by Nicolas Chauvet
commit a70f2d7394cc5e340ebd6d82dd329387de3aad88
Author: Nicolas Chauvet <kwizart(a)gmail.com>
Date: Tue Aug 20 08:29:40 2024 +0200
Outdated comment
nvidia-kmod.spec | 1 -
1 file changed, 1 deletion(-)
---
diff --git a/nvidia-kmod.spec b/nvidia-kmod.spec
index 7407c8b..2fdceea 100644
--- a/nvidia-kmod.spec
+++ b/nvidia-kmod.spec
@@ -21,7 +21,6 @@ Source11: nvidia-kmodtool-excludekernel-filterfile
Patch0: make_modeset_default.patch
Patch1: kernel-611-framebuffer.patch
-# needed for plague to make sure it builds for i586 and i686
ExclusiveArch: x86_64 aarch64
# get the needed BuildRequires (in parts depending on what we build for)
3 months, 1 week
[nvidia-open-kmod] Enable nvidia fbdev
by Leigh Scott
commit ed787186ec6a31652f31bcfe96d5982ceeb9d197
Author: Leigh Scott <leigh123linux(a)gmail.com>
Date: Mon Aug 19 18:11:25 2024 +0100
Enable nvidia fbdev
kernel-611-framebuffer.patch | 111 +++++++++++++++++++++++++++++++++++++++++++
make_modeset_default.patch | 26 ++++++----
nvidia-open-kmod.spec | 8 +++-
3 files changed, 135 insertions(+), 10 deletions(-)
---
diff --git a/kernel-611-framebuffer.patch b/kernel-611-framebuffer.patch
new file mode 100644
index 0000000..281e1cf
--- /dev/null
+++ b/kernel-611-framebuffer.patch
@@ -0,0 +1,111 @@
+From 08ff2fc141df99bb279ce872bb390dff22633a8f Mon Sep 17 00:00:00 2001
+From: Leigh Scott <leigh123linux(a)gmail.com>
+Date: Sat, 17 Aug 2024 17:59:50 +0100
+Subject: [PATCH] Fix 6.11 drm_fbdev_generic.h rename to drm_fbdev_ttm.h
+
+---
+ kernel-open/conftest.sh | 19 +++++++++++++++++++
+ kernel-open/header-presence-tests.mk | 1 +
+ kernel-open/nvidia-drm/nvidia-drm-drv.c | 8 ++++++++
+ .../nvidia-drm/nvidia-drm-os-interface.h | 5 ++++-
+ kernel-open/nvidia-drm/nvidia-drm-sources.mk | 1 +
+ 5 files changed, 33 insertions(+), 1 deletion(-)
+
+diff --git a/kernel-open/conftest.sh b/kernel-open/conftest.sh
+index 1226cea2b..4398e435f 100755
+--- a/kernel-open/conftest.sh
++++ b/kernel-open/conftest.sh
+@@ -6610,6 +6610,25 @@ compile_test() {
+ 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 --git a/kernel-open/header-presence-tests.mk b/kernel-open/header-presence-tests.mk
+index e8d2e02b3..40204ae48 100644
+--- a/kernel-open/header-presence-tests.mk
++++ b/kernel-open/header-presence-tests.mk
+@@ -15,6 +15,7 @@ NV_HEADER_PRESENCE_TESTS = \
+ 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 --git a/kernel-open/nvidia-drm/nvidia-drm-drv.c b/kernel-open/nvidia-drm/nvidia-drm-drv.c
+index 359ff0c47..c80d2d76c 100644
+--- a/kernel-open/nvidia-drm/nvidia-drm-drv.c
++++ b/kernel-open/nvidia-drm/nvidia-drm-drv.c
+@@ -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>
+
+@@ -1851,7 +1855,11 @@ void nv_drm_register_drm_device(const nv_gpu_info_t *gpu_info)
+ 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 --git a/kernel-open/nvidia-drm/nvidia-drm-os-interface.h b/kernel-open/nvidia-drm/nvidia-drm-os-interface.h
+index 6f8cfea91..55ea8a2f9 100644
+--- a/kernel-open/nvidia-drm/nvidia-drm-os-interface.h
++++ b/kernel-open/nvidia-drm/nvidia-drm-os-interface.h
+@@ -58,8 +58,11 @@ typedef struct nv_timer nv_drm_timer;
+ #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 --git a/kernel-open/nvidia-drm/nvidia-drm-sources.mk b/kernel-open/nvidia-drm/nvidia-drm-sources.mk
+index 7ef0c5b8f..247096b70 100644
+--- a/kernel-open/nvidia-drm/nvidia-drm-sources.mk
++++ b/kernel-open/nvidia-drm/nvidia-drm-sources.mk
+@@ -67,6 +67,7 @@ NV_CONFTEST_FUNCTION_COMPILE_TESTS += fence_set_error
+ 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/make_modeset_default.patch b/make_modeset_default.patch
index 08904d8..bdf8a6b 100644
--- a/make_modeset_default.patch
+++ b/make_modeset_default.patch
@@ -1,7 +1,6 @@
-diff -uNrp a/kernel-open/nvidia-drm/nvidia-drm-linux.c b/kernel-open/nvidia-drm/nvidia-drm-linux.c
---- a/kernel-open/nvidia-drm/nvidia-drm-linux.c 2024-04-25 15:24:58.000000000 +0100
-+++ b/kernel-open/nvidia-drm/nvidia-drm-linux.c 2024-05-11 13:57:02.979853843 +0100
-@@ -31,7 +31,7 @@
+--- a/kernel-open/nvidia-drm/nvidia-drm-linux.c
++++ b/kernel-open/nvidia-drm/nvidia-drm-linux.c
+@@ -31,13 +31,13 @@
MODULE_PARM_DESC(
modeset,
@@ -10,15 +9,24 @@ diff -uNrp a/kernel-open/nvidia-drm/nvidia-drm-linux.c b/kernel-open/nvidia-drm/
module_param_named(modeset, nv_drm_modeset_module_param, bool, 0400);
#if defined(NV_DRM_FBDEV_GENERIC_AVAILABLE)
-diff -uNrp a/kernel-open/nvidia-drm/nvidia-drm-os-interface.c b/kernel-open/nvidia-drm/nvidia-drm-os-interface.c
---- a/kernel-open/nvidia-drm/nvidia-drm-os-interface.c 2024-04-25 15:24:58.000000000 +0100
-+++ b/kernel-open/nvidia-drm/nvidia-drm-os-interface.c 2024-05-11 13:58:02.537871953 +0100
-@@ -41,7 +41,7 @@
+ MODULE_PARM_DESC(
+ fbdev,
+- "Create a framebuffer device (1 = enable, 0 = disable (default)) (EXPERIMENTAL)");
++ "Create a framebuffer device (1 = enable (default), 0 = disable) (EXPERIMENTAL)");
+ module_param_named(fbdev, nv_drm_fbdev_module_param, bool, 0400);
+ #endif
+
+--- a/kernel-open/nvidia-drm/nvidia-drm-os-interface.c
++++ b/kernel-open/nvidia-drm/nvidia-drm-os-interface.c
+@@ -41,8 +41,8 @@
#include <drm/drmP.h>
#endif
-bool nv_drm_modeset_module_param = false;
+-bool nv_drm_fbdev_module_param = false;
+bool nv_drm_modeset_module_param = true;
- bool nv_drm_fbdev_module_param = false;
++bool nv_drm_fbdev_module_param = true;
void *nv_drm_calloc(size_t nmemb, size_t size)
+ {
+
diff --git a/nvidia-open-kmod.spec b/nvidia-open-kmod.spec
index c8a5c94..37863ee 100644
--- a/nvidia-open-kmod.spec
+++ b/nvidia-open-kmod.spec
@@ -12,7 +12,7 @@ Name: nvidia-open-kmod
Epoch: 3
Version: 560.31.02
# Taken over by kmodtool
-Release: 1%{?dist}
+Release: 2%{?dist}
Summary: NVIDIA open display driver kernel module
License: GPLv2 and MIT
URL: https://github.com/NVIDIA/open-gpu-kernel-modules
@@ -20,6 +20,7 @@ URL: https://github.com/NVIDIA/open-gpu-kernel-modules
Source0: %{url}/archive/%{version}/open-gpu-kernel-modules-%{version}.tar.gz
Source11: nvidia-open-kmodtool-excludekernel-filterfile
Patch0: make_modeset_default.patch
+Patch1: %{url}/pull/692.patch#/kernel-611-framebuffer.patch
ExclusiveArch: x86_64 aarch64
@@ -47,6 +48,7 @@ echo "Using original nvidia defaults"
echo "Set nvidia to fbdev=1 modeset=1"
%patch 0 -p1 -d open-gpu-kernel-modules-%{version}
%endif
+%patch 1 -p1 -d open-gpu-kernel-modules-%{version}
for kernel_version in %{?kernel_versions} ; do
cp -a open-gpu-kernel-modules-%{version} _kmod_build_${kernel_version%%___*}
@@ -81,6 +83,10 @@ done
%changelog
+* Mon Aug 19 2024 Leigh Scott <leigh123linux(a)gmail.com> - 3:560.31.02-2
+- Enable nvidia fbdev
+- Fix nvidia framebuffer with 6.11rc
+
* Tue Aug 06 2024 Leigh Scott <leigh123linux(a)gmail.com> - 3:560.31.02-1
- Update to 560.31.02 beta
3 months, 1 week
[nvidia-390xx-kmod/f39] (10 commits) ...Update Release number and changelog in SPEC file
by Nicolas Viéville
Summary of changes:
d09be99... Fix patches Hunk offset (*)
0742ac7... Try to fix errors and warnings for Fedora 40 and gcc14 - RF (*)
97b7f32... SPEC file clean-up (*)
d36d6ef... Add CVE warning in SPEC file description (*)
8aac772... Update and fix for Fedora 40 and gcc14 Update Release numbe (*)
a903b67... - Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass (*)
bdf4c71... Add patch for kernel >= 6.10 - RFBZ#7022 (*)
0908afb... Fix warning: suggest braces around empty body in an ‘if� (*)
af64907... Fix warning: old style declaration (*)
aa760dd... Update Release number and changelog in SPEC file (*)
(*) This commit already existed in another branch; no separate mail sent
3 months, 1 week
[nvidia-390xx-kmod/f41] (4 commits) ...Update Release number and changelog in SPEC file
by Nicolas Viéville
Summary of changes:
bdf4c71... Add patch for kernel >= 6.10 - RFBZ#7022 (*)
0908afb... Fix warning: suggest braces around empty body in an ‘if� (*)
af64907... Fix warning: old style declaration (*)
aa760dd... Update Release number and changelog in SPEC file (*)
(*) This commit already existed in another branch; no separate mail sent
3 months, 1 week
[nvidia-390xx-kmod] Update Release number and changelog in SPEC file
by Nicolas Viéville
commit aa760dd07aafe89ec9ed4c9378604f4e4569955e
Author: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
Date: Mon Aug 19 16:10:15 2024 +0200
Update Release number and changelog in SPEC file
Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
nvidia-390xx-kmod.spec | 7 ++++++-
1 file changed, 6 insertions(+), 1 deletion(-)
---
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index de0f5c5..0a8463b 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -18,7 +18,7 @@ Name: nvidia-390xx-kmod
Epoch: 3
Version: 390.157
# Taken over by kmodtool
-Release: 10%{?dist}
+Release: 11%{?dist}
Summary: NVIDIA 390xx display driver kernel module
Group: System Environment/Kernel
License: Redistributable, no modification permitted
@@ -260,6 +260,11 @@ done
%changelog
+* Mon Aug 19 2024 Nicolas Viéville <nicolas.vieville(a)uphf.fr> - 3:390.157-11
+- Add patch for kernel >= 6.10 - RFBZ#7022
+- Fix warning: suggest braces around empty body in an ‘if’ statement
+- Fix warning: old style declaration
+
* Sat Aug 03 2024 RPM Fusion Release Engineering <sergiomb(a)rpmfusion.org> - 3:390.157-10
- Rebuilt for https://fedoraproject.org/wiki/Fedora_41_Mass_Rebuild
3 months, 1 week
[nvidia-390xx-kmod] Fix warning: old style declaration
by Nicolas Viéville
commit af64907a58099f1875f7e4d420e20bf0b6f363dd
Author: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
Date: Mon Aug 19 16:04:19 2024 +0200
Fix warning: old style declaration
Signed-off-by: Nicolas Viéville <nicolas.vieville(a)uphf.fr>
...d-0091-fix_warning_old_style_declaration_.patch | 35 ++++++++++++++++++++++
nvidia-390xx-kmod.spec | 2 ++
2 files changed, 37 insertions(+)
---
diff --git a/nvidia-390xx-kmod-0091-fix_warning_old_style_declaration_.patch b/nvidia-390xx-kmod-0091-fix_warning_old_style_declaration_.patch
new file mode 100644
index 0000000..0fbd615
--- /dev/null
+++ b/nvidia-390xx-kmod-0091-fix_warning_old_style_declaration_.patch
@@ -0,0 +1,35 @@
+diff --git a/kernel/nvidia-uvm/uvm8_pascal_mmu.c b/kernel/nvidia-uvm/uvm8_pascal_mmu.c
+index 5719fa4..85a1018 100644
+--- a/kernel/nvidia-uvm/uvm8_pascal_mmu.c
++++ b/kernel/nvidia-uvm/uvm8_pascal_mmu.c
+@@ -169,7 +169,7 @@ static NvLength entry_size_pascal(NvU32 depth)
+
+ static NvU32 index_bits_pascal(NvU32 depth, NvU32 page_size)
+ {
+- const static NvU32 bit_widths[] = {2, 9, 9, 8};
++ static const NvU32 bit_widths[] = {2, 9, 9, 8};
+ // some code paths keep on querying this until they get a 0, meaning only the page offset remains.
+ UVM_ASSERT(depth < 5);
+ if (depth < 4) {
+diff --git a/kernel/nvidia/nv-mmap.c b/kernel/nvidia/nv-mmap.c
+index 392a5e4..1888985 100644
+--- a/kernel/nvidia/nv-mmap.c
++++ b/kernel/nvidia/nv-mmap.c
+@@ -271,7 +271,7 @@ int nv_encode_caching(
+ return 0;
+ }
+
+-int static nvidia_mmap_peer_io(
++static int nvidia_mmap_peer_io(
+ struct vm_area_struct *vma,
+ nv_alloc_t *at,
+ NvU64 page_index,
+@@ -292,7 +292,7 @@ int static nvidia_mmap_peer_io(
+ return ret;
+ }
+
+-int static nvidia_mmap_sysmem(
++static int nvidia_mmap_sysmem(
+ struct vm_area_struct *vma,
+ nv_alloc_t *at,
+ NvU64 page_index,
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index b4f218e..de0f5c5 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -104,6 +104,7 @@ Patch153: nvidia-390xx-kmod-0087-undef-NV_DRM_REINIT_PRIMARY_MODE_GROUP_PRESENT-
Patch154: nvidia-390xx-kmod-0088-undef-NV_DRM_ATOMIC_HELPER_CONNECTOR_DPMS_PRESENT-in-conftest_sh.patch
Patch155: nvidia-390xx-kmod-0089-kernel-6.10-removed-follow_pfn-function.patch
Patch156: nvidia-390xx-kmod-0090-fix_warning_suggested_braces_around_empty_body_in_if.patch
+Patch157: nvidia-390xx-kmod-0091-fix_warning_old_style_declaration_.patch
# build system updates
Patch30: use-kbuild-compiler.patch
@@ -223,6 +224,7 @@ tar --use-compress-program xz -xf %{_datadir}/%{name}-%{version}/%{name}-%{versi
%patch -P 155 -p1 -b 155
%patch -P 156 -p1 -b 156
+%patch -P 157 -p1 -b 157
%ifarch armv7hl
%patch -P 40 -p1 -b 40 -d kernel
3 months, 1 week