cyblafb in kernel 2.6.16: corrupted display in Xfree86
Hi!
The cyblafb driver workes fine for me up to Linux kernel 2.6.15.6, but with 2.6.16 I get the following problem:
After booting the system, the framebuffer console comes up fine, but when xdm starts up the X server, I get this diplay:
http://ftp.intevation.de/users/thomas/cyblafb/cyblafb-1.jpg
After switching to the console with Ctrl-Alt-F1 and back to X:
http://ftp.intevation.de/users/thomas/cyblafb/cyblafb-2.jpg
When I use Ctrl-Alt-Backspace to restart xdm everything looks fine:
http://ftp.intevation.de/users/thomas/cyblafb/cyblafb-3.jpg
I use Debian sarge on a Lex Light (CV860A board):
0000:01:00.0 VGA compatible controller: Trident Microsystems CyberBlade/i1 (rev 6a) (prog-if 00 [VGA])
Subsystem: Trident Microsystems CyberBlade/i1
Flags: bus master, 66MHz, medium devsel, latency 32, IRQ 5
Memory at e4000000 (32-bit, non-prefetchable) [size=8M]
Memory at e5000000 (32-bit, non-prefetchable) [size=128K]
Memory at e4800000 (32-bit, non-prefetchable) [size=8M]
Expansion ROM at 10000000 [disabled] [size=64K]
Capabilities: <available only to root>Resolution 1152x864 pixels (16 bpp) with fbdev driver in XF86Config-4.
/etc/fb.modes:
mode "1152x864-70"
# D: 100.0 MHz, H: 66.138 kHz, V: 69.99 Hz
geometry 1152 864 1152 864 8
timings 10000 168 40 57 13 152 11
hsync high
vsync highendmode
To enable this resolution I use:
/etc/rcS.d/S42cyblafb:/sbin/modprobe cyblafb bpp=16 mode=1024x768 ref=85 && /usr/sbin/fbset -a 1152x864-70 (because the cyblafb driver doesn't understand mode=1152x864 as parameter)
XFree86 is standard Debian sarge: 4.3.0.dfsg.1-14sarge1
One further thing to note is that I compiled 2.6.15.6 with gcc 2.95.4 and 2.6.16 with gcc 3.4.3, can this make a difference?
Any idea what's happening here?
Regards,
Thomas
Signature · 9 lines
Email: [email protected] http://intevation.de/~thomas/ ------------------------------------------------------- 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
Hi Thomas!
Quoted 6 lines
/etc/fb.modes:
mode "1152x864-70"
# D: 100.0 MHz, H: 66.138 kHz, V: 69.99 Hz
geometry 1152 864 1152 864 8
That is very slow. Use geometry 1152 864 2048 4096 8
Quoted 11 lines
timings 10000 168 40 57 13 152 11 hsync high vsync highendmode
To enable this resolution I use:
/etc/rcS.d/S42cyblafb:/sbin/modprobecyblafb bpp=16 mode=1024x768 ref=85 &&/usr/sbin/fbset-a 1152x864-70
/sbin/modprobe cyblafb && /usr/sbin/fbset -a 1152x864-70 should be sufficient.
Quoted 4 lines
(because the cyblafb driver doesn't understand mode=1152x864 as parameter)
XFree86 is standard Debian sarge: 4.3.0.dfsg.1-14sarge1
Quoted 10 lines
One further thing to note is that I compiled 2.6.15.6 with gcc 2.95.4 and 2.6.16 with gcc 3.4.3, can this make a difference?
Any idea what's happening here?
Regards,
Thomas
I cannot test 1152x864 on my system because my monitor does not understand that resolution. But if it worked previously it should work now ;-)
Are there any problems on the framebuffer console? You wrote that the fb console comes up fine, but please confirm that scrolling is ok.
Are there any problems left after you reach the state of your third picture? Switching between the fb console and X works flawlessly then?
Are there any problems if you use the standard resolutions, eg 1024x768 or 1280x1024?
Try a fbset -vxres 2048 -vyres 4096 after your first fbset. Does that change anything?
Please send dmesg logs of kernel 2.6.15.6 and 2.6.16 after adding verbosity=2 to the modprobe of cyblafb - everything from the point of loading cyblafb to your third picture. Also include the X server logs. Maybe it´s a good idea to send those logs to my private address [email protected].
cu,
Knut
-------------------------------------------------------
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 6 lines · Knut Petersen
Quoted 4 lines
/etc/fb.modes:
mode "1152x864-70"
# D: 100.0 MHz, H: 66.138 kHz, V: 69.99 Hz
geometry 1152 864 1152 864 8That is very slow. Use geometry 1152 864 2048 4096 8
This only works with kernel 2.6.16, not with 2.6.15.6
Quoted 8 lines
Quoted 5 lines
To enable this resolution I use:
/etc/rcS.d/S42cyblafb:/sbin/modprobecyblafb bpp=16 mode=1024x768 ref=85 &&/usr/sbin/fbset-a 1152x864-70
/sbin/modprobecyblafb &&/usr/sbin/fbset-a 1152x864-70 should be sufficient.
Yes, it is.
Quoted 2 lines
Quoted 2 lines
One further thing to note is that I compiled 2.6.15.6 with gcc 2.95.4 and 2.6.16 with gcc 3.4.3, can this make a difference?
I compiled 2.6.15.6 with gcc 3.4.3, too, just to make sure that this makes no difference.
Quoted 2 lines
I cannot test 1152x864 on my system because my monitor does not understand that resolution. But if it worked previously it should work now ;-)
Maybe you can test it with your monitor, too, see below.
Quoted 3 lines
Are there any problems on the framebuffer console? You wrote that the fb console
comes up fine, but please confirm that scrolling is ok.
Scrolling in fbcon works perfectly, with or without xdm started.
Quoted 2 lines
Are there any problems left after you reach the state of your third picture?
No problems then.
Quoted 1 line
Switching between the fb console and X works flawlessly then?
Yes, no problem.
Quoted 2 lines
Are there any problems if you use the standard resolutions, eg 1024x768 or 1280x1024?
No and yes:
Everything works fine when using/sbin/modprobe cyblafb bpp=16 mode=1280x1024 ref=85 but I get the same problems if I do:/sbin/modprobe cyblafb && /usr/sbin/fbset -a 1280x1024-85
Quoted 2 lines
Try a fbset -vxres 2048 -vyres 4096 after your first fbset. Does that change anything?
Nothing changed.
Quoted 7 lines
Please send dmesg logs of kernel 2.6.15.6 and 2.6.16 after adding verbosity=2
to the modprobe of cyblafb - everything from the point of loading cyblafb to your third
picture. Also include the X server logs. Maybe it?s a good idea to send those logs to my
private address [email protected].
I'll do so.
Thomas
Signature · 9 lines
Email: [email protected] http://intevation.de/~thomas/ ------------------------------------------------------- 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 8 lines · Thomas Arendsen Hein
Quoted 3 lines
That is very slow. Use geometry 1152 864 2048 4096 8
This only works with kernel 2.6.16, not with 2.6.15.6
ACK
Quoted 4 lines
Quoted 3 lines
Are there any problems if you use the standard resolutions, eg 1024x768 or 1280x1024?
Quoted 8 lines
No and yes:
Everything works fine when using/sbin/modprobecyblafb bpp=16 mode=1280x1024 ref=85 but I get the same problems if I do:/sbin/modprobecyblafb &&/usr/sbin/fbset-a 1280x1024-85
Please Try:
/sbin/modprobe cyblafb && /usr/sbin/fbset -a 1280x1024-85 -depth 16
/sbin/modprobe cyblafb && /usr/sbin/fbset -g 1152 864 1152 864 8 -t 10000 168 40 57 13 152 11
/sbin/modprobe cyblafb && /usr/sbin/fbset -g 1152 864 1152 864 16 -t 10000 168 40 57 13 152 11
/sbin/modprobe cyblafb && /usr/sbin/fbset -g 1152 864 2048 4096 8 -t 10000 168 40 57 13 152 11
/sbin/modprobe cyblafb && /usr/sbin/fbset -g 1152 864 2048 2048 16 -t 10000 168 40 57 13 152 11
Is there a special reason not to use the X* trident driver?
cu,
Knut
-------------------------------------------------------
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 6 lines · Knut Petersen
Quoted 3 lines · Thomas Arendsen Hein
Quoted 1 line
That is very slow. Use geometry 1152 864 2048 4096 8
This only works with kernel 2.6.16, not with 2.6.15.6
ACK
Wow, scrolling in the console is definitely _much_ faster with this:
time for "find /dev" on kernel 2.6.16:
1152/864 2048/4096 8bpp 18s 0.56s 16bpp 39s 0.65s
Quoted 9 lines
Quoted 8 lines
Quoted 2 lines
Are there any problems if you use the standard resolutions, eg 1024x768 or 1280x1024?
No and yes:
Everything works fine when using/sbin/modprobecyblafb bpp=16 mode=1280x1024 ref=85 but I get the same problems if I do:/sbin/modprobecyblafb &&/usr/sbin/fbset-a 1280x1024-85
Quoted 3 lines
Please Try:
/sbin/modprobecyblafb &&/usr/sbin/fbset-a 1280x1024-85 -depth 16
works
Quoted 2 lines
/sbin/modprobecyblafb &&/usr/sbin/fbset-g 1152 864 1152 864 8 -t 10000 168 40 57 13 152 11
doesn't work
Quoted 2 lines
/sbin/modprobecyblafb &&/usr/sbin/fbset-g 1152 864 1152 864 16 -t 10000 168 40 57 13 152 11
works
Quoted 2 lines
/sbin/modprobecyblafb &&/usr/sbin/fbset-g 1152 864 2048 4096 8 -t 10000 168 40 57 13 152 11
doesn't work
Quoted 2 lines
/sbin/modprobecyblafb &&/usr/sbin/fbset-g 1152 864 2048 2048 16 -t 10000 168 40 57 13 152 11
works
With /sbin/modprobe cyblafb && /usr/sbin/fbset -a 1152x864-70 -depth 16 (changing fb.modes would probably help, too) everything is back to normal for me.
I think the extra colors on console won't hurt, now that I know about the 2048/4096 setting.
Quoted 1 line
Is there a special reason not to use the X* trident driver?
Yes, I had crashes when using more than one X display (e.g. one local xdm and one "X -query other :1"), and switching between X and console is _much_ faster this way.
Many thanks for the help (and for cyblafb in general), Thomas
Signature · 9 lines
Email: [email protected] http://intevation.de/~thomas/ ------------------------------------------------------- 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 36 lines · Thomas Arendsen Hein
Quoted 3 lines
/sbin/modprobecyblafb &&/usr/sbin/fbset-a 1280x1024-85 -depth 16works
Quoted 3 lines
/sbin/modprobecyblafb &&/usr/sbin/fbset-g 1152 864 1152 864 8 -t 10000 168 40 57 13 152 11doesn't work
Quoted 3 lines
/sbin/modprobecyblafb &&/usr/sbin/fbset-g 1152 864 1152 864 16 -t 10000 168 40 57 13 152 11works
Quoted 3 lines
/sbin/modprobecyblafb &&/usr/sbin/fbset-g 1152 864 2048 4096 8 -t 10000 168 40 57 13 152 11doesn't work
Quoted 3 lines
/sbin/modprobecyblafb &&/usr/sbin/fbset-g 1152 864 2048 2048 16 -t 10000 168 40 57 13 152 11
Quoted 11 lines
works
With
/sbin/modprobecyblafb &&/usr/sbin/fbset-a 1152x864-70 -depth 16 (changing fb.modes would probably help, too) everything is back to normal for me.I think the extra colors on console won't hurt, now that I know about the 2048/4096 setting.
So the problem is that the 8bpp modes do not work with the
X framebuffer driver. Please report that bug, I think X is responsible.
Quoted 7 lines
Quoted 3 lines
Is there a special reason not to use the X* trident driver?
Yes, I had crashes when using more than one X display (e.g. one local xdm and one "X -query other :1"),
Try it again, the recent cyblafb works around X and xdm bugs that could have caused that crashes.
Quoted 5 lines
and switching between X and
console is _much_ faster this way.
I doubt that ... switching between X trident and cyblafb and back again takes only a few miliseconds here.
cu,
knut
-------------------------------------------------------
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 8 lines · Knut Petersen
Quoted 3 lines · Thomas Arendsen Hein
With
/sbin/modprobecyblafb &&/usr/sbin/fbset-a 1152x864-70 -depth 16 (changing fb.modes would probably help, too) everything is back to normal for me.So the problem is that the 8bpp modes do not work with the
X framebuffer driver. Please report that bug, I think X is responsible.
But why did it work up to 2.6.15.6 then?
I know for sure that I had 8bpp in fb console and 16bpp in X.
Quoted 7 lines
Quoted 4 lines
Quoted 1 line
Is there a special reason not to use the X* trident driver?
Yes, I had crashes when using more than one X display (e.g. one local xdm and one "X -query other :1"),
Try it again, the recent cyblafb works around X and xdm bugs that could have caused that crashes.
No, I had crashes with non-fb console and trident X driver.
I never tested if cyblafb console and trident X have problems.
Quoted 5 lines
Quoted 2 lines
and switching between X and
console is _much_ faster this way.I doubt that ... switching between X trident and cyblafb and back again takes only a few miliseconds here.
Maybe I had little variations in the monitor timings which caused the monitor to re-sync. With X on cyblafb this is obviously always identical.
I've found another problem with the new cyblafb under X which didn't happen before: DPMS no longer turns of the monitor. At the time where DPMS suspend kicked in before, now the xlock clock simply stops updating, but is still visible (xlock -mode dclock).
Thomas
Signature · 9 lines
Email: [email protected] http://intevation.de/~thomas/ ------------------------------------------------------- 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 4 lines · Thomas Arendsen Hein
I've found another problem with the new cyblafb under X which didn't happen before: DPMS no longer turns of the monitor. At the time where DPMS suspend kicked in before, now the xlock clock simply stops updating, but is still visible (xlock -mode dclock).
... and DPMS on the fb console still works fine.
Thomas
Signature · 9 lines
Email: [email protected] http://intevation.de/~thomas/ ------------------------------------------------------- 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 12 lines · Thomas Arendsen Hein
Quoted 9 lines · Knut Petersen
Quoted 5 lines · Thomas Arendsen Hein
With
/sbin/modprobecyblafb &&/usr/sbin/fbset-a 1152x864-70 -depth 16 (changing fb.modes would probably help, too) everything is back to normal for me.
Quoted 10 lines
Quoted 4 lines
So the problem is that the 8bpp modes do not work with the
X framebuffer driver. Please report that bug, I think X is responsible.But why did it work up to 2.6.15.6 then?
I know for sure that I had 8bpp in fb console and 16bpp in X.
Well, cyblafb does not use vga style panning registers any longer. That change is necessary to support ywrap scrolling and to allow screen rotation. The trident X driver does not know about the graphics engine registers I use instead, and I had to include some hacks to allow that to work.
Try to change
#define CYBLAFB_KD_GRAPHICS_QUIRK 1
to
#define CYBLAFB_KD_GRAPHICS_QUIRK 0
in cyblafb.c for purely diagnostic purposes. Does that restore the old behaviour for you?
cu,
Knut
-------------------------------------------------------
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 10 lines · Thomas Arendsen Hein
Quoted 4 lines · Thomas Arendsen Hein
I've found another problem with the new cyblafb under X which didn't happen before: DPMS no longer turns of the monitor. At the time where DPMS suspend kicked in before, now the xlock clock simply stops updating, but is still visible (xlock -mode dclock).
... and DPMS on the fb console still works fine.
Thomas
Try adding
printk("fb_blank: blank value %i\n", blank);
in drivers/video/fbmem.c:fb_blank(struct fb_info *info, int blank)
just before the call to info->fbops->fb_blank().
Try blanking your screen in X, look at dmesg and let us know what is the blank value used by X.
Tony
-------------------------------------------------------
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