summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorLuc Verhaegen <libv@skynet.be>2009-10-15 15:16:57 +0200
committerLuc Verhaegen <libv@skynet.be>2009-10-15 15:16:57 +0200
commitb58f3c7fb64ce66d88c63603ab42305bde04c20a (patch)
tree960f5e0e379f0e7700140dc18f1aaa26d15f15e2
parent3b624b626a7644e6eb07e8f08c4cda5c603f3c09 (diff)
VT1122: Quickly fix lock on usage as VGA device.
SR1A.1 is supposed to be MMIO enable, but when the device is accessed like a plain VGA device (whether this is through register space or memory, i do not know yet), the VT1122 hangs hard. VT1122 seems happy without this change though, maybe find out what hardware really needs this.
-rw-r--r--src/via_driver.c11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/via_driver.c b/src/via_driver.c
index 2119c90..0501b49 100644
--- a/src/via_driver.c
+++ b/src/via_driver.c
@@ -1872,8 +1872,15 @@ ViaMMIOEnable(ScrnInfoPtr pScrn)
/* Unlock Extended IO Space */
VGASRWrite(pScrn, 0x10, 0x01);
- /* Enable MMIO and set PCI burst to 1 wait state */
- VGASRMask(pScrn, 0x1A, 0x06, 0x06);
+ /* Enable MMIO */
+ /* VT1122 crashes on VT switch, find out what other part is involved
+ there for the proper solution. */
+ if (VIAPTR(pScrn)->Chipset != VT1122)
+ VGASRMask(pScrn, 0x1A, 0x02, 0x02);
+
+ /* set PCI burst to 1 wait state */
+ /* TODO: move me to base hw init */
+ VGASRMask(pScrn, 0x1A, 0x04, 0x04);
VGACRMask(pScrn, 0x11, 0x00, 0x80); /* modify starting address */
VGACRMask(pScrn, 0x03, 0x80, 0x80); /* enable vertical retrace access */