* [PATCH 4/4] tridentfb: fix console freeze when switching from X11
@ 2008-05-20 5:14 Krzysztof Helt
2008-05-20 9:18 ` Andrew Morton
0 siblings, 1 reply; 2+ messages in thread
From: Krzysztof Helt @ 2008-05-20 5:14 UTC (permalink / raw)
To: Linux-fbdev-devel; +Cc: Andrew Morton
From: Krzysztof Helt <krzysztof.h1@wp.pl>
This patch fixes two problems when acceleration is
enabled:
- console switch from the Xorg locks up the computer
because the Xorg code locks some registers and disables
the mmio mode, so reenable these in the
tridentfb_set_par() and enable_mmio()
- blacklist the Image975 chipset from setting PCI burst
mode. This helps with random lock ups of the
framebuffer on this chip. The same fix is probably
needed for the Xorg as well.
Signed-off-by: Krzysztof Helt <krzysztof.h1@wp.pl>
---
This is tridentfb patch number 25.
I thought that it would be the last patch in the batch of changes but there
seemed to be another bug for every fixed or enabled feature. I hope that
all these 25 patches will make in next kernel release (2.6.27).
Unfortunately, more fixes will follow. I hope they will be only minor ones.
diff -urp linux-old/drivers/video/tridentfb.c linux-new/drivers/video/tridentfb.c
--- linux-old/drivers/video/tridentfb.c 2008-05-18 22:59:31.062273649 +0200
+++ linux-new/drivers/video/tridentfb.c 2008-05-18 23:03:38.878267000 +0200
@@ -558,13 +558,15 @@ static inline void write3CE(struct tride
vga_mm_wgfx(par->io_virt, reg, val);
}
-static void enable_mmio(void)
+static void enable_mmio(struct tridentfb_par *par)
{
/* Goto New Mode */
vga_io_rseq(0x0B);
/* Unprotect registers */
vga_io_wseq(NewMode1, 0x80);
+ if (!is_oldprotect(par->chip_id))
+ vga_io_wseq(Protection, 0x92);
/* Enable MMIO */
outb(PCIReg, 0x3D4);
@@ -578,6 +580,8 @@ static void disable_mmio(struct tridentf
/* Unprotect registers */
vga_mm_wseq(par->io_virt, NewMode1, 0x80);
+ if (!is_oldprotect(par->chip_id))
+ vga_mm_wseq(par->io_virt, Protection, 0x92);
/* Disable MMIO */
t_outb(par, PCIReg, 0x3D4);
@@ -993,6 +997,7 @@ static int tridentfb_set_par(struct fb_i
vblankend /= 2;
}
+ enable_mmio(par);
crtc_unlock(par);
write3CE(par, CyberControl, 8);
tmp = 0xEB;
@@ -1114,7 +1119,7 @@ static int tridentfb_set_par(struct fb_i
if (!is_xp(par->chip_id))
write3X4(par, Performance, read3X4(par, Performance) | 0x10);
/* MMIO & PCI read and write burst enable */
- if (par->chip_id != TGUI9440)
+ if (par->chip_id != TGUI9440 && par->chip_id != IMAGE975)
write3X4(par, PCIReg, read3X4(par, PCIReg) | 0x06);
vga_mm_wseq(par->io_virt, 0, 3);
@@ -1401,7 +1406,7 @@ static int __devinit trident_pci_probe(s
goto out_unmap1;
}
- enable_mmio();
+ enable_mmio(default_par);
/* setup framebuffer memory */
tridentfb_fix.smem_start = pci_resource_start(dev, 0);
----------------------------------------------------------------------
Od slicznej Mariolki swieze pomidorki!
http://link.interia.pl/f1de2
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 2+ messages in thread* Re: [PATCH 4/4] tridentfb: fix console freeze when switching from X11
2008-05-20 5:14 [PATCH 4/4] tridentfb: fix console freeze when switching from X11 Krzysztof Helt
@ 2008-05-20 9:18 ` Andrew Morton
0 siblings, 0 replies; 2+ messages in thread
From: Andrew Morton @ 2008-05-20 9:18 UTC (permalink / raw)
To: Krzysztof Helt; +Cc: Linux-fbdev-devel
On Tue, 20 May 2008 07:14:21 +0200 Krzysztof Helt <krzysztof.h1@poczta.fm> wrote:
> This is tridentfb patch number 25.
>
> I thought that it would be the last patch in the batch of changes but there
> seemed to be another bug for every fixed or enabled feature. I hope that
> all these 25 patches will make in next kernel release (2.6.27).
yup, I was planning on merging all this into 2.6.27.
> Unfortunately, more fixes will follow. I hope they will be only minor ones.
Fixes are not unfortunate ;)
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2008-05-20 9:19 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-20 5:14 [PATCH 4/4] tridentfb: fix console freeze when switching from X11 Krzysztof Helt
2008-05-20 9:18 ` Andrew Morton
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).