5.11 patch not needed on 460.39 anymore (#28)
* not needed on 460.39 anymore * add 5.11 patch for older drivers * fix nesting * 5.11 vkdev
This commit is contained in:
18
PKGBUILD
18
PKGBUILD
@@ -230,6 +230,7 @@ source=($_source_name
|
||||
'5.9-gpl.diff' # 5.9 cuda/nvenc workaround
|
||||
'kernel-5.10.patch' # 5.10 workaround
|
||||
'kernel-5.11.patch' # 5.11 workaround
|
||||
'5.11-legacy.diff' # 5.11 additional workaround (<460.32.03)
|
||||
'455-crashfix.diff' # 455 drivers fix - https://forums.developer.nvidia.com/t/455-23-04-page-allocation-failure-in-kernel-module-at-random-points/155250/79
|
||||
)
|
||||
|
||||
@@ -261,7 +262,8 @@ md5sums=("$_md5sum"
|
||||
'888d12b9aea711e6a025835b8ad063e2'
|
||||
'0758046ed7c50463fd0ec378e9e34f95'
|
||||
'bcdd512edad1bad8331a8872259d2581'
|
||||
'50c676a110fad2e0faa4c4e4b8488a66'
|
||||
'fd0d6e14e675a61f32279558678cfc36'
|
||||
'8764cc714e61363cc8f818315957ad17'
|
||||
'08bec554de265ce5fdcfdbd55fb608fc')
|
||||
|
||||
if [ "$_autoaddpatch" = "true" ]; then
|
||||
@@ -528,7 +530,13 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
|
||||
# 5.11
|
||||
if (( $(vercmp "$_kernel" "5.11") >= 0 )); then
|
||||
_kernel511="1"
|
||||
_whitelist511=( 460* )
|
||||
_whitelist511=( 455.50* 460.27* 460.32* )
|
||||
if [[ $pkgver = 455.50* ]] || [[ $pkgver = 460.27* ]]; then
|
||||
cd "$srcdir"/"$_pkg"/kernel-$_kernel
|
||||
msg2 "Applying 5.11-legacy.diff for $_kernel..."
|
||||
patch -Np2 -i "$srcdir"/5.11-legacy.diff
|
||||
cd ..
|
||||
fi
|
||||
fi
|
||||
|
||||
# Loop patches (linux-4.15.patch, lol.patch, ...)
|
||||
@@ -835,10 +843,14 @@ DEST_MODULE_LOCATION[3]="/kernel/drivers/video"' dkms.conf
|
||||
done
|
||||
if [ "$patchy" = "1" ]; then
|
||||
msg2 "Applying kernel-5.11.patch for dkms..."
|
||||
patch -Np1 -i "$srcdir"/kernel-5.11.patch
|
||||
patch -Np1 -i "$srcdir"/kernel-5.11.patch
|
||||
else
|
||||
msg2 "Skipping kernel-5.11.patch as it doesn't apply to this driver version..."
|
||||
fi
|
||||
if [[ $pkgver = 455.50* ]] || [[ $pkgver = 460.27* ]]; then
|
||||
msg2 "Applying 5.11-legacy.diff for $_kernel..."
|
||||
patch -Np1 -i "$srcdir"/5.11-legacy.diff
|
||||
fi
|
||||
fi
|
||||
|
||||
# 5.9 - 5.10 quirk
|
||||
|
14
patches/5.11-legacy.diff
Normal file
14
patches/5.11-legacy.diff
Normal file
@@ -0,0 +1,14 @@
|
||||
diff --git a/kernel-dkms/common/inc/nv-linux.h b/kernel-dkms/common/inc/nv-linux.h
|
||||
index db9706d..3ee157e 100644
|
||||
--- a/kernel-dkms/common/inc/nv-linux.h
|
||||
+++ b/kernel-dkms/common/inc/nv-linux.h
|
||||
@@ -117,7 +117,9 @@
|
||||
|
||||
#include <linux/moduleparam.h> /* module_param() */
|
||||
#include <asm/tlbflush.h> /* flush_tlb(), flush_tlb_all() */
|
||||
+#if defined(NV_ASM_KMAP_TYPES_H_PRESENT)
|
||||
#include <asm/kmap_types.h> /* page table entry lookup */
|
||||
+#endif
|
||||
|
||||
#include <linux/pci.h> /* pci_find_class, etc */
|
||||
#include <linux/interrupt.h> /* tasklets, interrupt helpers */
|
@@ -334,10 +334,7 @@ diff --git a/kernel-dkms/nvidia/nvidia.Kbuild b/kernel-dkms/nvidia/nvidia.Kbuild
|
||||
index 90579de..c6f3614 100644
|
||||
--- a/kernel-dkms/nvidia/nvidia.Kbuild
|
||||
+++ b/kernel-dkms/nvidia/nvidia.Kbuild
|
||||
@@ -172,6 +172,7 @@ NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_tegra_dce_client_ip
|
||||
NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_dram_clk_to_mc_clk
|
||||
NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_get_dram_num_channels
|
||||
NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_tegra_dram_types
|
||||
@@ -172,3 +172,4 @@
|
||||
+NV_CONFTEST_SYMBOL_COMPILE_TESTS += is_export_symbol_present_close_fd
|
||||
|
||||
NV_CONFTEST_TYPE_COMPILE_TESTS += acpi_op_remove
|
||||
|
Reference in New Issue
Block a user