Date: Sat, 28 Dec 1996 21:16:54 +0100 (MET) From: brianc@netrover.com (Brian Campbell) To: FreeBSD-gnats-submit@freebsd.org Subject: kern/2327: `Green' saver for pcvt Message-ID: <199612282016.VAA19038@uriah.heep.sax.de> Resent-Message-ID: <199612301500.HAA29969@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>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:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199612282016.VAA19038>
