matroxfb console oops in 2.4.2x
video/matrox/matroxfb_accel.c Thu Jun 19 10:57:54 2003 line 492
Quoted 12 lines · David Woodhouse
Below is a workaround which lets the machine boot. It's obviously not a fix.
video/matrox/matroxfb_accel.c Thu Jun 19 10:57:54 2003 renamed from video/matrox/matroxfb_accel.c~ Wed Jun 18 17:16:40 2003 +3
-0@@ -487,6 +487,9 @@ DBG_HEAVY("matroxfb_cfb8_putc"); + if (!ACCESS_FBINFO(curr.putc)) + return; +
It looks like that someone tried to print something on the console during fbcon initialization. It is not allowed to call fbdev's putc before mode set was issued (at least I always believed to it; before first mode set hardware is in VGA state). Do not you see some error message in dmesg with these fixes?
video/matrox/matroxfb_accel.c Thu Jun 19 10:57:54 2003 line 512
Quoted 7 lines
video/matrox/matroxfb_accel.c Thu Jun 19 10:57:54 2003 renamed from video/matrox/matroxfb_accel.c~ Wed Jun 18 17:16:40 2003 +3
-0@@ -504,6 +507,9 @@ DBG_HEAVY("matroxfb_cfb16_putc"); + if (!ACCESS_FBINFO(curr.putc)) + return; +
Instead of plugging these tests into fast path please call "matrox_init_putc(PMINFO NULL, NULL)" somewhere in the initMatrox2(), before call to the register_framebuffer. At worst some part of video memory gets smashed by painted characters, but no damage should occur.
Petr Vandrovec
Quoted 7 lines · Petr Vandrovec
Quoted 2 lines · David Woodhouse
Below is a workaround which lets the machine boot. It's obviously not a fix.
It looks like that someone tried to print something on the console during fbcon initialization.
take_over_console() attempts to redraw the screen.
Quoted 3 lines
It is not allowed to call fbdev's putc
before mode set was issued (at least I always believed to it; before first mode set hardware is in VGA state)
In this case, the hardware is uninitialised -- it's not in a PeeCee. Is that relevant?
Quoted 1 line
Do not you see some error message in dmesg with these fixes?
If I omit the fixes, I just get...
matroxfb: Matrox Mystique (PCI) detected
matroxfb: 1280x1024x8bpp (virtual: 1280x1635)
matroxfb: framebuffer at 0x1000000, mapped to 0xc017d000, size 2097152
matroxfb: Pixel PLL not locked after 5 secs
+$S07#ba
Include the hack I showed you in matroxfb_cfb*_putcs, and I get what I expect instead of the crash...
Console: switching to colour frame buffer device 160x64
fb0: MATROX VGA frame buffer device
If I call matrox_init_putc() earlier as you suggest, then it seems to end up busy-waiting in mga_fifo()...
0x8c0dba18 <matrox_cfbX_putcs+184>: mov.l @(r0,r3),r1 0x8c0dba1a <matrox_cfbX_putcs+186>: extu.b r1,r1 0x8c0dba1c <matrox_cfbX_putcs+188>: cmp/hi r2,r1 0x8c0dba1e <matrox_cfbX_putcs+190>: bf.s 0x8c0dba18 <matrox_cfbX_putcs+184>
(gdb) regs
PC=8c0dba1c SR=40000100 PR=8c0dbb72 MACH=00000003 MACHL=00000780 GBR=f89858fb VBR=8c006000 SSR=00000000 SPC=00000000
R0-R7 b3020000 00000005 00000005 00001e10 07070707 8c164d0c 00000000 01800010 R8-R15 b3020000 00000010 002f0028 00000010 00000025 8c1d6948 8c2a3b14 8c2a3b14 (gdb) list *$pc0x8c0dba1c is in matrox_cfbX_putcs (matroxfb_accel.c:610).
605 fxbndry = ((xx + fontwidth(p) - 1) << 16) | xx;
606 mmio = ACCESS_FBINFO(mmio.vbase);
607 while (count--) {
608 u_int8_t* chardata = p->fontdata + (scr_readw(s++) & p->charmask)*charcell;
609
610 mga_fifo(6);
611 mga_writel(mmio, M_FXBNDRY, fxbndry);
612 mga_writel(mmio, M_AR0, ar0);
613 mga_writel(mmio, M_AR3, 0);
614 if (easy) {Signature · 1 line
dwmw2