git: 9fa263c21fb2 - main - x11-drivers/xf86-video-nv: Update to 2.1.22

From: Tijl Coosemans <tijl_at_FreeBSD.org>
Date: Sun, 16 Apr 2023 08:34:40 UTC
The branch main has been updated by tijl:

URL: https://cgit.FreeBSD.org/ports/commit/?id=9fa263c21fb287ab1edc085498d8ecb36b494614

commit 9fa263c21fb287ab1edc085498d8ecb36b494614
Author:     Tijl Coosemans <tijl@FreeBSD.org>
AuthorDate: 2023-04-15 15:31:17 +0000
Commit:     Tijl Coosemans <tijl@FreeBSD.org>
CommitDate: 2023-04-16 08:34:17 +0000

    x11-drivers/xf86-video-nv: Update to 2.1.22
    
    Also fix regression from df10dcefa427 [1]
    
    PR:             270869, 270509 [1]
    Approved by:    x11 (manu)
---
 x11-drivers/xf86-video-nv/Makefile                    |  5 ++---
 x11-drivers/xf86-video-nv/distinfo                    |  6 +++---
 x11-drivers/xf86-video-nv/files/patch-src-nv_driver.c | 19 ++++++++++++++++++-
 x11-drivers/xf86-video-nv/files/patch-src_riva__xaa.c | 14 --------------
 4 files changed, 23 insertions(+), 21 deletions(-)

diff --git a/x11-drivers/xf86-video-nv/Makefile b/x11-drivers/xf86-video-nv/Makefile
index cca4ae0547ff..416ef212a414 100644
--- a/x11-drivers/xf86-video-nv/Makefile
+++ b/x11-drivers/xf86-video-nv/Makefile
@@ -1,12 +1,11 @@
 PORTNAME=	xf86-video-nv
-PORTVERSION=	2.1.21
-PORTREVISION=	5
+PORTVERSION=	2.1.22
 CATEGORIES=	x11-drivers
 
 MAINTAINER=	x11@FreeBSD.org
 COMMENT=	X.Org nv display driver
 WWW=		https://www.x.org/
 
-USES=		xorg-cat:driver
+USES=		tar:xz xorg-cat:driver
 
 .include <bsd.port.mk>
diff --git a/x11-drivers/xf86-video-nv/distinfo b/x11-drivers/xf86-video-nv/distinfo
index 5bb804dd4d62..87ee797de56c 100644
--- a/x11-drivers/xf86-video-nv/distinfo
+++ b/x11-drivers/xf86-video-nv/distinfo
@@ -1,3 +1,3 @@
-TIMESTAMP = 1484715801
-SHA256 (xorg/driver/xf86-video-nv-2.1.21.tar.bz2) = 1f98649e6ff0e8214b9d5dcac661f1d004be8e73823d8247b9c7025fd81db32d
-SIZE (xorg/driver/xf86-video-nv-2.1.21.tar.bz2) = 424091
+TIMESTAMP = 1681571410
+SHA256 (xorg/driver/xf86-video-nv-2.1.22.tar.xz) = 6218932db5c389878d853b11b8fbb667c321b65276f55aa6842a56fb1a30d288
+SIZE (xorg/driver/xf86-video-nv-2.1.22.tar.xz) = 354708
diff --git a/x11-drivers/xf86-video-nv/files/patch-src-nv_driver.c b/x11-drivers/xf86-video-nv/files/patch-src-nv_driver.c
index 6715bf67b3c5..c0155d99bb5a 100644
--- a/x11-drivers/xf86-video-nv/files/patch-src-nv_driver.c
+++ b/x11-drivers/xf86-video-nv/files/patch-src-nv_driver.c
@@ -1,6 +1,23 @@
 --- src/nv_driver.c.orig	2017-01-17 22:41:33 UTC
 +++ src/nv_driver.c
-@@ -1543,7 +1543,11 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
+@@ -911,6 +911,8 @@ NVPciProbe(DriverPtr drv, int entity, struct pci_devic
+                       NVGetPCIXpressChip(dev) : dev->vendor_id << 16 | dev->device_id;
+     const char *name = xf86TokenToString(NVKnownChipsets, id);
+ 
++#ifndef __FreeBSD__
++    /* FreeBSD always has vgapci driver attached.  */
+     if (pci_device_has_kernel_driver(dev)) {
+         xf86DrvMsg(0, X_ERROR,
+                    NV_NAME ": The PCI device 0x%x (%s) at %2.2d@%2.2d:%2.2d:%1.1d has a kernel module claiming it.\n",
+@@ -919,6 +921,7 @@ NVPciProbe(DriverPtr drv, int entity, struct pci_devic
+                    NV_NAME ": This driver cannot operate until it has been unloaded.\n");
+         return FALSE;
+     }
++#endif
+ 
+     if(dev->vendor_id == PCI_VENDOR_NVIDIA && !name &&
+        !NVIsSupported(id) && !NVIsG80(id)) {
+@@ -1543,7 +1546,11 @@ NVPreInit(ScrnInfoPtr pScrn, int flags)
  	xf86FreeInt10(pNv->pInt);
  	return FALSE;
      }
diff --git a/x11-drivers/xf86-video-nv/files/patch-src_riva__xaa.c b/x11-drivers/xf86-video-nv/files/patch-src_riva__xaa.c
deleted file mode 100644
index 9430febbe30c..000000000000
--- a/x11-drivers/xf86-video-nv/files/patch-src_riva__xaa.c
+++ /dev/null
@@ -1,14 +0,0 @@
-# ifdef away this XAA function call as done above
-#
---- src/riva_xaa.c.orig	2013-02-07 07:56:01 UTC
-+++ src/riva_xaa.c
-@@ -91,7 +91,9 @@ RivaSetRopPattern(RivaPtr pRiva, int rop
-     if (pRiva->currentRop != (rop + 16)) {
-         pRiva->currentRop = rop + 16; /* +16 is important */
-         RIVA_FIFO_FREE(pRiva->riva, Rop, 1);
-+#ifdef HAVE_XAA_H
-         pRiva->riva.Rop->Rop3 = XAAGetPatternROP(rop);
-+#endif
-     }
- }
- #ifdef HAVE_XAA_H