funny framebuffer fonts on PowerBook with radeonfb
Hey Ben!
2.6.16 and 2.6.15-something show a funny behaviour when using the radeonfb driver (for text mode), they kind of twist and break the fonts in various places some characters or parts seem to be mirrored like '[' becoming ']' but not on character boundary but more on N pixels, colors seem to be correct for the characters, and sometimes the font is perfectly fine for larger runs, e.g. I can read the logon prompt fine, but everything I type is garbled ...
just for an example, when I type 'echo "Test"' then all characters are mirrored and cut off on the right side but the locations are as shown above, on enter the T is only a few pixels wide, but the est part is written perfectly fine ... this is a new behaviour and going back to 2.6.13.3 doesn't show this ...
if there is some testing I can do for you, or when you need more info, please let me know. here a few details for the machine:
TIA,
Herbert
processor : 0
cpu : 7450, altivec supported
clock : 667.000000MHz
revision : 0.1 (pvr 8000 0201)
bogomips : 66.56
timebase : 33290001
machine : PowerBook3,3
motherboard : PowerBook3,3 MacRISC2 MacRISC Power Macintosh
detected as : 72 (PowerBook Titanium II)
pmac flags : 0000001b
L2 cache : 256K unified
pmac-generation: NewWorld
00:10.0 VGA compatible controller: ATI Technologies Inc Radeon Mobility M6 LY (prog-if 00 [VGA])
Subsystem: ATI Technologies Inc Radeon Mobility M6 LY
Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping+ SERR- FastB2B-
Status: Cap+ 66Mhz+ UDF- FastB2B+ ParErr- DEVSEL=medium >TAbort- <TAbort- <MAbort- >SERR- <PERR-
Latency: 255 (2000ns min), cache line size 08
Interrupt: pin A routed to IRQ 48
Region 0: Memory at b8000000 (32-bit, prefetchable) [size=128M]
Region 1: I/O ports at f0000400 [size=256]
Region 2: Memory at b0000000 (32-bit, non-prefetchable) [size=64K]
Expansion ROM at f1000000 [disabled] [size=128K]
Capabilities: [58] AGP version 2.0
Status: RQ=48 Iso- ArqSz=0 Cal=0 SBA+ ITACoh- GART64- HTrans- 64bit- FW- AGP3- Rate=x1,x2,x4
Command: RQ=1 ArqSz=0 Cal=0 SBA+ AGP- GART64- 64bit- FW- Rate=<none>
Capabilities: [50] Power Management version 2
Flags: PMEClk- DSI- D1+ D2+ AuxCurrent=0mA PME(D0-,D1-,D2-,D3hot-,D3cold-)
Status: D0 PME-Enable- DSel=0 DScale=0 PME-
PCI: Enabling device 0000:00:10.0 (0086 -> 0087)
radeonfb (0000:00:10.0): Invalid ROM signature 8080 should be 0xaa55
radeonfb: Retrieved PLL infos from Open Firmware
radeonfb: Reference=27.00 MHz (RefDiv=12) Memory=166.00 Mhz, System=166.00 MHz
radeonfb: PLL min 12000 max 35000
radeonfb: Monitor 1 type LCD found
radeonfb: EDID probed
radeonfb: Monitor 2 type no found
radeonfb: Using Firmware dividers 0x0001003a from PPLL 0
radeonfb: Dynamic Clock Power Management enabled
Console: switching to colour frame buffer device 164x54 Registered "ati" backlight controller,level: 15/15
radeonfb (0000:00:10.0): ATI Radeon LY
Quoted 19 lines · Herbert Poetzl
Hey Ben!
2.6.16 and 2.6.15-something show a funny behaviour when using the radeonfb driver (for text mode), they kind of twist and break the fonts in various places some characters or parts seem to be mirrored like '[' becoming ']' but not on character boundary but more on N pixels, colors seem to be correct for the characters, and sometimes the font is perfectly fine for larger runs, e.g. I can read the logon prompt fine, but everything I type is garbled ...
just for an example, when I type 'echo "Test"' then all characters are mirrored and cut off on the right side but the locations are as shown above, on enter the T is only a few pixels wide, but the est part is written perfectly fine ... this is a new behaviour and going back to 2.6.13.3 doesn't show this ...
Quoted 3 lines
if there is some testing I can do for you, or when you need more info, please let me know. here a few details for the machine:
I have a similar machine and haven't seen such a problem with it so far ... does this happen after you load X or already at boot before X ever kicks in ? Does it happen if you don't load any font (that is for example boot with init=/bin/sh to prevent any init script to try to load a font)
Ben.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Quoted 19 lines · Herbert Poetzl
Hey Ben!
2.6.16 and 2.6.15-something show a funny behaviour when using the radeonfb driver (for text mode), they kind of twist and break the fonts in various places some characters or parts seem to be mirrored like '[' becoming ']' but not on character boundary but more on N pixels, colors seem to be correct for the characters, and sometimes the font is perfectly fine for larger runs, e.g. I can read the logon prompt fine, but everything I type is garbled ...
just for an example, when I type 'echo "Test"' then all characters are mirrored and cut off on the right side but the locations are as shown above, on enter the T is only a few pixels wide, but the est part is written perfectly fine ... this is a new behaviour and going back to 2.6.13.3 doesn't show this ...
Quoted 4 lines
if there is some testing I can do for you, or when you need more info, please let me know. here a few details for the machine:
What font are you using? I presume the dimensions are not divisible by 8. Can you try this patch?
Tony
drivers/video/cfbimgblt.c +1 -1
@@ -169,7 +169,7 @@ static inline void slow_imageblit(constwhile (j--) { l--; - color = (*s &1 << (FB_BIT_NR (l))) ? fgcolor : bgcolor; + color = (*s & (1 << l)) ? fgcolor : bgcolor; val |=FB_SHIFT_HIGH (color, shift);/* Did the bitshift spill bits to the next long? */
include/linux/fb.h +0 -2
@@ -841,12 +841,10 @@ struct fb_info {#define FB_LEFT_POS (bpp) (32 - bpp)#define FB_SHIFT_HIGH (val, bits) ((val) >> (bits))#define FB_SHIFT_LOW (val, bits) ((val) << (bits)) -#define FB_BIT_NR (b) (7 - (b))#else #define FB_LEFT_POS (bpp) (0)#define FB_SHIFT_HIGH (val, bits) ((val) << (bits))#define FB_SHIFT_LOW (val, bits) ((val) >> (bits)) -#define FB_BIT_NR (b) (b)#endif /*
Quoted 19 lines · Herbert Poetzl
Hey Ben!
2.6.16 and 2.6.15-something show a funny behaviour when using the radeonfb driver (for text mode), they kind of twist and break the fonts in various places some characters or parts seem to be mirrored like '[' becoming ']' but not on character boundary but more on N pixels, colors seem to be correct for the characters, and sometimes the font is perfectly fine for larger runs, e.g. I can read the logon prompt fine, but everything I type is garbled ...
just for an example, when I type 'echo "Test"' then all characters are mirrored and cut off on the right side but the locations are as shown above, on enter the T is only a few pixels wide, but the est part is written perfectly fine ... this is a new behaviour and going back to 2.6.13.3 doesn't show this ...
Quoted 3 lines
if there is some testing I can do for you, or when you need more info, please let me know. here a few details for the machine:
I saw this on an PC with a Radeon 7000/VE that was slowly going bad. I'd recommend you run a full diagnostic on the video system memory (if possible) and look for errors there. If it isn't the memory (which was the problem on my Radeon) then the GPU itself might be going bad.
ShadowWolf
Quoted 20 lines · Benjamin Herrenschmidt
Quoted 19 lines · Herbert Poetzl
Hey Ben!
2.6.16 and 2.6.15-something show a funny behaviour when using the radeonfb driver (for text mode), they kind of twist and break the fonts in various places some characters or parts seem to be mirrored like '[' becoming ']' but not on character boundary but more on N pixels, colors seem to be correct for the characters, and sometimes the font is perfectly fine for larger runs, e.g. I can read the logon prompt fine, but everything I type is garbled ...
just for an example, when I type 'echo "Test"' then all characters are mirrored and cut off on the right side but the locations are as shown above, on enter the T is only a few pixels wide, but the est part is written perfectly fine ... this is a new behaviour and going back to 2.6.13.3 doesn't show this ...
Quoted 7 lines
Quoted 3 lines
if there is some testing I can do for you, or when you need more info, please let me know. here a few details for the machine:
I have a similar machine and haven't seen such a problem with it so far ... does this happen after you load X or already at boot before X ever kicks in?
long before X is started (which doesn't happen by default on my setup), btw X works fine
Quoted 3 lines
Does it happen if you don't load any font (that is for example boot with init=/bin/sh to prevent any init script to try to load a font)
yes, just tried that, the boot looks like this:
first, I end up in the bootloader yaboot, which asks me (in a very small font) which kernel to boot, then, for example, I enter
linux2616 init=/bin/bash
after that, the screen goes white for half a second and becomes black with a large terminal font on it (the one I get without framebuffer, I think), the text there is printed undistorted ... shortly after that, I get a flash, and the mode switches to a much smaller font (the final framebuffer font) and the kernel messages written there are already distorted. half a second later (or less) the penguin appears at the top area (undistorted), when the bootup is done I get the following prompt (which again is okay)
bash-2.05b#
typing anything there is distorted again ...
pressing enter several times leaves 'copies' of the caracters on the screen, forming vertical bars the prompt (bash) is now always fine, the copy one line above (as all the others) is distorted ...
note, the bootup is not much different with older kernels, except for the strange distortions ...
attached my kernel configuration, just in case it is related ...
TIA,
Herbert
Quoted 2 lines
Ben.
Quoted 11 lines · Herbert Poetzl
after that, the screen goes white for half a second and becomes black with a large terminal font on it (the one I get without framebuffer, I think), the text there is printed undistorted ... shortly after that, I get a flash, and the mode switches to a much smaller font (the final framebuffer font) and the kernel messages written there are already distorted. half a second later (or less) the penguin appears at the top area (undistorted), when the bootup is done I get the following prompt (which again is okay)
Quoted 3 lines
bash-2.05b#typing anything there is distorted again ...
Hrm... this is a a pristine 2.6.16 without any patch applied ? Also, what video chip revision do you have exactly ? (lspci will tell you)
Quoted 10 lines
pressing enter several times leaves 'copies' of the caracters on the screen, forming vertical bars the prompt (bash) is now always fine, the copy one line above (as all the others) is distorted ...
note, the bootup is not much different with older kernels, except for the strange distortions ...
attached my kernel configuration, just in case it is related ...
# CONFIG_VGA_CONSOLE is not setCONFIG_DUMMY_CONSOLE=yCONFIG_FRAMEBUFFER_CONSOLE=y
# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not setCONFIG_FONTS=y
# CONFIG_FONT_8x8 is not set
# CONFIG_FONT_8x16 is not set
CONFIG_FONT_6x11=y
CONFIG_FONT_7x14=y
# CONFIG_FONT_PEARL_8x8 is not set
# CONFIG_FONT_ACORN_8x8 is not set
# CONFIG_FONT_MINI_4x6 is not set
# CONFIG_FONT_SUN8x16 is not set
# CONFIG_FONT_SUN12x22 is not set
# CONFIG_FONT_10x18 is not set
Interesting... I suspect there is an endian bug in the new font code that hits odd sized fonts (or non-multiple-of-8 fonts). Can you try enabling 8x8 and 8x16 instead of 6x11 and 7x14 fonts and tell me if those work ?
Tony: If my suspition is confirmed, I think that's your call :)
Cheers,
Ben.
-------------------------------------------------------
This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory!
http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642
Quoted 7 lines · Benjamin Herrenschmidt
On Mon, 2006-03-27 at 05:37 +0200, Herbert Poetzl wrote:
Interesting... I suspect there is an endian bug in the new font code that hits odd sized fonts (or non-multiple-of-8 fonts). Can you try enabling 8x8 and 8x16 instead of 6x11 and 7x14 fonts and tell me if those work ?Tony: If my suspition is confirmed, I think that's your call :)
It probably is, a remnant of the console rotation code. If that is truly the case, the patch I just sent in another thread should fix it.
Tony
Quoted 7 lines · Antonino A. Daplas
Quoted 4 lines · Benjamin Herrenschmidt
On Mon, 2006-03-27 at 05:37 +0200, Herbert Poetzl wrote:
Interesting... I suspect there is an endian bug in the new font code that hits odd sized fonts (or non-multiple-of-8 fonts). Can you try enabling 8x8 and 8x16 instead of 6x11 and 7x14 fonts and tell me if those work ?Tony: If my suspition is confirmed, I think that's your call :)
It probably is, a remnant of the console rotation code. If that is truly the case, the patch I just sent in another thread should fix it.
I ran into this same bug on my Dual 1GHz Windtunnel G4 with an upgraded GPU (Radeon 9800) in the 2.6.16-rc4 timeframe. Turning off the customized console font selection and reverting to the default list of fonts fixed the problem for me. I think I had the console rotation config option turned on, but I don't have that config any more and can't be sure.
Cheers,
Kyle Moffett
Herbert Poetzl
Acked-byQuoted 20 lines · Antonino A. Daplas
Quoted 19 lines · Herbert Poetzl
Hey Ben!
2.6.16 and 2.6.15-something show a funny behaviour when using the radeonfb driver (for text mode), they kind of twist and break the fonts in various places some characters or parts seem to be mirrored like '[' becoming ']' but not on character boundary but more on N pixels, colors seem to be correct for the characters, and sometimes the font is perfectly fine for larger runs, e.g. I can read the logon prompt fine, but everything I type is garbled ...
just for an example, when I type 'echo "Test"' then all characters are mirrored and cut off on the right side but the locations are as shown above, on enter the T is only a few pixels wide, but the est part is written perfectly fine ... this is a new behaviour and going back to 2.6.13.3 doesn't show this ...
Quoted 7 lines
Quoted 4 lines
if there is some testing I can do for you, or when you need more info, please let me know. here a few details for the machine:
What font are you using? I presume the dimensions are not divisible by 8.
precisely!
Quoted 1 line
Can you try this patch?
yes, I did, and I can confirm this one fixes it for me thanks a lot for the fast response and the quite accurate fix!
best,
Herbert
it's obvious, but if you can make use of that:
Quoted 37 lines
Tony
drivers/video/cfbimgblt.c +1
-1@@ -169,7 +169,7 @@ static inline void slow_imageblit(constwhile (j--) { l--; - color = (*s &1 << (FB_BIT_NR (l))) ? fgcolor : bgcolor; + color = (*s & (1 << l)) ? fgcolor : bgcolor; val |=FB_SHIFT_HIGH (color, shift);/* Did the bitshift spill bits to the next long? */ include/linux/fb.h +0
-3@@ -841,12 +841,10 @@ struct fb_info {#define FB_LEFT_POS (bpp) (32 - bpp)#define FB_SHIFT_HIGH (val, bits) ((val) >> (bits))#define FB_SHIFT_LOW (val, bits) ((val) << (bits)) -#define FB_BIT_NR (b) (7 - (b))#else #define FB_LEFT_POS (bpp) (0)#define FB_SHIFT_HIGH (val, bits) ((val) << (bits))#define FB_SHIFT_LOW (val, bits) ((val) >> (bits)) -#define FB_BIT_NR (b) (b)#endif /* -To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Quoted 1 line · Benjamin Herrenschmidt
On Mon, 2006-03-27 at 05:37 +0200, Herbert Poetzl wrote:
thanks for the quick response, Tony's patch fixed the issue for me, the console fonts are fine again.
Quoted 11 lines
Quoted 11 lines
after that, the screen goes white for half a second and becomes black with a large terminal font on it (the one I get without framebuffer, I think), the text there is printed undistorted ... shortly after that, I get a flash, and the mode switches to a much smaller font (the final framebuffer font) and the kernel messages written there are already distorted. half a second later (or less) the penguin appears at the top area (undistorted), when the bootup is done I get the following prompt (which again is okay)
Quoted 5 lines
Quoted 3 lines
bash-2.05b#typing anything there is distorted again ...
Hrm... this is a a pristine 2.6.16 without any patch applied?
yep!
Quoted 2 lines
Also, what video chip revision do you have exactly? (lspci will tell you)
it did and it should have told you too :)
(it's in the original mail)
Quoted 27 lines
Quoted 10 lines
pressing enter several times leaves 'copies' of the caracters on the screen, forming vertical bars the prompt (bash) is now always fine, the copy one line above (as all the others) is distorted ...
note, the bootup is not much different with older kernels, except for the strange distortions ...
attached my kernel configuration, just in case it is related ...
#
CONFIG_VGA_CONSOLEis not setCONFIG_DUMMY_CONSOLE=yCONFIG_FRAMEBUFFER_CONSOLE=y
#CONFIG_FRAMEBUFFER_CONSOLE_ROTATIONis not setCONFIG_FONTS=y
#CONFIG_FONT_8x8is not set
#CONFIG_FONT_8x16is not set
CONFIG_FONT_6x11=y
CONFIG_FONT_7x14=y
#CONFIG_FONT_PEARL_8x8is not set
#CONFIG_FONT_ACORN_8x8is not set
#CONFIG_FONT_MINI_4x6is not set
#CONFIG_FONT_SUN8x16is not set
#CONFIG_FONT_SUN12x22is not set
#CONFIG_FONT_10x18is not set
Quoted 4 lines
Interesting... I suspect there is an endian bug in the new font code that hits odd sized fonts (or non-multiple-of-8 fonts). Can you try enabling 8x8 and 8x16 instead of 6x11 and 7x14 fonts and tell me if those work ?
yep, 8x16 font works as it seems ...
Quoted 1 line
Tony: If my suspition is confirmed, I think that's your call :)
best,
Herbert
Quoted 8 lines
Cheers,
Ben.-
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/