From owner-freebsd-hackers Tue Jan 27 22:34:15 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id WAA02656 for hackers-outgoing; Tue, 27 Jan 1998 22:34:15 -0800 (PST) (envelope-from owner-freebsd-hackers@FreeBSD.ORG) Received: from outmail.utsunomiya-u.ac.jp (outmail.utsunomiya-u.ac.jp [160.12.196.3]) by hub.freebsd.org (8.8.8/8.8.8) with SMTP id WAA02614; Tue, 27 Jan 1998 22:33:34 -0800 (PST) (envelope-from yokota@zodiac.mech.utsunomiya-u.ac.jp) Received: by outmail.utsunomiya-u.ac.jp id AA06475; Wed, 28 Jan 1998 15:33:23 +0900 Received: from zodiac.mech.utsunomiya-u.ac.jp (zodiac.mech.utsunomiya-u.ac.jp [160.12.42.1]) by zodiac.mech.utsunomiya-u.ac.jp (8.7.6+2.6Wbeta7/3.4W/zodiac-May96) with ESMTP id PAA25860; Wed, 28 Jan 1998 15:40:46 +0900 (JST) Message-Id: <199801280640.PAA25860@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 In-Reply-To: Your message of "27 Jan 1998 20:58:37 +0100." References: Date: Wed, 28 Jan 1998 15:40:35 +0900 From: Kazutaka YOKOTA Sender: owner-freebsd-hackers@FreeBSD.ORG Precedence: bulk >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