From: "Antonino A. Daplas" <adaplas@gmail.com>
To: linux-fbdev-devel@lists.sourceforge.net
Cc: Knut Petersen <Knut_Petersen@t-online.de>
Subject: Re: BUG: fb_imageblit called before fb_check_var and fb_set_par function
Date: Fri, 26 Aug 2005 02:09:14 +0800 [thread overview]
Message-ID: <430E094A.9030603@gmail.com> (raw)
In-Reply-To: <430DEAD0.8070403@t-online.de>
Knut Petersen wrote:
> Hi Antonino,
>
> BTW: Thanks to Jochen Hein for testing cyblafb and reporting the
> very long timeout after switching from X to console!
>
>>> 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.
I tried to duplicate the problem, but failed.
First, I inserted stub calls, disable_device(info). I inserted it in fbcon_blank(),
if blank != 0 and mode_switch != 0. I also inserted another one in fbcon_switch(),
if vc->vc_mode == KD_GRAPHICS. These are the circumstances when the console is
about to be acquired by a graphics apps like X. Then the stub function,
disable_device(), in the fbdev driver, just sets a flag. This flag is cleared
on a set_par(). This flag is also checked by the sync, imageblit, fillrect and
copyarea functions, which prints something when this flag != 0. I'm not getting
any messages. Which, if I interpret this correctly, that a set_par will always
be called before any of the drawing functions.
The circumstance I can think of that this can happen is when the app fails to
set the VT to KD_GRAPHICS mode, but I'm pretty sure kdm does it properly, in
my machine at least (Suse 9.0).
Perhaps, if you have the time, you can instrument it better so we can pinpoint
where this unwanted calls are coming from. Months were spent trying to fix this
problem, mainly by BenH, and I don't want any stones left unturned.
Tony
PS: I don't know the console subsystem that well, so there may be pathways that
I don't know about.
-------------------------------------------------------
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
next prev parent reply other threads:[~2005-08-25 18:09 UTC|newest]
Thread overview: 10+ messages / expand[flat|nested] mbox.gz Atom feed top
2005-08-25 12:26 BUG: fb_imageblit called before fb_check_var and fb_set_par function Knut Petersen
2005-08-25 14:05 ` Antonino A. Daplas
2005-08-25 15:59 ` Knut Petersen
2005-08-25 18:09 ` Antonino A. Daplas [this message]
2005-08-26 8:23 ` Knut Petersen
2005-08-26 14:01 ` Antonino A. Daplas
2005-08-26 16:30 ` Knut Petersen
2005-08-26 17:00 ` Antonino A. Daplas
2005-08-26 18:21 ` Knut Petersen
2005-08-27 0:36 ` Antonino A. Daplas
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=430E094A.9030603@gmail.com \
--to=adaplas@gmail.com \
--cc=Knut_Petersen@t-online.de \
--cc=linux-fbdev-devel@lists.sourceforge.net \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.