Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Sign in
Toggle navigation
Menu
Open sidebar
Packages
Extra
linux512-extramodules
nvidia
Commits
89349c7b
Commit
89349c7b
authored
Mar 01, 2021
by
Helmut Stult
Browse files
[pkg-upd] 460.56-0.1
parent
c7cf418f
Changes
2
Hide whitespace changes
Inline
Side-by-side
PKGBUILD
View file @
89349c7b
##############################
# 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.1
1
.patch)
# Contributor: Joan Bruguera <joanbrugueram@gmail.com> (kernel-5.1
2
.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
()
{
...
...
kernel-5.12.patch
0 → 100644
View file @
89349c7b
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
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment