mirror of
https://git.freebsd.org/ports.git
synced 2025-04-28 01:26:39 -04:00
x11-drivers/xf86-video-mga: Restore port
This hardware is still present on server hardware. Sponsored by: Beckhoff Automation GmbH & Co. KG PR: 270509
This commit is contained in:
parent
e64e459742
commit
6e5bffcde1
8 changed files with 79 additions and 0 deletions
|
@ -16,6 +16,7 @@
|
||||||
SUBDIR += xf86-video-ati
|
SUBDIR += xf86-video-ati
|
||||||
SUBDIR += xf86-video-dummy
|
SUBDIR += xf86-video-dummy
|
||||||
SUBDIR += xf86-video-intel
|
SUBDIR += xf86-video-intel
|
||||||
|
SUBDIR += xf86-video-mga
|
||||||
SUBDIR += xf86-video-nv
|
SUBDIR += xf86-video-nv
|
||||||
SUBDIR += xf86-video-qxl
|
SUBDIR += xf86-video-qxl
|
||||||
SUBDIR += xf86-video-scfb
|
SUBDIR += xf86-video-scfb
|
||||||
|
|
16
x11-drivers/xf86-video-mga/Makefile
Normal file
16
x11-drivers/xf86-video-mga/Makefile
Normal file
|
@ -0,0 +1,16 @@
|
||||||
|
PORTNAME= xf86-video-mga
|
||||||
|
PORTVERSION= 2.0.0
|
||||||
|
PORTREVISION= 5
|
||||||
|
PORTEPOCH= 3
|
||||||
|
CATEGORIES= x11-drivers
|
||||||
|
|
||||||
|
MAINTAINER= x11@FreeBSD.org
|
||||||
|
COMMENT= X.Org mga display driver
|
||||||
|
WWW= https://www.x.org/
|
||||||
|
|
||||||
|
USES= gl xorg-cat:driver
|
||||||
|
USE_GL= gl
|
||||||
|
|
||||||
|
GNU_CONFIGURE_MANPREFIX=${PREFIX}/share
|
||||||
|
|
||||||
|
.include <bsd.port.mk>
|
3
x11-drivers/xf86-video-mga/distinfo
Normal file
3
x11-drivers/xf86-video-mga/distinfo
Normal file
|
@ -0,0 +1,3 @@
|
||||||
|
TIMESTAMP = 1546479273
|
||||||
|
SHA256 (xorg/driver/xf86-video-mga-2.0.0.tar.bz2) = 268946e1a13e9d80e4f724a0740df9e6e8c8bad37697fcbf456924e9fdbb5d79
|
||||||
|
SIZE (xorg/driver/xf86-video-mga-2.0.0.tar.bz2) = 452486
|
15
x11-drivers/xf86-video-mga/files/patch-src_mga__dac3026.c
Normal file
15
x11-drivers/xf86-video-mga/files/patch-src_mga__dac3026.c
Normal file
|
@ -0,0 +1,15 @@
|
||||||
|
# Fix a style warning
|
||||||
|
#
|
||||||
|
--- src/mga_dac3026.c.orig 2017-01-17 22:40:29 UTC
|
||||||
|
+++ src/mga_dac3026.c
|
||||||
|
@@ -886,8 +886,8 @@ MGA3026LoadCursorImage(
|
||||||
|
outTi3026dreg(TVP3026_WADR_PAL, 0x00);
|
||||||
|
|
||||||
|
while(i--) {
|
||||||
|
- while (INREG8(0x1FDA) & 0x01);
|
||||||
|
- while (!(INREG8(0x1FDA) & 0x01));
|
||||||
|
+ while (INREG8(0x1FDA) & 0x01) {}
|
||||||
|
+ while (!(INREG8(0x1FDA) & 0x01)) {}
|
||||||
|
outTi3026dreg(TVP3026_CUR_RAM, *(src++));
|
||||||
|
}
|
||||||
|
}
|
22
x11-drivers/xf86-video-mga/files/patch-src_mga__dri.c
Normal file
22
x11-drivers/xf86-video-mga/files/patch-src_mga__dri.c
Normal file
|
@ -0,0 +1,22 @@
|
||||||
|
# Use the correct constants for this type
|
||||||
|
#
|
||||||
|
--- src/mga_dri.c.orig 2017-01-17 22:40:29 UTC
|
||||||
|
+++ src/mga_dri.c
|
||||||
|
@@ -316,7 +316,7 @@ static void MGAWaitForIdleDMA( ScrnInfoP
|
||||||
|
for (;;) {
|
||||||
|
do {
|
||||||
|
/* first ask for quiescent and flush */
|
||||||
|
- lock.flags = DRM_LOCK_QUIESCENT | DRM_LOCK_FLUSH;
|
||||||
|
+ lock.flags = _DRM_LOCK_QUIESCENT | _DRM_LOCK_FLUSH;
|
||||||
|
do {
|
||||||
|
ret = drmCommandWrite( pMga->drmFD, DRM_MGA_FLUSH,
|
||||||
|
&lock, sizeof( drm_lock_t ) );
|
||||||
|
@@ -324,7 +324,7 @@ static void MGAWaitForIdleDMA( ScrnInfoP
|
||||||
|
|
||||||
|
/* if it's still busy just try quiescent */
|
||||||
|
if ( ret == -EBUSY ) {
|
||||||
|
- lock.flags = DRM_LOCK_QUIESCENT;
|
||||||
|
+ lock.flags = _DRM_LOCK_QUIESCENT;
|
||||||
|
do {
|
||||||
|
ret = drmCommandWrite( pMga->drmFD, DRM_MGA_FLUSH,
|
||||||
|
&lock, sizeof( drm_lock_t ) );
|
19
x11-drivers/xf86-video-mga/files/patch-src_mga__driver.c
Normal file
19
x11-drivers/xf86-video-mga/files/patch-src_mga__driver.c
Normal file
|
@ -0,0 +1,19 @@
|
||||||
|
--- src/mga_driver.c.orig 2024-08-01 13:23:52 UTC
|
||||||
|
+++ src/mga_driver.c
|
||||||
|
@@ -702,6 +702,8 @@ MGAPciProbe(DriverPtr drv, int entity_num, struct pci_
|
||||||
|
ScrnInfoPtr pScrn = NULL;
|
||||||
|
MGAPtr pMga;
|
||||||
|
|
||||||
|
+#ifndef __FreeBSD__
|
||||||
|
+ /* FreeBSD always has vgapci driver attached. */
|
||||||
|
if (pci_device_has_kernel_driver(dev)) {
|
||||||
|
/* If it's a G200 server chip, it's probably on KMS, so bail; if not,
|
||||||
|
* it might be using matroxfb, which is ok. */
|
||||||
|
@@ -721,6 +723,7 @@ MGAPciProbe(DriverPtr drv, int entity_num, struct pci_
|
||||||
|
return FALSE;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
+#endif
|
||||||
|
|
||||||
|
/* Allocate a ScrnInfoRec and claim the slot */
|
||||||
|
pScrn = xf86ConfigPciEntity(pScrn, 0, entity_num, MGAPciChipsets,
|
1
x11-drivers/xf86-video-mga/pkg-descr
Normal file
1
x11-drivers/xf86-video-mga/pkg-descr
Normal file
|
@ -0,0 +1 @@
|
||||||
|
This package contains the X.Org xf86-video-mga driver.
|
2
x11-drivers/xf86-video-mga/pkg-plist
Normal file
2
x11-drivers/xf86-video-mga/pkg-plist
Normal file
|
@ -0,0 +1,2 @@
|
||||||
|
lib/xorg/modules/drivers/mga_drv.so
|
||||||
|
share/man/man4/mga.4x.gz
|
Loading…
Add table
Reference in a new issue