Commit 89349c7b authored by Helmut Stult's avatar Helmut Stult
Browse files

[pkg-upd] 460.56-0.1

parent c7cf418f
##############################
# Not working with Kernel 5.12
##############################
# Maintainer: Philip Müller <philm[at]manjaro[dot]org>
# Maintainer: Bernhard Landauer <bernhard[at]manjaro[dot]org>
# Maintainer: Helmut Stult <helmut[at]manjaro[dot]org>
# Contributor: Joan Bruguera <joanbrugueram@gmail.com> (kernel-5.11.patch)
# Contributor: Joan Bruguera <joanbrugueram@gmail.com> (kernel-5.12.patch)
# Arch credits:
# Maintainer : Thomas Baechler <thomas@archlinux.org>
......@@ -39,8 +35,10 @@ license=('custom')
install=nvidia.install
options=(!strip)
durl="https://us.download.nvidia.com/XFree86/Linux-x86"
source=("${durl}_64/${_pkgver}/NVIDIA-Linux-x86_64-${_pkgver}-no-compat32.run")
sha256sums=('6aa33772f6777dfaecf3142d7e01da9689a7206254e81ddbebf3ce6067c214a2')
source=("${durl}_64/${_pkgver}/NVIDIA-Linux-x86_64-${_pkgver}-no-compat32.run"
"kernel-5.12.patch")
sha256sums=('6aa33772f6777dfaecf3142d7e01da9689a7206254e81ddbebf3ce6067c214a2'
'9e752d261a90444d4a639d8de5c776d84d35eb0fa58839eefc6fedacc77e7cc8')
_pkg="NVIDIA-Linux-x86_64-${_pkgver}-no-compat32"
......@@ -51,6 +49,11 @@ pkgver() {
prepare() {
sh "${_pkg}.run" --extract-only
cd "${_pkg}/kernel"
msg2 "cd ${_pkg}"
# patches here
# Fix compile problem with 5.12
msg2 "PATCH: kernel-5.12.patch"
patch -p1 -i "$srcdir"/kernel-5.12.patch
}
build() {
......
From a2963d47c009bcbdc98907f70717d9d49425f6db Mon Sep 17 00:00:00 2001
From: Joan Bruguera <joanbrugueram@gmail.com>
Date: Mon, 1 Mar 2021 17:25:15 +0100
Subject: [PATCH] Tentative fix for NVIDIA 460.56 driver for Linux 5.12-rc1
---
nvidia-drm/nvidia-drm-drv.c | 12 ++++++++++++
1 file changed, 12 insertions(+)
diff --git a/nvidia-drm/nvidia-drm-drv.c b/nvidia-drm/nvidia-drm-drv.c
index 9582531..c23a338 100644
--- a/nvidia-drm/nvidia-drm-drv.c
+++ b/nvidia-drm/nvidia-drm-drv.c
@@ -20,6 +20,7 @@
* DEALINGS IN THE SOFTWARE.
*/
+#include <linux/version.h>
#include "nvidia-drm-conftest.h" /* NV_DRM_AVAILABLE and NV_DRM_DRM_GEM_H_PRESENT */
#include "nvidia-drm-priv.h"
@@ -796,6 +797,13 @@ static struct drm_driver nv_drm_driver = {
#endif
};
+#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 12, 0))
+// Reimport trivial forwarder function deleted in commit "drm: Don't export the drm_gem_dumb_destroy() function" (file drivers/gpu/drm/drm_gem.c)
+static int nv_drm_gem_dumb_destroy(struct drm_file *file, struct drm_device *dev, u32 handle)
+{
+ return drm_gem_handle_delete(file, handle);
+}
+#endif
/*
* Update the global nv_drm_driver for the intended features.
@@ -819,7 +827,11 @@ static void nv_drm_update_drm_driver_features(void)
nv_drm_driver.dumb_create = nv_drm_dumb_create;
nv_drm_driver.dumb_map_offset = nv_drm_dumb_map_offset;
+#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 12, 0))
nv_drm_driver.dumb_destroy = drm_gem_dumb_destroy;
+#else
+ nv_drm_driver.dumb_destroy = nv_drm_gem_dumb_destroy;
+#endif
#endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
}
--
2.30.1
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment