Date: Wed, 28 Jan 1998 15:40:35 +0900 From: Kazutaka YOKOTA <yokota@zodiac.mech.utsunomiya-u.ac.jp> To: dag-erli@ifi.uio.no (Dag-Erling Coidan Sm rgrav) Cc: hackers@FreeBSD.ORG, msmith@FreeBSD.ORG, yokota@zodiac.mech.utsunomiya-u.ac.jp Subject: Re: Graphical screen saver Message-ID: <199801280640.PAA25860@zodiac.mech.utsunomiya-u.ac.jp> In-Reply-To: Your message of "27 Jan 1998 20:58:37 %2B0100." <xzpyb01it8y.fsf@grjottunagard.ifi.uio.no> References: <xzpyb01it8y.fsf@grjottunagard.ifi.uio.no>
next in thread | previous in thread | raw e-mail | index | archive | help
>The source is in /pub/FreeBSD/incoming/logo_saver.tgz on wcarchive. >You'll need to patch syscons.c to make it work; a unified diff and >rudimentary installation instructions are included in the tarball. > >As always, I appreciate feedback of any kind... I had a quick look at your graphical screen saver code. (And I have been following discussion between you and msmith :-) A couple of comments: The patch for syscons looks reasonable to me. (How do you think, Soeren?) When I touched this part of syscons last time, I didn't consider support for graphical savers (because at the time there was none ;-< I wonder if it's a good idea to let the screen saver to reschedule itself from inside the saver module. With the above patch applied, syscons will periodically call the saver module. That should be sufficient for most purposes, I think. (Yet another timeout routine closely tied to syscons will add much complication...) The following fragment shows the flow I would suggest. logo_saver(int blank) { if (!blank) { /* restore the video mode */ ..... } else { if (scrn_blanked <= 0) { scrn_blanked = 1; /* switch video mode */ ..... logo_update(); } else { /* if we want to update the screen in every other call, we can do the following */ if (++scrn_blanked <= 2) return; scrn_blanked = 1; /* update the logo */ logo_update(); } } } In your code, video mode switching is protected by a splhigh()/splx() pair. I think splhigh() is overkill. We had better use spltty() instead. We have to be careful about VT switching while the graphical saver is active. I will check several things in syscons and contact you later. (I suspect we need to patch syscons...) Kazu
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801280640.PAA25860>