diff options
-rw-r--r-- | drivers/video/tridentfb.c | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c index b6065effc5e0..da4b464cbdba 100644 --- a/drivers/video/tridentfb.c +++ b/drivers/video/tridentfb.c | |||
@@ -558,13 +558,15 @@ static inline void write3CE(struct tridentfb_par *par, int reg, | |||
558 | vga_mm_wgfx(par->io_virt, reg, val); | 558 | vga_mm_wgfx(par->io_virt, reg, val); |
559 | } | 559 | } |
560 | 560 | ||
561 | static void enable_mmio(void) | 561 | static void enable_mmio(struct tridentfb_par *par) |
562 | { | 562 | { |
563 | /* Goto New Mode */ | 563 | /* Goto New Mode */ |
564 | vga_io_rseq(0x0B); | 564 | vga_io_rseq(0x0B); |
565 | 565 | ||
566 | /* Unprotect registers */ | 566 | /* Unprotect registers */ |
567 | vga_io_wseq(NewMode1, 0x80); | 567 | vga_io_wseq(NewMode1, 0x80); |
568 | if (!is_oldprotect(par->chip_id)) | ||
569 | vga_io_wseq(Protection, 0x92); | ||
568 | 570 | ||
569 | /* Enable MMIO */ | 571 | /* Enable MMIO */ |
570 | outb(PCIReg, 0x3D4); | 572 | outb(PCIReg, 0x3D4); |
@@ -578,6 +580,8 @@ static void disable_mmio(struct tridentfb_par *par) | |||
578 | 580 | ||
579 | /* Unprotect registers */ | 581 | /* Unprotect registers */ |
580 | vga_mm_wseq(par->io_virt, NewMode1, 0x80); | 582 | vga_mm_wseq(par->io_virt, NewMode1, 0x80); |
583 | if (!is_oldprotect(par->chip_id)) | ||
584 | vga_mm_wseq(par->io_virt, Protection, 0x92); | ||
581 | 585 | ||
582 | /* Disable MMIO */ | 586 | /* Disable MMIO */ |
583 | t_outb(par, PCIReg, 0x3D4); | 587 | t_outb(par, PCIReg, 0x3D4); |
@@ -995,6 +999,7 @@ static int tridentfb_set_par(struct fb_info *info) | |||
995 | vblankend /= 2; | 999 | vblankend /= 2; |
996 | } | 1000 | } |
997 | 1001 | ||
1002 | enable_mmio(par); | ||
998 | crtc_unlock(par); | 1003 | crtc_unlock(par); |
999 | write3CE(par, CyberControl, 8); | 1004 | write3CE(par, CyberControl, 8); |
1000 | tmp = 0xEB; | 1005 | tmp = 0xEB; |
@@ -1116,7 +1121,7 @@ static int tridentfb_set_par(struct fb_info *info) | |||
1116 | if (!is_xp(par->chip_id)) | 1121 | if (!is_xp(par->chip_id)) |
1117 | write3X4(par, Performance, read3X4(par, Performance) | 0x10); | 1122 | write3X4(par, Performance, read3X4(par, Performance) | 0x10); |
1118 | /* MMIO & PCI read and write burst enable */ | 1123 | /* MMIO & PCI read and write burst enable */ |
1119 | if (par->chip_id != TGUI9440) | 1124 | if (par->chip_id != TGUI9440 && par->chip_id != IMAGE975) |
1120 | write3X4(par, PCIReg, read3X4(par, PCIReg) | 0x06); | 1125 | write3X4(par, PCIReg, read3X4(par, PCIReg) | 0x06); |
1121 | 1126 | ||
1122 | vga_mm_wseq(par->io_virt, 0, 3); | 1127 | vga_mm_wseq(par->io_virt, 0, 3); |
@@ -1403,7 +1408,7 @@ static int __devinit trident_pci_probe(struct pci_dev *dev, | |||
1403 | goto out_unmap1; | 1408 | goto out_unmap1; |
1404 | } | 1409 | } |
1405 | 1410 | ||
1406 | enable_mmio(); | 1411 | enable_mmio(default_par); |
1407 | 1412 | ||
1408 | /* setup framebuffer memory */ | 1413 | /* setup framebuffer memory */ |
1409 | tridentfb_fix.smem_start = pci_resource_start(dev, 0); | 1414 | tridentfb_fix.smem_start = pci_resource_start(dev, 0); |