git: 0a0e141da5b5 - main - graphics/nvidia-drm-515-kmod: Remove dependency on linuxkpi_gplv2.ko

From: Gleb Popov <arrowd_at_FreeBSD.org>
Date: Tue, 07 Nov 2023 08:35:27 UTC
The branch main has been updated by arrowd:

URL: https://cgit.FreeBSD.org/ports/commit/?id=0a0e141da5b584e00c498947e596b957bd40db94

commit 0a0e141da5b584e00c498947e596b957bd40db94
Author:     Austin Shafer <ashafer@badland.io>
AuthorDate: 2023-11-07 08:26:48 +0000
Commit:     Gleb Popov <arrowd@FreeBSD.org>
CommitDate: 2023-11-07 08:35:19 +0000

    graphics/nvidia-drm-515-kmod: Remove dependency on linuxkpi_gplv2.ko
    
    This fixes a failure on module load for nvidia-drm.ko as a result of
    linuxkpi_gplv2.ko being removed from drm-kmod in 5.15. For now we just
    remove the dependency in the nvidia-drm 515 port to unbreak things, I'll
    create a longer-term upstream fix.
    
    PR: 274910
    
    Reviewed by: arrowd
    
    Differential Revision: https://reviews.freebsd.org/D42484
---
 graphics/nvidia-drm-515-kmod/Makefile                          |  2 +-
 .../nvidia-drm-515-kmod/files/patch-nvidia-drm-freebsd-lkpi.c  | 10 ++++++++++
 2 files changed, 11 insertions(+), 1 deletion(-)

diff --git a/graphics/nvidia-drm-515-kmod/Makefile b/graphics/nvidia-drm-515-kmod/Makefile
index aa8adc6442b6..5d43afc9f2c4 100644
--- a/graphics/nvidia-drm-515-kmod/Makefile
+++ b/graphics/nvidia-drm-515-kmod/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	nvidia-drm-515-kmod
 PORTVERSION=	${NVIDIA_DISTVERSION}
-PORTREVISION=	1
+PORTREVISION=	2
 CATEGORIES=	graphics
 
 RUN_DEPENDS+=	${KMODDIR}/drm.ko:graphics/drm-515-kmod
diff --git a/graphics/nvidia-drm-515-kmod/files/patch-nvidia-drm-freebsd-lkpi.c b/graphics/nvidia-drm-515-kmod/files/patch-nvidia-drm-freebsd-lkpi.c
new file mode 100644
index 000000000000..5f707bd2f03d
--- /dev/null
+++ b/graphics/nvidia-drm-515-kmod/files/patch-nvidia-drm-freebsd-lkpi.c
@@ -0,0 +1,10 @@
+--- nvidia-drm-freebsd-lkpi.c.orig	2023-11-06 18:11:13 UTC
++++ nvidia-drm-freebsd-lkpi.c
+@@ -228,7 +228,6 @@ MODULE_DEPEND(nvidia_drm, linuxkpi, 1, 1, 1);
+ 
+ LKPI_DRIVER_MODULE(nvidia_drm, nv_drm_init, nv_drm_exit);
+ MODULE_DEPEND(nvidia_drm, linuxkpi, 1, 1, 1);
+-MODULE_DEPEND(nvidia_drm, linuxkpi_gplv2, 1, 1, 1);
+ MODULE_DEPEND(nvidia_drm, drmn, 2, 2, 2);
+ MODULE_DEPEND(nvidia_drm, dmabuf, 1, 1, 1);
+ MODULE_DEPEND(nvidia_drm, nvidia, 1, 1, 1);