commit ed6ee731d40ec120a45385ec4c92f7b33983bad3
Author: Henrik Nordström <henrik(a)hno.se>
Date: Sun Jun 27 17:06:57 2021 +0200
Import kernel 5.13 patch from Herecura Arch repo
kernel-5.13.patch | 502 +++++++++++++++++++++++++++++++++++++++++++++++++
nvidia-390xx-kmod.spec | 6 +-
2 files changed, 507 insertions(+), 1 deletion(-)
---
diff --git a/kernel-5.13.patch b/kernel-5.13.patch
new file mode 100644
index 0000000..4d05069
--- /dev/null
+++ b/kernel-5.13.patch
@@ -0,0 +1,502 @@
+From bb74e1ca4ad590db8eddeb71042a396903efa4d2 Mon Sep 17 00:00:00 2001
+From: BlackEagle <ike.devolder(a)gmail.com>
+Date: Fri, 25 Jun 2021 09:29:30 +0200
+Subject: [PATCH] kernel-5.13
+
+Signed-off-by: BlackEagle <ike.devolder(a)gmail.com>
+---
+ kernel/conftest.sh | 43 ++++++++++++++++++-
+ kernel/nvidia-drm/nvidia-drm-connector.c | 1 +
+ kernel/nvidia-drm/nvidia-drm-crtc.c | 25 ++++++++++-
+ kernel/nvidia-drm/nvidia-drm-crtc.h | 8 +++-
+ kernel/nvidia-drm/nvidia-drm-drv.c | 7 +++
+ kernel/nvidia-drm/nvidia-drm-encoder.c | 6 +++
+ kernel/nvidia-drm/nvidia-drm-fb.c | 1 +
+ .../nvidia-drm/nvidia-drm-gem-nvkms-memory.h | 5 ++-
+ .../nvidia-drm/nvidia-drm-gem-user-memory.c | 26 +++++++++++
+ kernel/nvidia-drm/nvidia-drm-gem.c | 27 +++++++++++-
+ kernel/nvidia-drm/nvidia-drm-gem.h | 23 ++++++++--
+ 11 files changed, 161 insertions(+), 11 deletions(-)
+
+diff --git a/kernel/conftest.sh b/kernel/conftest.sh
+index a656901..1bead23 100755
+--- a/kernel/conftest.sh
++++ b/kernel/conftest.sh
+@@ -1729,20 +1729,31 @@ compile_test() {
+ # Determine if the DRM subsystem is usable
+ #
+ CODE="
++ #include <linux/version.h>
+ #if defined(NV_DRM_DRMP_H_PRESENT)
+ #include <drm/drmP.h>
++ #else
++ #include <drm/drm_drv.h>
++ #include <drm/drm_prime.h>
+ #endif
+
+ #if defined(NV_DRM_DRM_DRV_H_PRESENT)
+ #include <drm/drm_drv.h>
+ #endif
+
++ #if defined(NV_DRM_DRM_GEM_H_PRESENT)
++ #include <drm/drm_gem.h>
++ #endif
++
++ #if defined(NV_DRM_DRM_PRIME_H_PRESENT)
++ #include <drm/drm_prime.h>
++ #endif
++
+ #if !defined(CONFIG_DRM) && !defined(CONFIG_DRM_MODULE)
+ #error DRM not enabled
+ #endif
+
+ void conftest_drm_available(void) {
+- struct drm_driver drv;
+
+ /* 2013-10-02 1bb72532ac260a2d3982b40bdd4c936d779d0d16 */
+ (void)drm_dev_alloc;
+@@ -1752,6 +1763,24 @@ compile_test() {
+
+ /* 2013-10-02 c3a49737ef7db0bdd4fcf6cf0b7140a883e32b2a */
+ (void)drm_dev_unregister;
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
++ // Avoid failure due to all the changes in torvalds/linux commit
d693def4fd1c23f1ca5aed1afb9993b3a2069ad2
++ struct drm_driver drv;
++ drv.gem_prime_pin = 0;
++ drv.gem_prime_get_sg_table = 0;
++ drv.gem_prime_vmap = 0;
++ drv.gem_prime_vunmap = 0;
++#else
++ struct drm_gem_object_funcs gem;
++ gem.pin = 0;
++ gem.get_sg_table = 0;
++ gem.vmap = 0;
++ gem.vunmap = 0;
++#endif
++ (void)drm_gem_prime_import;
++ (void)drm_gem_prime_export;
++
++
+ }"
+
+ compile_check_conftest "$CODE" "NV_DRM_AVAILABLE"
"" "generic"
+@@ -1764,6 +1793,8 @@ compile_test() {
+ CODE="
+ #if defined(NV_DRM_DRMP_H_PRESENT)
+ #include <drm/drmP.h>
++ #else
++ #include <drm/drm_drv.h>
+ #endif
+ void conftest_drm_dev_unref(void) {
+ /*
+@@ -2545,6 +2576,8 @@ compile_test() {
+ CODE="
+ #if defined(NV_DRM_DRMP_H_PRESENT)
+ #include <drm/drmP.h>
++ #else
++ #include <drm/drm_crtc.h>
+ #endif
+
+ #if defined(NV_DRM_DRM_CRTC_H_PRESENT)
+@@ -2567,6 +2600,8 @@ compile_test() {
+ CODE="
+ #if defined(NV_DRM_DRMP_H_PRESENT)
+ #include <drm/drmP.h>
++ #else
++ #include <drm/drm_encoder.h>
+ #endif
+
+ #if defined(NV_DRM_DRM_ENCODER_H_PRESENT)
+@@ -2588,6 +2623,8 @@ compile_test() {
+ echo "$CONFTEST_PREAMBLE
+ #if defined(NV_DRM_DRMP_H_PRESENT)
+ #include <drm/drmP.h>
++ #else
++ #include <drm/drm_plane.h>
+ #endif
+
+ #if defined(NV_DRM_DRM_PLANE_H_PRESENT)
+@@ -2621,6 +2658,8 @@ compile_test() {
+ echo "$CONFTEST_PREAMBLE
+ #if defined(NV_DRM_DRMP_H_PRESENT)
+ #include <drm/drmP.h>
++ #else
++ #include <drm/drm_plane.h>
+ #endif
+
+ #if defined(NV_DRM_DRM_PLANE_H_PRESENT)
+@@ -2898,6 +2937,7 @@ compile_test() {
+ #
+ echo "$CONFTEST_PREAMBLE
+ #include <drm/drm_crtc_helper.h>
++ #include <drm/drm_probe_helper.h>
+ void drm_helper_mode_fill_fb_struct(struct drm_device *dev,
+ struct drm_framebuffer *fb,
+ const struct drm_mode_fb_cmd2
*mode_cmd)
+@@ -2924,6 +2964,7 @@ compile_test() {
+ #
+ echo "$CONFTEST_PREAMBLE
+ #include <drm/drm_crtc_helper.h>
++ #include <drm/drm_probe_helper.h>
+ void drm_helper_mode_fill_fb_struct(struct drm_framebuffer *fb,
+ const struct drm_mode_fb_cmd2
*mode_cmd)
+ {
+diff --git a/kernel/nvidia-drm/nvidia-drm-connector.c
b/kernel/nvidia-drm/nvidia-drm-connector.c
+index 54167a7..df67241 100644
+--- a/kernel/nvidia-drm/nvidia-drm-connector.c
++++ b/kernel/nvidia-drm/nvidia-drm-connector.c
+@@ -39,6 +39,7 @@
+ #include <drm/drm_probe_helper.h>
+ #endif
+ #include <drm/drm_crtc_helper.h>
++#include <drm/drm_probe_helper.h>
+
+ #include <drm/drm_atomic.h>
+ #include <drm/drm_atomic_helper.h>
+diff --git a/kernel/nvidia-drm/nvidia-drm-crtc.c b/kernel/nvidia-drm/nvidia-drm-crtc.c
+index 8abd1f3..be93995 100644
+--- a/kernel/nvidia-drm/nvidia-drm-crtc.c
++++ b/kernel/nvidia-drm/nvidia-drm-crtc.c
+@@ -19,7 +19,7 @@
+ * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
+ * DEALINGS IN THE SOFTWARE.
+ */
+-
++#include <linux/version.h>
+ #include "nvidia-drm-conftest.h" /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
+
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+@@ -34,6 +34,7 @@
+ #include "nvidia-drm-ioctl.h"
+
+ #include <drm/drm_crtc_helper.h>
++#include <drm/drm_probe_helper.h>
+ #include <drm/drm_plane_helper.h>
+
+ #include <drm/drm_atomic.h>
+@@ -130,9 +131,19 @@ plane_req_config_update(struct drm_plane_state *plane_state,
+ old_config.dstHeight != req_config->config.dstHeight;
+ }
+
++// Rel commit "drm/atomic: Pass the full state to planes atomic_check" (Maxime
Ripard, Feb 19 2021)
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0))
+ static int nv_drm_plane_atomic_check(struct drm_plane *plane,
+ struct drm_plane_state *plane_state)
++#else
++static int nv_drm_plane_atomic_check(struct drm_plane *plane,
++ struct drm_atomic_state *state)
++#endif
+ {
++// Rel commit "drm/atomic: Pass the full state to planes atomic_check" (Maxime
Ripard, Feb 19 2021)
++#if (LINUX_VERSION_CODE >= KERNEL_VERSION(5, 13, 0))
++ struct drm_plane_state *plane_state = drm_atomic_get_new_plane_state(state, plane);
++#endif
+ int i;
+ struct drm_crtc *crtc;
+ struct drm_crtc_state *crtc_state;
+@@ -165,13 +176,25 @@ done:
+ return 0;
+ }
+
++// Rel commit "drm/atomic: Pass the full state to planes atomic disable and
update" (Maxime Ripard, Feb 19 2021)
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0))
+ static void nv_drm_plane_atomic_update(struct drm_plane *plane,
+ struct drm_plane_state *old_state)
++#else
++static void nv_drm_plane_atomic_update(struct drm_plane *plane,
++ struct drm_atomic_state *state)
++#endif
+ {
+ }
+
++// Rel commit "drm/atomic: Pass the full state to planes atomic disable and
update" (Maxime Ripard, Feb 19 2021)
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 13, 0))
+ static void nv_drm_plane_atomic_disable(struct drm_plane *plane,
+ struct drm_plane_state *old_state)
++#else
++static void nv_drm_plane_atomic_disable(struct drm_plane *plane,
++ struct drm_atomic_state *state)
++#endif
+ {
+ }
+
+diff --git a/kernel/nvidia-drm/nvidia-drm-crtc.h b/kernel/nvidia-drm/nvidia-drm-crtc.h
+index f54e34d..f4de8af 100644
+--- a/kernel/nvidia-drm/nvidia-drm-crtc.h
++++ b/kernel/nvidia-drm/nvidia-drm-crtc.h
+@@ -20,10 +20,14 @@
+ * DEALINGS IN THE SOFTWARE.
+ */
+
++#include <linux/version.h>
++#include "nvidia-drm-conftest.h"
++#include "nvidia-drm-priv.h"
++#include "linux/dma-buf.h"
++
+ #ifndef __NVIDIA_DRM_CRTC_H__
+ #define __NVIDIA_DRM_CRTC_H__
+
+-#include "nvidia-drm-conftest.h"
+
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+
+@@ -139,7 +143,7 @@ static inline
+ struct nv_drm_crtc *nv_drm_crtc_lookup(struct nv_drm_device *nv_dev, NvU32 head)
+ {
+ struct drm_crtc *crtc;
+- nv_drm_for_each_crtc(crtc, nv_dev->dev) {
++ drm_for_each_crtc(crtc, nv_dev->dev) {
+ struct nv_drm_crtc *nv_crtc = to_nv_crtc(crtc);
+
+ if (nv_crtc->head == head) {
+diff --git a/kernel/nvidia-drm/nvidia-drm-drv.c b/kernel/nvidia-drm/nvidia-drm-drv.c
+index 15cbf4d..bcb689f 100644
+--- a/kernel/nvidia-drm/nvidia-drm-drv.c
++++ b/kernel/nvidia-drm/nvidia-drm-drv.c
+@@ -786,6 +786,13 @@ static void nv_drm_update_drm_driver_features(void)
+ #endif /* NV_DRM_ATOMIC_MODESET_AVAILABLE */
+ }
+
++#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
+
+
+ /*
+diff --git a/kernel/nvidia-drm/nvidia-drm-encoder.c
b/kernel/nvidia-drm/nvidia-drm-encoder.c
+index e12d59b..0243e8b 100644
+--- a/kernel/nvidia-drm/nvidia-drm-encoder.c
++++ b/kernel/nvidia-drm/nvidia-drm-encoder.c
+@@ -31,6 +31,12 @@
+ #include "nvidia-drm-crtc.h"
+ #include "nvidia-drm-helper.h"
+
++#include <drm/drm_crtc_helper.h>
++#include <drm/drm_probe_helper.h>
++
++#include <drm/drm_atomic.h>
++#include <drm/drm_atomic_helper.h>
++
+ /*
+ * Commit fcd70cd36b9b ("drm: Split out drm_probe_helper.h")
+ * moves a number of helper function definitions from
+diff --git a/kernel/nvidia-drm/nvidia-drm-fb.c b/kernel/nvidia-drm/nvidia-drm-fb.c
+index 725164a..d07ba8b 100644
+--- a/kernel/nvidia-drm/nvidia-drm-fb.c
++++ b/kernel/nvidia-drm/nvidia-drm-fb.c
+@@ -31,6 +31,7 @@
+ #include "nvidia-drm-gem.h"
+
+ #include <drm/drm_crtc_helper.h>
++#include <drm/drm_probe_helper.h>
+
+ static void nv_drm_framebuffer_destroy(struct drm_framebuffer *fb)
+ {
+diff --git a/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.h
b/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.h
+index 2d9d1a1..9065d2f 100644
+--- a/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.h
++++ b/kernel/nvidia-drm/nvidia-drm-gem-nvkms-memory.h
+@@ -20,15 +20,16 @@
+ * DEALINGS IN THE SOFTWARE.
+ */
+
++#define NV_DRM_AVAILABLE
+ #ifndef __NVIDIA_DRM_GEM_NVKMS_MEMORY_H__
+ #define __NVIDIA_DRM_GEM_NVKMS_MEMORY_H__
+
+ #include "nvidia-drm-conftest.h"
++#include "nvidia-drm-gem.h"
++#include "nvidia-drm-priv.h"
+
+ #if defined(NV_DRM_ATOMIC_MODESET_AVAILABLE)
+
+-#include "nvidia-drm-gem.h"
+-
+ struct nv_drm_gem_nvkms_memory {
+ struct nv_drm_gem_object base;
+
+diff --git a/kernel/nvidia-drm/nvidia-drm-gem-user-memory.c
b/kernel/nvidia-drm/nvidia-drm-gem-user-memory.c
+index 4ac4559..28ef84c 100644
+--- a/kernel/nvidia-drm/nvidia-drm-gem-user-memory.c
++++ b/kernel/nvidia-drm/nvidia-drm-gem-user-memory.c
+@@ -20,6 +20,7 @@
+ * DEALINGS IN THE SOFTWARE.
+ */
+
++#include <linux/version.h>
+ #include "nvidia-drm-conftest.h"
+
+ #if defined(NV_DRM_AVAILABLE)
+@@ -32,6 +33,8 @@
+ #include "nvidia-drm-helper.h"
+ #include "nvidia-drm-ioctl.h"
+
++#include "linux/dma-buf.h"
++
+ static inline
+ void __nv_drm_gem_user_memory_free(struct nv_drm_gem_object *nv_gem)
+ {
+@@ -54,6 +57,7 @@ static struct sg_table *__nv_drm_gem_user_memory_prime_get_sg_table(
+ nv_user_memory->pages_count);
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
+ static void *__nv_drm_gem_user_memory_prime_vmap(
+ struct nv_drm_gem_object *nv_gem)
+ {
+@@ -69,6 +73,28 @@ static void __nv_drm_gem_user_memory_prime_vunmap(
+ {
+ nv_drm_vunmap(address);
+ }
++#else
++// Updated vmap/vunmap operations to use struct dma_buf_map instead of raw pointers
++// See torvalds/linux commits ccc22d41bd9acec58cdc7c3b012e1887aba40af4,
6619ccf1bb1d0ebb071f758111efa83918b216fc
++static int __nv_drm_gem_user_memory_prime_vmap(
++ struct nv_drm_gem_object *nv_gem,
++ struct dma_buf_map *map)
++{
++ struct nv_drm_gem_user_memory *nv_user_memory = to_nv_user_memory(nv_gem);
++
++ map->vaddr = nv_drm_vmap(nv_user_memory->pages,
++ nv_user_memory->pages_count);
++ map->is_iomem = false;
++ return 0;
++}
++
++static void __nv_drm_gem_user_memory_prime_vunmap(
++ struct nv_drm_gem_object *gem,
++ struct dma_buf_map *map)
++{
++ nv_drm_vunmap(map->vaddr);
++}
++#endif
+
+ static struct nv_drm_gem_object_funcs __nv_gem_user_memory_ops = {
+ .free = __nv_drm_gem_user_memory_free,
+diff --git a/kernel/nvidia-drm/nvidia-drm-gem.c b/kernel/nvidia-drm/nvidia-drm-gem.c
+index 7c92445..0edafbf 100644
+--- a/kernel/nvidia-drm/nvidia-drm-gem.c
++++ b/kernel/nvidia-drm/nvidia-drm-gem.c
+@@ -20,6 +20,7 @@
+ * DEALINGS IN THE SOFTWARE.
+ */
+
++#include <linux/version.h>
+ #include "nvidia-drm-conftest.h"
+
+ #if defined(NV_DRM_AVAILABLE)
+@@ -56,7 +57,7 @@ void nv_drm_gem_free(struct drm_gem_object *gem)
+ static int nv_drm_gem_vmap(struct drm_gem_object *gem,
+ struct dma_buf_map *map)
+ {
+- map->vaddr = nv_drm_gem_prime_vmap(gem);
++ map->vaddr = nv_drm_gem_prime_vmap(gem, map);
+ if (map->vaddr == NULL) {
+ return -ENOMEM;
+ }
+@@ -161,6 +162,7 @@ struct sg_table *nv_drm_gem_prime_get_sg_table(struct drm_gem_object
*gem)
+ return ERR_PTR(-ENOTSUPP);
+ }
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
+ void *nv_drm_gem_prime_vmap(struct drm_gem_object *gem)
+ {
+ struct nv_drm_gem_object *nv_gem = to_nv_gem_object(gem);
+@@ -180,6 +182,29 @@ void nv_drm_gem_prime_vunmap(struct drm_gem_object *gem, void
*address)
+ nv_gem->ops->prime_vunmap(nv_gem, address);
+ }
+ }
++#else
++// Updated vmap/vunmap operations to use struct dma_buf_map instead of raw pointers
++// See torvalds/linux commits ccc22d41bd9acec58cdc7c3b012e1887aba40af4,
6619ccf1bb1d0ebb071f758111efa83918b216fc
++int nv_drm_gem_prime_vmap(struct drm_gem_object *gem, struct dma_buf_map *map)
++{
++ struct nv_drm_gem_object *nv_gem = to_nv_gem_object(gem);
++
++ if (nv_gem->ops->prime_vmap != NULL) {
++ return nv_gem->ops->prime_vmap(nv_gem, map);
++ }
++
++ return -ENOTSUPP;
++}
++
++void nv_drm_gem_prime_vunmap(struct drm_gem_object *gem, struct dma_buf_map *map)
++{
++ struct nv_drm_gem_object *nv_gem = to_nv_gem_object(gem);
++
++ if (nv_gem->ops->prime_vunmap != NULL) {
++ nv_gem->ops->prime_vunmap(nv_gem, map);
++ }
++}
++#endif
+
+ #if defined(NV_DRM_DRIVER_HAS_GEM_PRIME_RES_OBJ)
+ nv_dma_resv_t* nv_drm_gem_prime_res_obj(struct drm_gem_object *obj)
+diff --git a/kernel/nvidia-drm/nvidia-drm-gem.h b/kernel/nvidia-drm/nvidia-drm-gem.h
+index fd64b2d..e7ac38e 100644
+--- a/kernel/nvidia-drm/nvidia-drm-gem.h
++++ b/kernel/nvidia-drm/nvidia-drm-gem.h
+@@ -20,13 +20,15 @@
+ * DEALINGS IN THE SOFTWARE.
+ */
+
++#include <linux/version.h>
++#include "linux/dma-buf.h"
++#include "drm/drm_gem.h"
++
+ #ifndef __NVIDIA_DRM_GEM_H__
+ #define __NVIDIA_DRM_GEM_H__
+
+ #include "nvidia-drm-conftest.h"
+
+-#if defined(NV_DRM_AVAILABLE)
+-
+ #include "nvidia-drm-priv.h"
+
+ #if defined(NV_DRM_DRMP_H_PRESENT)
+@@ -49,8 +51,15 @@ struct nv_drm_gem_object;
+ struct nv_drm_gem_object_funcs {
+ void (*free)(struct nv_drm_gem_object *nv_gem);
+ struct sg_table *(*prime_get_sg_table)(struct nv_drm_gem_object *nv_gem);
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
+ void *(*prime_vmap)(struct nv_drm_gem_object *nv_gem);
+ void (*prime_vunmap)(struct nv_drm_gem_object *nv_gem, void *address);
++#else
++ // Updated vmap/vunmap operations to use struct dma_buf_map instead of raw pointers
++ // See torvalds/linux commits ccc22d41bd9acec58cdc7c3b012e1887aba40af4,
6619ccf1bb1d0ebb071f758111efa83918b216fc
++ int (*prime_vmap)(struct nv_drm_gem_object *nv_gem, struct dma_buf_map *map);
++ void (*prime_vunmap)(struct nv_drm_gem_object *nv_gem, struct dma_buf_map *map);
++#endif
+ };
+
+ struct nv_drm_gem_object {
+@@ -185,14 +194,20 @@ void nv_drm_gem_object_init(struct nv_drm_device *nv_dev,
+
+ struct sg_table *nv_drm_gem_prime_get_sg_table(struct drm_gem_object *gem);
+
++#if (LINUX_VERSION_CODE < KERNEL_VERSION(5, 11, 0))
+ void *nv_drm_gem_prime_vmap(struct drm_gem_object *gem);
+
+ void nv_drm_gem_prime_vunmap(struct drm_gem_object *gem, void *address);
++#else
++// Updated vmap/vunmap operations to use struct dma_buf_map instead of raw pointers
++// See torvalds/linux commits ccc22d41bd9acec58cdc7c3b012e1887aba40af4,
6619ccf1bb1d0ebb071f758111efa83918b216fc
++int nv_drm_gem_prime_vmap(struct drm_gem_object *gem, struct dma_buf_map *map);
++
++void nv_drm_gem_prime_vunmap(struct drm_gem_object *gem, struct dma_buf_map *map);
++#endif
+
+ #if defined(NV_DRM_DRIVER_HAS_GEM_PRIME_RES_OBJ)
+ nv_dma_resv_t* nv_drm_gem_prime_res_obj(struct drm_gem_object *obj);
+ #endif
+
+-#endif /* NV_DRM_AVAILABLE */
+-
+ #endif /* __NVIDIA_DRM_GEM_H__ */
+--
+2.32.0
+
diff --git a/nvidia-390xx-kmod.spec b/nvidia-390xx-kmod.spec
index fb64ece..a3909b7 100644
--- a/nvidia-390xx-kmod.spec
+++ b/nvidia-390xx-kmod.spec
@@ -23,10 +23,12 @@ Source11: nvidia-390xx-kmodtool-excludekernel-filterfile
# Patches partially sourced from
# Debian
https://salsa.debian.org/nvidia-team/nvidia-graphics-drivers/-/tree/390xx...
# Arch
https://aur.archlinux.org/packages/nvidia-390xx-dkms/
+#
https://gitlab.com/herecura/packages/nvidia-390xx-dkms/
# kernel support
Patch10: do-div-cast.patch
Patch11: kernel-5.12.patch
+Patch12:
https://gitlab.com/herecura/packages/nvidia-390xx-dkms/-/raw/herecura/ker...
# build system updates
Patch30: use-kbuild-compiler.patch
@@ -68,6 +70,7 @@ tar --use-compress-program xz -xf
%{_datadir}/%{name}-%{version}/%{name}-%{versi
# Apply patches
%patch10 -p1 -d kernel
%patch11 -p2 -d kernel
+%patch12 -p2 -d kernel
%patch30 -p1 -d kernel
%patch31 -p1 -d kernel
%patch32 -p1 -d kernel
@@ -104,7 +107,8 @@ done
%changelog
* Sun Jun 27 2021 Henrik Nordstrom <henrik(a)henriknordstrom.net> - 390.143-2
-- Kernel 5.12 patch taken from OpenSuSE via Arch
+- Kernel 5.12 patch taken from OpenSuSE via Arch repo
+- Kernel 5.13 patch taken from Herecura Arch repo
* Tue Apr 20 2021 Henrik Nordstrom <henrik(a)henriknordstrom.net> - 390.143-1
- Update to 390.143