diff --git a/.SRCINFO b/.SRCINFO index 960e16d..a8b05a6 100644 --- a/.SRCINFO +++ b/.SRCINFO @@ -1,7 +1,7 @@ pkgbase = nvidia-340xx pkgdesc = NVIDIA drivers for linux, 340xx legacy branch pkgver = 340.108 - pkgrel = 22 + pkgrel = 23 url = https://www.nvidia.com/ arch = x86_64 license = custom @@ -17,6 +17,7 @@ pkgbase = nvidia-340xx source = 0003-kernel-5.9.patch source = 0004-kernel-5.10.patch source = 0005-kernel-5.11.patch + source = 0006-kernel-5.14.patch b2sums = 6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028 b2sums = a0266d62a742f8ecd96be767b66af169c09428ba3f718efa1e36f2c69303e35b6437503381b041dd3a88fa86eb82909f8cbf209dbba4a5658fd7bb220a852000 b2sums = 7150233df867a55f57aa5e798b9c7618329d98459fecc35c4acfad2e9772236cb229703c4fa072381c509279d0588173d65f46297231f4d3bfc65a1ef52e65b1 @@ -24,6 +25,7 @@ pkgbase = nvidia-340xx b2sums = 947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1 b2sums = 665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f b2sums = 344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35 + b2sums = c722d07c29bc976c3bdf0c45bf4ad0196e3e3a8d1d39b33b66e26510374968f04a338156870f6f87ea6dda82b8ef2bb8630533ba2732e02cc482f6b9b02856a2 pkgname = nvidia-340xx pkgdesc = NVIDIA drivers for linux, 340xx legacy branch diff --git a/0006-kernel-5.14.patch b/0006-kernel-5.14.patch new file mode 100644 index 0000000..5f61096 --- /dev/null +++ b/0006-kernel-5.14.patch @@ -0,0 +1,103 @@ +--- a/kernel/os-interface.c ++++ b/kernel/os-interface.c +@@ -549,7 +549,11 @@ + // the requested timeout has expired, loop until less + // than a jiffie of the desired delay remains. + // ++#if LINUX_VERSION_CODE >= KERNEL_VERSION(5, 14, 0) ++ current->__state = TASK_INTERRUPTIBLE; ++#else + current->state = TASK_INTERRUPTIBLE; ++#endif + do + { + schedule_timeout(jiffies); +--- a/kernel/nv-drm.c ++++ b/kernel/nv-drm.c +@@ -57,10 +57,13 @@ + #if defined(NV_DRM_GET_PCI_DEV_PRESENT) + #define nv_drm_get_pci_dev drm_get_pci_dev + #else ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) + #include ++#endif + + #include "linux/dma-buf.h" + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) + struct nv_drm_agp_head { + struct agp_kern_info agp_info; + struct list_head memory; +@@ -177,6 +180,7 @@ + dev->agp = NULL; + } + } ++#endif + + static int nv_drm_get_pci_dev(struct pci_dev *pdev, + const struct pci_device_id *ent, +@@ -195,7 +199,9 @@ + if (ret) + goto err_free; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) + dev->pdev = pdev; ++#endif + #ifdef __alpha__ + dev->hose = pdev->sysdata; + #endif +@@ -203,11 +209,13 @@ + if (drm_core_check_feature(dev, DRIVER_MODESET)) + pci_set_drvdata(pdev, dev); + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) + nv_drm_pci_agp_init(dev); + + ret = drm_dev_register(dev, ent->driver_data); + if (ret) + goto err_agp; ++#endif + + /* No locking needed since shadow-attach is single-threaded since it may + * only be called from the per-driver module init hook. */ +@@ -218,9 +226,11 @@ + + return 0; + ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) + err_agp: + nv_drm_pci_agp_destroy(dev); + pci_disable_device(pdev); ++#endif + err_free: + drm_dev_put(dev); + return ret; +@@ -306,11 +316,13 @@ + + for (nvl = nv_linux_devices; nvl != NULL; nvl = nvl->next) + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) + if (nvl->dev == dev->pdev) + { + nvl->drm = dev; + return 0; + } ++#endif + } + + return -ENODEV; +@@ -330,12 +342,14 @@ + + for (nvl = nv_linux_devices; nvl != NULL; nvl = nvl->next) + { ++#if LINUX_VERSION_CODE < KERNEL_VERSION(5, 14, 0) + if (nvl->dev == dev->pdev) + { + BUG_ON(nvl->drm != dev); + nvl->drm = NULL; + return 0; + } ++#endif + } + + return -ENODEV; diff --git a/PKGBUILD b/PKGBUILD index 7fd8c1e..4fc2325 100644 --- a/PKGBUILD +++ b/PKGBUILD @@ -6,7 +6,7 @@ pkgbase=nvidia-340xx pkgname=(nvidia-340xx nvidia-340xx-dkms); [ -n "$NVIDIA_340XX_DKMS_ONLY" ] && pkgname=(nvidia-340xx-dkms) pkgver=340.108 -pkgrel=22 +pkgrel=23 pkgdesc="NVIDIA drivers for linux, 340xx legacy branch" arch=('x86_64') url="https://www.nvidia.com/" @@ -22,6 +22,7 @@ source=("https://us.download.nvidia.com/XFree86/Linux-x86_64/${pkgver}/NVIDIA-Li 0003-kernel-5.9.patch 0004-kernel-5.10.patch 0005-kernel-5.11.patch + 0006-kernel-5.14.patch ) b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb21396cfd89ebc54c32f921ea17e3e47eaa95abcbc24ecbd144fb89028' 'a0266d62a742f8ecd96be767b66af169c09428ba3f718efa1e36f2c69303e35b6437503381b041dd3a88fa86eb82909f8cbf209dbba4a5658fd7bb220a852000' @@ -29,7 +30,8 @@ b2sums=('6538bbec53b10f8d20977f9b462052625742e9709ef06e24cf2e55de5d0c55f1620a4bb 'b436095b89d6e294995651a3680ff18b5af5e91582c3f1ec9b7b63be9282497f54f9bf9be3997a5af30eec9b8548f25ec5235d969ac00a667a9cddece63d8896' '947cb1f149b2db9c3c4f973f285d389790f73fc8c8a6865fc5b78d6a782f49513aa565de5c82a81c07515f1164e0e222d26c8212a14cf016e387bcc523e3fcb1' '665bf0e1fa22119592e7c75ff40f265e919955f228a3e3e3ebd76e9dffa5226bece5eb032922eb2c009572b31b28e80cd89656f5d0a4ad592277edd98967e68f' - '344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35') + '344cd3a9888a9a61941906c198d3a480ce230119c96c72c72a74b711d23face2a7b1e53b9b4639465809b84762cdc53f38210e740318866705241bc4216e4f35' + 'c722d07c29bc976c3bdf0c45bf4ad0196e3e3a8d1d39b33b66e26510374968f04a338156870f6f87ea6dda82b8ef2bb8630533ba2732e02cc482f6b9b02856a2') _pkg="NVIDIA-Linux-x86_64-${pkgver}-no-compat32" # default is 'linux' substitute custom name here