From owner-freebsd-bugs Mon Dec 30 07:00:05 1996 Return-Path: Received: (from root@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id HAA29976 for bugs-outgoing; Mon, 30 Dec 1996 07:00:05 -0800 (PST) Received: (from gnats@localhost) by freefall.freebsd.org (8.8.4/8.8.4) id HAA29969; Mon, 30 Dec 1996 07:00:03 -0800 (PST) Resent-Date: Mon, 30 Dec 1996 07:00:03 -0800 (PST) Resent-Message-Id: <199612301500.HAA29969@freefall.freebsd.org> Resent-From: gnats (GNATS Management) Resent-To: freebsd-bugs Resent-Reply-To: FreeBSD-gnats@freefall.FreeBSD.org, brianc@netrover.com (Brian Campbell) Received: from irz301.inf.tu-dresden.de (irz301.inf.tu-dresden.de [141.76.1.11]) by freefall.freebsd.org (8.8.4/8.8.4) with SMTP id GAA28874 for ; Mon, 30 Dec 1996 06:51:12 -0800 (PST) Received: from sax.sax.de (sax.sax.de [193.175.26.33]) by irz301.inf.tu-dresden.de (8.6.12/8.6.12-s1) with ESMTP id PAA17343 for ; Mon, 30 Dec 1996 15:51:03 +0100 Received: (from uucp@localhost) by sax.sax.de (8.6.12/8.6.12-s1) with UUCP id PAA05152 for FreeBSD-gnats-submit@freebsd.org; Mon, 30 Dec 1996 15:51:02 +0100 Received: (from j@localhost) by uriah.heep.sax.de (8.8.4/8.6.9) id VAA19038; Sat, 28 Dec 1996 21:16:54 +0100 (MET) Message-Id: <199612282016.VAA19038@uriah.heep.sax.de> Date: Sat, 28 Dec 1996 21:16:54 +0100 (MET) From: brianc@netrover.com (Brian Campbell) Reply-To: brianc@netrover.com (Brian Campbell) To: FreeBSD-gnats-submit@freebsd.org X-Send-Pr-Version: 3.2 Subject: kern/2327: `Green' saver for pcvt Sender: owner-bugs@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >Number: 2327 >Category: kern >Synopsis: `Green' saver for pcvt >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-bugs >State: open >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Dec 30 07:00:02 PST 1996 >Last-Modified: >Originator: Brian Campbell >Organization: >Release: FreeBSD 3.0-CURRENT i386 >Environment: pcvt misses a "green" saver >Description: Submission of a screensaver mode that enables power-save mode. (In case anybody wonders: Brian has sent this to Jordan, who has sent it to Joerg, who decided to send-pr it. :) >How-To-Repeat: >Fix: --- sys/i386/isa/pcvt/pcvt_sup.c Tue Sep 10 04:27:14 1996 +++ sys.new/i386/isa/pcvt/pcvt_sup.c Wed Oct 9 21:39:53 1996 @@ -1974,6 +1974,30 @@ } } +#if PCVT_GREENSAVER +#define TSIDX IO_VGA+0x04 /* timing sequencer idx */ +#define TSREG IO_VGA+0x05 /* timing sequencer data */ + +static void +green_saver(int blank) +{ + const crtc_addr = addr_6845; + u_char val; + if (blank) { + outb(TSIDX, 0x01); val = inb(TSREG); + outb(TSIDX, 0x01); outb(TSREG, val | 0x20); + outb(crtc_addr, 0x17); val = inb(crtc_addr + 1); + outb(crtc_addr + 1, val & ~0x80); + } + else { + outb(TSIDX, 0x01); val = inb(TSREG); + outb(TSIDX, 0x01); outb(TSREG, val & 0xDF); + outb(crtc_addr, 0x17); val = inb(crtc_addr + 1); + outb(crtc_addr + 1, val | 0x80); + } +} +#endif + /*---------------------------------------------------------------------------* * we were timed out *---------------------------------------------------------------------------*/ @@ -2053,6 +2077,9 @@ #endif /* PCVT_PRETTYSCRNS */ sw_cursor(0); /* cursor off on mda/cga */ +#if PCVT_GREENSAVER + green_saver(1); +#endif } splx(x); } @@ -2096,6 +2123,9 @@ #if PCVT_PRETTYSCRNS vgapaletteio(7 /* LIGHTGRAY */, &vsp->palette[7], 1); #endif /* PCVT_PRETTYSCRNS */ +#if PCVT_GREENSAVER + green_saver(0); +#endif } scrnsv_active = 0; >Audit-Trail: >Unformatted: