Re: BUG: fb_imageblit called before fb_check_var and fb_set_par function
flat view
From: Knut Petersen <hidden>
Date: 2005-08-25 15:56:40
Hi Antonino, BTW: Thanks to Jochen Hein for testing cyblafb and reporting the very long timeout after switching from X to console!
quoted
I never had expected that upon switching from X to a linux console drawing functions like fb_imageblit would be called before the fb_check_var and fb_set_par functions have been called. But that´s definitely the case.I'm surprised. That was a problem in earlier versions of the kernel but I think that was fixed. If you look at fbcon code, all calls to drawing functions:
My system is based on SuSE 9.2. Kernel 2.6.13-rc7 1. If I do compile cyblafb as a module, there is no problem. 2. If I compile cyblafb into the kernel, there is no problem if the first runlevel is 3 and I switch to runlevel 5 after login to a console. 3. If I compile cyblafb into the kernel, the problem is 100% reproducible if the first runlevel is 5. ps ax -H in that case: 1342 ? Ss 0:00 /usr/sbin/cron 1352 ? Ss 0:00 /usr/sbin/gpm -m /dev/ttyS0 -t ms 1362 ? S 0:00 /opt/kde3/bin/kdm 1385 ? S 0:20 /usr/X11R6/bin/X -nolisten tcp -br vt7 -auth /var/lib/xdm/authdir/authfiles/A:0-Zgg52m 1392 ? S 0:00 -:0 1681 ? S 0:00 /bin/sh /usr/X11R6/bin/kde 1716 ? S 0:00 gpg-agent --daemon --no-detach --keep-display /bin/bash /etc/X11/xinit/xinitrc 1786 ? S 0:00 kwrapper ksmserver 1648 ? Ss 0:00 login -- root 1744 tty1 Ss+ 0:00 -bash 1649 tty2 Ss+ 0:00 /sbin/mingetty tty2 The very first time I switch back from X to a linux console the bug is triggered. cyblafb_sync() , called from cyblafb_imageblit(), times out because mmio is switched off. Then a number of drawing functions is called before the checkvar() and the setpar() are executed. Let´s count in /var/log/messages .... exactly 64 calls. 64 (rows) * 16 (font height) = 1024 (screen height). I have not verified that all those calls are imageblits, but it seems that somebody wants to redraw the screen. After that the bug never triggers again. I wonder why there should be a difference between kdm executed first or login executed first, but that´s the case. Feel free to send patches. cu, Knut ------------------------------------------------------- SF.Net email is Sponsored by the Better Software Conference & EXPO September 19-22, 2005 * San Francisco, CA * Development Lifecycle Practices Agile & Plan-Driven Development * Managing Projects & Teams * Testing & QA Security * Process Improvement & Measurement * http://www.sqe.com/bsce5sf