diff options
author | anholt <anholt@FreeBSD.org> | 2003-05-04 06:18:03 +0800 |
---|---|---|
committer | anholt <anholt@FreeBSD.org> | 2003-05-04 06:18:03 +0800 |
commit | 4fe90be15c42fa3cce844533bec8ebcc59e84a9b (patch) | |
tree | efe93c4367bc1405463af37c30451b55ce9090d8 /x11-servers | |
parent | 395e65816cda9819fba1af4aa745f6e2af6b23d9 (diff) | |
download | freebsd-ports-graphics-4fe90be15c42fa3cce844533bec8ebcc59e84a9b.tar.gz freebsd-ports-graphics-4fe90be15c42fa3cce844533bec8ebcc59e84a9b.tar.zst freebsd-ports-graphics-4fe90be15c42fa3cce844533bec8ebcc59e84a9b.zip |
Fix a crash with the siliconmotion (smi) driver.
PR: ports/51450
Tested by: Stacey Roberts <stacey@vickiandstacey.com>
Obtained from: XFree86 bug #50
Diffstat (limited to 'x11-servers')
-rw-r--r-- | x11-servers/XFree86-4-Server-snap/Makefile | 4 | ||||
-rw-r--r-- | x11-servers/XFree86-4-Server-snap/files/patch-smi | 40 | ||||
-rw-r--r-- | x11-servers/XFree86-4-Server/Makefile | 4 | ||||
-rw-r--r-- | x11-servers/XFree86-4-Server/files/patch-smi | 40 |
4 files changed, 84 insertions, 4 deletions
diff --git a/x11-servers/XFree86-4-Server-snap/Makefile b/x11-servers/XFree86-4-Server-snap/Makefile index 50250b78873..8f85dd564d2 100644 --- a/x11-servers/XFree86-4-Server-snap/Makefile +++ b/x11-servers/XFree86-4-Server-snap/Makefile @@ -7,7 +7,7 @@ PORTNAME= Server PORTVERSION= 4.3.0 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= x11-servers MASTER_SITES= ${MASTER_SITE_XFREE:S/$/:x/} \ ${MASTER_SITE_LOCAL:S/$/:local/} @@ -34,7 +34,7 @@ PATCHDIR= ${.CURDIR}/../../x11/XFree86-4-libraries/files .for pf in patch-savage-pci-id patch-alpha_video.c patch-Pci.h patch-radeondri \ patch-r128_driver.c patch-mga_driver.c patch-xkbInit.c patch-radeon_dri.c \ patch-mga_dri.c patch-nv_driver.c patch-nv_setup.c patch-int10-generic.c \ - patch-radeon_cursor.c patch-radeon_reg.h + patch-radeon_cursor.c patch-radeon_reg.h patch-smi EXTRA_PATCHES+= ${FILESDIR}/${pf} .endfor SCRIPTS_ENV= OSVERSION=${OSVERSION} \ diff --git a/x11-servers/XFree86-4-Server-snap/files/patch-smi b/x11-servers/XFree86-4-Server-snap/files/patch-smi new file mode 100644 index 00000000000..2c17234d837 --- /dev/null +++ b/x11-servers/XFree86-4-Server-snap/files/patch-smi @@ -0,0 +1,40 @@ +--- programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_driver.c.orig Wed Feb 5 09:45:29 2003 ++++ programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_driver.c Fri May 2 03:09:24 2003 +@@ -1410,7 +1410,7 @@ + ENTER_PROC("SMI_Save"); + + /* Save the standard VGA registers */ +- vgaHWSave(pScrn, vgaSavePtr, VGA_SR_MODE); ++ vgaHWSave(pScrn, vgaSavePtr, VGA_SR_ALL); + save->smiDACMask = VGAIN8(pSmi, VGA_DAC_MASK); + VGAOUT8(pSmi, VGA_DAC_READ_ADDR, 0); + for (i = 0; i < 256; i++) +@@ -1601,7 +1601,7 @@ + VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0xA0, restore->SRA0); + + /* Restore the standard VGA registers */ +- vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_MODE); ++ vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_ALL); + if (restore->smiDACMask) + { + VGAOUT8(pSmi, VGA_DAC_MASK, restore->smiDACMask); +@@ -1672,7 +1672,7 @@ + } + + if (restore->modeInit) +- vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_MODE); ++ vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_ALL); + + if (!SMI_LYNXM_SERIES(pSmi->Chipset)) + { +--- programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.c.orig Sat Jan 11 19:55:49 2003 ++++ programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.c Fri May 2 03:09:24 2003 +@@ -277,7 +277,7 @@ + {XvSettable | XvGettable, 0, 1, XV_INTERLACED_NAME}, + }; + +-static XF86AttributeRec SMI_VideoAttributes[N_ATTRS] = { ++static XF86AttributeRec SMI_VideoAttributes[2] = { + {XvSettable | XvGettable, 0, 255, XV_BRIGHTNESS_NAME}, + {XvSettable | XvGettable, 0x000000, 0xFFFFFF, XV_COLORKEY_NAME}, + }; diff --git a/x11-servers/XFree86-4-Server/Makefile b/x11-servers/XFree86-4-Server/Makefile index 50250b78873..8f85dd564d2 100644 --- a/x11-servers/XFree86-4-Server/Makefile +++ b/x11-servers/XFree86-4-Server/Makefile @@ -7,7 +7,7 @@ PORTNAME= Server PORTVERSION= 4.3.0 -PORTREVISION= 5 +PORTREVISION= 6 CATEGORIES= x11-servers MASTER_SITES= ${MASTER_SITE_XFREE:S/$/:x/} \ ${MASTER_SITE_LOCAL:S/$/:local/} @@ -34,7 +34,7 @@ PATCHDIR= ${.CURDIR}/../../x11/XFree86-4-libraries/files .for pf in patch-savage-pci-id patch-alpha_video.c patch-Pci.h patch-radeondri \ patch-r128_driver.c patch-mga_driver.c patch-xkbInit.c patch-radeon_dri.c \ patch-mga_dri.c patch-nv_driver.c patch-nv_setup.c patch-int10-generic.c \ - patch-radeon_cursor.c patch-radeon_reg.h + patch-radeon_cursor.c patch-radeon_reg.h patch-smi EXTRA_PATCHES+= ${FILESDIR}/${pf} .endfor SCRIPTS_ENV= OSVERSION=${OSVERSION} \ diff --git a/x11-servers/XFree86-4-Server/files/patch-smi b/x11-servers/XFree86-4-Server/files/patch-smi new file mode 100644 index 00000000000..2c17234d837 --- /dev/null +++ b/x11-servers/XFree86-4-Server/files/patch-smi @@ -0,0 +1,40 @@ +--- programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_driver.c.orig Wed Feb 5 09:45:29 2003 ++++ programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_driver.c Fri May 2 03:09:24 2003 +@@ -1410,7 +1410,7 @@ + ENTER_PROC("SMI_Save"); + + /* Save the standard VGA registers */ +- vgaHWSave(pScrn, vgaSavePtr, VGA_SR_MODE); ++ vgaHWSave(pScrn, vgaSavePtr, VGA_SR_ALL); + save->smiDACMask = VGAIN8(pSmi, VGA_DAC_MASK); + VGAOUT8(pSmi, VGA_DAC_READ_ADDR, 0); + for (i = 0; i < 256; i++) +@@ -1601,7 +1601,7 @@ + VGAOUT8_INDEX(pSmi, VGA_SEQ_INDEX, VGA_SEQ_DATA, 0xA0, restore->SRA0); + + /* Restore the standard VGA registers */ +- vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_MODE); ++ vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_ALL); + if (restore->smiDACMask) + { + VGAOUT8(pSmi, VGA_DAC_MASK, restore->smiDACMask); +@@ -1672,7 +1672,7 @@ + } + + if (restore->modeInit) +- vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_MODE); ++ vgaHWRestore(pScrn, vgaSavePtr, VGA_SR_ALL); + + if (!SMI_LYNXM_SERIES(pSmi->Chipset)) + { +--- programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.c.orig Sat Jan 11 19:55:49 2003 ++++ programs/Xserver/hw/xfree86/drivers/siliconmotion/smi_video.c Fri May 2 03:09:24 2003 +@@ -277,7 +277,7 @@ + {XvSettable | XvGettable, 0, 1, XV_INTERLACED_NAME}, + }; + +-static XF86AttributeRec SMI_VideoAttributes[N_ATTRS] = { ++static XF86AttributeRec SMI_VideoAttributes[2] = { + {XvSettable | XvGettable, 0, 255, XV_BRIGHTNESS_NAME}, + {XvSettable | XvGettable, 0x000000, 0xFFFFFF, XV_COLORKEY_NAME}, + }; |