From b6d89731d542582d2cc751e7a56b78df76a38ce7 Mon Sep 17 00:00:00 2001 From: Emmanuel Vadot Date: Thu, 30 Mar 2023 10:05:52 +0200 Subject: [PATCH] x11-drivers/xf86-video-vesa: Add patch for ignoring if kernel as a driver The vesa driver checks if the kernel as a driver attached to the pci device. This used to work before df10dcefa427 ("devel/libpciaccess: Update to 0.17") because we had a patch in libpciaccess that always said that the kernel didn't had any driver attached. This is obviously not a correct way. The problem is that vgapci is always attached for us so for pci video devices we always have a driver attached. Ignoring the check in xf86-video-vesa seems the best way for us. PR: 270509 Sponsored by: Beckhoff Automation GmbH & Co. KG --- x11-drivers/xf86-video-vesa/Makefile | 2 +- .../xf86-video-vesa/files/patch-src_vesa.c | 15 +++++++++++++++ 2 files changed, 16 insertions(+), 1 deletion(-) create mode 100644 x11-drivers/xf86-video-vesa/files/patch-src_vesa.c diff --git a/x11-drivers/xf86-video-vesa/Makefile b/x11-drivers/xf86-video-vesa/Makefile index eed980de9624..94cdbdab9a68 100644 --- a/x11-drivers/xf86-video-vesa/Makefile +++ b/x11-drivers/xf86-video-vesa/Makefile @@ -1,6 +1,6 @@ PORTNAME= xf86-video-vesa PORTVERSION= 2.5.0 -PORTREVISION= 1 +PORTREVISION= 2 CATEGORIES= x11-drivers MAINTAINER= x11@FreeBSD.org diff --git a/x11-drivers/xf86-video-vesa/files/patch-src_vesa.c b/x11-drivers/xf86-video-vesa/files/patch-src_vesa.c new file mode 100644 index 000000000000..440cb0520e80 --- /dev/null +++ b/x11-drivers/xf86-video-vesa/files/patch-src_vesa.c @@ -0,0 +1,15 @@ +--- src/vesa.c.orig 2023-03-30 07:58:49 UTC ++++ src/vesa.c +@@ -464,10 +464,12 @@ VESAPciProbe(DriverPtr drv, int entity_num, struct pci + if (pScrn != NULL) { + VESAPtr pVesa; + ++#ifndef __FreeBSD__ + if (pci_device_has_kernel_driver(dev)) { + ErrorF("vesa: Ignoring device with a bound kernel driver\n"); + return FALSE; + } ++#endif + + pVesa = VESAGetRec(pScrn); + VESAInitScrn(pScrn);