git: 29ca44b9b5b8 - main - x11-drivers/xf86-video-ast: Fix pci access after df10dcefa427

From: Emmanuel Vadot <manu_at_FreeBSD.org>
Date: Thu, 01 Aug 2024 13:35:05 UTC
The branch main has been updated by manu:

URL: https://cgit.FreeBSD.org/ports/commit/?id=29ca44b9b5b8893d4a80b3053fa40756303668b2

commit 29ca44b9b5b8893d4a80b3053fa40756303668b2
Author:     Emmanuel Vadot <manu@FreeBSD.org>
AuthorDate: 2024-08-01 13:32:52 +0000
Commit:     Emmanuel Vadot <manu@FreeBSD.org>
CommitDate: 2024-08-01 13:34:26 +0000

    x11-drivers/xf86-video-ast: Fix pci access after df10dcefa427
    
    Sponsored by:   Beckhoff Automation GmbH & Co. KG
    PR:             270509
---
 x11-drivers/xf86-video-ast/Makefile                   |  2 +-
 .../xf86-video-ast/files/patch-src_ast__driver.c      | 19 +++++++++++++++++++
 2 files changed, 20 insertions(+), 1 deletion(-)

diff --git a/x11-drivers/xf86-video-ast/Makefile b/x11-drivers/xf86-video-ast/Makefile
index 82ed3865bc7f..b9bfc30f72ee 100644
--- a/x11-drivers/xf86-video-ast/Makefile
+++ b/x11-drivers/xf86-video-ast/Makefile
@@ -1,6 +1,6 @@
 PORTNAME=	xf86-video-ast
 PORTVERSION=	1.1.5
-PORTREVISION=	5
+PORTREVISION=	6
 CATEGORIES=	x11-drivers
 
 MAINTAINER=	x11@FreeBSD.org
diff --git a/x11-drivers/xf86-video-ast/files/patch-src_ast__driver.c b/x11-drivers/xf86-video-ast/files/patch-src_ast__driver.c
new file mode 100644
index 000000000000..172e8a4ed7a3
--- /dev/null
+++ b/x11-drivers/xf86-video-ast/files/patch-src_ast__driver.c
@@ -0,0 +1,19 @@
+--- src/ast_driver.c.orig	2024-08-01 13:20:24 UTC
++++ src/ast_driver.c
+@@ -273,6 +273,8 @@ ASTProbe(DriverPtr drv, int flags)
+ 
+ #ifdef XSERVER_LIBPCIACCESS
+             {
++#ifndef __FreeBSD__
++		/* FreeBSD always has vgapci driver attached.  */
+                 struct pci_device *pPci = xf86GetPciInfoForEntity(usedChips[i]);
+ 
+                 if (pci_device_has_kernel_driver(pPci)) {
+@@ -289,6 +291,7 @@ ASTProbe(DriverPtr drv, int flags)
+                     free(devSections);
+                     return FALSE;
+                 }
++#endif
+             }
+ #endif
+