diff options
author | Lenard Spencer <lenardrspencer@gmail.com> | 2022-07-02 09:10:27 +0700 |
---|---|---|
committer | Willy Sudiarto Raharjo <willysr@slackbuilds.org> | 2022-07-02 09:42:31 +0700 |
commit | 62239c6d1c89462ce4582c2c3a6b1500ffa73b39 (patch) | |
tree | b49e0628b366a0a009b02669f6559429888f31bc | |
parent | 25f4c45c24cd9bf9a3d45053213f58199cbbe0ba (diff) | |
download | slackbuilds-62239c6d1c89462ce4582c2c3a6b1500ffa73b39.tar.gz slackbuilds-62239c6d1c89462ce4582c2c3a6b1500ffa73b39.tar.xz |
system/nvidia-legacy470-kernel: Add patch for 5.19.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
-rw-r--r-- | system/nvidia-legacy470-kernel/nvidia-fix-linux-5.19.patch | 29 | ||||
-rw-r--r-- | system/nvidia-legacy470-kernel/nvidia-legacy470-kernel.SlackBuild | 14 |
2 files changed, 38 insertions, 5 deletions
diff --git a/system/nvidia-legacy470-kernel/nvidia-fix-linux-5.19.patch b/system/nvidia-legacy470-kernel/nvidia-fix-linux-5.19.patch new file mode 100644 index 0000000000..50f46efc2a --- /dev/null +++ b/system/nvidia-legacy470-kernel/nvidia-fix-linux-5.19.patch @@ -0,0 +1,29 @@ +From cc4acfadcd71ee07c8d1b29411620a79451780b9 Mon Sep 17 00:00:00 2001 +From: Joan Bruguera <joanbrugueram@gmail.com> +Date: Wed, 13 Apr 2022 21:21:13 +0200 +Subject: [PATCH] Buildfix NVIDIA 470.129.06 for Linux 5.19-rc1 + +--- + nvidia-drm/nvidia-dma-resv-helper.h | 9 +++++++++ + 1 file changed, 9 insertions(+) + +diff --git a/nvidia-drm/nvidia-dma-resv-helper.h b/nvidia-drm/nvidia-dma-resv-helper.h +index ad8800d..65ea1f8 100644 +--- a/nvidia-drm/nvidia-dma-resv-helper.h ++++ b/nvidia-drm/nvidia-dma-resv-helper.h +@@ -39,6 +39,15 @@ + #include <linux/reservation.h> + #endif + ++#include <linux/version.h> ++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 19, 0)) ++// Rel. commit "dma-buf: specify usage while adding fences to dma_resv obj v7" (Christian König, 9 Nov 2021) ++static inline void dma_resv_add_excl_fence(struct dma_resv *obj, struct dma_fence *fence) ++{ ++ dma_resv_add_fence(obj, fence, DMA_RESV_USAGE_WRITE); ++} ++#endif ++ + #include <nvidia-dma-fence-helper.h> + + #if defined(NV_LINUX_DMA_RESV_H_PRESENT) diff --git a/system/nvidia-legacy470-kernel/nvidia-legacy470-kernel.SlackBuild b/system/nvidia-legacy470-kernel/nvidia-legacy470-kernel.SlackBuild index c96cd1c329..568a57af4b 100644 --- a/system/nvidia-legacy470-kernel/nvidia-legacy470-kernel.SlackBuild +++ b/system/nvidia-legacy470-kernel/nvidia-legacy470-kernel.SlackBuild @@ -30,7 +30,7 @@ PRGNAM=nvidia-legacy470-kernel VERSION=${VERSION:-470.129.06} -BUILD=${BUILD:-1} +BUILD=${BUILD:-2} TAG=${TAG:-_SBo} PKGTYPE=${PKGTYPE:-tgz} @@ -60,12 +60,10 @@ fi # the name of the created package would be, and then exit. This information # could be useful to other scripts. if [ ! -z "${PRINT_PACKAGE_NAME}" ]; then - echo "$PRGNAM-$PKGVER-$TARGET-$BUILD$TAG.$PKGTYPE" + echo "$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE" exit 0 fi -unset ARCH - SRCNAM=NVIDIA-Linux-$TARGET-${VERSION} CWD=$(pwd) @@ -87,6 +85,12 @@ find -L . \ -o -perm 440 -o -perm 400 \) -exec chmod 644 {} \; (cd kernel || exit 1 + + unset arch + +# Patch for 5.19 kernel + patch -p1 < $CWD/nvidia-fix-linux-5.19.patch + # CC=${CC:-gcc} suppresses an otherwise harmless "compiler mismatch" # message. If you custom-build your kernel with clang, # then pass CC=clang to this script. @@ -110,4 +114,4 @@ cat $CWD/slack-desc > $PKG/install/slack-desc sed "s%@KERNEL@%$KERNEL%" $CWD/doinst.sh > $PKG/install/doinst.sh cd $PKG -/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVER-$TARGET-$BUILD$TAG.$PKGTYPE +/sbin/makepkg -l y -c n $OUTPUT/$PRGNAM-$PKGVER-$ARCH-$BUILD$TAG.$PKGTYPE |