diff options
author | Krzysztof Helt <krzysztof.h1@wp.pl> | 2008-03-10 14:43:36 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@woody.linux-foundation.org> | 2008-03-10 21:01:17 -0400 |
commit | 3acd9d462062bb332073fde90bf9d118ac5a043d (patch) | |
tree | f17fc6b686edfa8b36ba900816c2fbf46987e5d9 /drivers/video/tridentfb.c | |
parent | e84290dc79d30af3e95b38e670f80c0b5046bbf2 (diff) |
tridentfb: register should be left in non-locked state
Remove locking registers after they are unlocked during switch to/from MMIO
mode. This fixes regression on the Blade3D (Trident 9880) caused by the
previous patch (probe fixes).
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
Cc: "Antonino A. Daplas" <adaplas@pol.net>
Signed-off-by: Andrew Morton <akpm@linux-foundation.org>
Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
Diffstat (limited to 'drivers/video/tridentfb.c')
-rw-r--r-- | drivers/video/tridentfb.c | 12 |
1 files changed, 0 insertions, 12 deletions
diff --git a/drivers/video/tridentfb.c b/drivers/video/tridentfb.c index 919ce75db9e2..5976a1e40514 100644 --- a/drivers/video/tridentfb.c +++ b/drivers/video/tridentfb.c | |||
@@ -566,44 +566,32 @@ static inline void write3CE(int reg, unsigned char val) | |||
566 | 566 | ||
567 | static void enable_mmio(void) | 567 | static void enable_mmio(void) |
568 | { | 568 | { |
569 | unsigned char tmp; | ||
570 | |||
571 | /* Goto New Mode */ | 569 | /* Goto New Mode */ |
572 | outb(0x0B, 0x3C4); | 570 | outb(0x0B, 0x3C4); |
573 | inb(0x3C5); | 571 | inb(0x3C5); |
574 | 572 | ||
575 | /* Unprotect registers */ | 573 | /* Unprotect registers */ |
576 | outb(NewMode1, 0x3C4); | 574 | outb(NewMode1, 0x3C4); |
577 | tmp = inb(0x3C5); | ||
578 | outb(0x80, 0x3C5); | 575 | outb(0x80, 0x3C5); |
579 | 576 | ||
580 | /* Enable MMIO */ | 577 | /* Enable MMIO */ |
581 | outb(PCIReg, 0x3D4); | 578 | outb(PCIReg, 0x3D4); |
582 | outb(inb(0x3D5) | 0x01, 0x3D5); | 579 | outb(inb(0x3D5) | 0x01, 0x3D5); |
583 | |||
584 | t_outb(NewMode1, 0x3C4); | ||
585 | t_outb(tmp, 0x3C5); | ||
586 | } | 580 | } |
587 | 581 | ||
588 | static void disable_mmio(void) | 582 | static void disable_mmio(void) |
589 | { | 583 | { |
590 | unsigned char tmp; | ||
591 | |||
592 | /* Goto New Mode */ | 584 | /* Goto New Mode */ |
593 | t_outb(0x0B, 0x3C4); | 585 | t_outb(0x0B, 0x3C4); |
594 | t_inb(0x3C5); | 586 | t_inb(0x3C5); |
595 | 587 | ||
596 | /* Unprotect registers */ | 588 | /* Unprotect registers */ |
597 | t_outb(NewMode1, 0x3C4); | 589 | t_outb(NewMode1, 0x3C4); |
598 | tmp = t_inb(0x3C5); | ||
599 | t_outb(0x80, 0x3C5); | 590 | t_outb(0x80, 0x3C5); |
600 | 591 | ||
601 | /* Disable MMIO */ | 592 | /* Disable MMIO */ |
602 | t_outb(PCIReg, 0x3D4); | 593 | t_outb(PCIReg, 0x3D4); |
603 | t_outb(t_inb(0x3D5) & ~0x01, 0x3D5); | 594 | t_outb(t_inb(0x3D5) & ~0x01, 0x3D5); |
604 | |||
605 | outb(NewMode1, 0x3C4); | ||
606 | outb(tmp, 0x3C5); | ||
607 | } | 595 | } |
608 | 596 | ||
609 | #define crtc_unlock() write3X4(CRTVSyncEnd, read3X4(CRTVSyncEnd) & 0x7F) | 597 | #define crtc_unlock() write3X4(CRTVSyncEnd, read3X4(CRTVSyncEnd) & 0x7F) |