summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/green
diff options
context:
space:
mode:
authoryokota <yokota@FreeBSD.org>1999-06-22 14:14:06 +0000
committeryokota <yokota@FreeBSD.org>1999-06-22 14:14:06 +0000
commit4f4eb0cfe54e001639240b3b63551c42280cdcc0 (patch)
tree75738e04df5c55c7d14fd6fb083ab1062bd92a85 /sys/dev/syscons/green
parentd252fb51781d3bcdc1697ebd89678c9a00d94124 (diff)
downloadFreeBSD-src-4f4eb0cfe54e001639240b3b63551c42280cdcc0.zip
FreeBSD-src-4f4eb0cfe54e001639240b3b63551c42280cdcc0.tar.gz
The second phase of syscons reorganization.
- Split syscons source code into manageable chunks and reorganize some of complicated functions. - Many static variables are moved to the softc structure. - Added a new key function, PREV. When this key is pressed, the vty immediately before the current vty will become foreground. Analogue to PREV, which is usually assigned to the PrntScrn key. PR: kern/10113 Submitted by: Christian Weisgerber <naddy@mips.rhein-neckar.de> - Modified the kernel console input function sccngetc() so that it handles function keys properly. - Reorganized the screen update routine. - VT switching code is reorganized. It now should be slightly more robust than before. - Added the DEVICE_RESUME function so that syscons no longer hooks the APM resume event directly. - New kernel configuration options: SC_NO_CUTPASTE, SC_NO_FONT_LOADING, SC_NO_HISTORY and SC_NO_SYSMOUSE. Various parts of syscons can be omitted so that the kernel size is reduced. SC_PIXEL_MODE Made the VESA 800x600 mode an option, rather than a standard part of syscons. SC_DISABLE_DDBKEY Disables the `debug' key combination. SC_ALT_MOUSE_IMAGE Inverse the character cell at the mouse cursor position in the text console, rather than drawing an arrow on the screen. Submitted by: Nick Hibma (n_hibma@FreeBSD.ORG) SC_DFLT_FONT makeoptions "SC_DFLT_FONT=_font_name_" Include the named font as the default font of syscons. 16-line, 14-line and 8-line font data will be compiled in. This option replaces the existing STD8X16FONT option, which loads 16-line font data only. - The VGA driver is split into /sys/dev/fb/vga.c and /sys/isa/vga_isa.c. - The video driver provides a set of ioctl commands to manipulate the frame buffer. - New kernel configuration option: VGA_WIDTH90 Enables 90 column modes: 90x25, 90x30, 90x43, 90x50, 90x60. These modes are mot always supported by the video card. PR: i386/7510 Submitted by: kbyanc@freedomnet.com and alexv@sui.gda.itesm.mx. - The header file machine/console.h is reorganized; its contents is now split into sys/fbio.h, sys/kbio.h (a new file) and sys/consio.h (another new file). machine/console.h is still maintained for compatibility reasons. - Kernel console selection/installation routines are fixed and slightly rebumped so that it should now be possible to switch between the interanl kernel console (sc or vt) and a remote kernel console (sio) again, as it was in 2.x, 3.0 and 3.1. - Screen savers and splash screen decoders Because of the header file reorganization described above, screen savers and splash screen decoders are slightly modified. After this update, /sys/modules/syscons/saver.h is no longer necessary and is removed.
Diffstat (limited to 'sys/dev/syscons/green')
-rw-r--r--sys/dev/syscons/green/green_saver.c82
1 files changed, 12 insertions, 70 deletions
diff --git a/sys/dev/syscons/green/green_saver.c b/sys/dev/syscons/green/green_saver.c
index 9decd72..103154b 100644
--- a/sys/dev/syscons/green/green_saver.c
+++ b/sys/dev/syscons/green/green_saver.c
@@ -25,93 +25,35 @@
* (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
* THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
*
- * $Id: green_saver.c,v 1.14 1998/11/04 03:49:38 peter Exp $
+ * $Id: green_saver.c,v 1.15 1999/01/11 03:18:48 yokota Exp $
*/
#include <sys/param.h>
#include <sys/systm.h>
#include <sys/kernel.h>
#include <sys/module.h>
+#include <sys/consio.h>
+#include <sys/fbio.h>
-#include <dev/fb/vgareg.h>
-
-#include <i386/isa/isa.h>
-
-#include <saver.h>
+#include <dev/fb/fbreg.h>
+#include <dev/fb/splashreg.h>
+#include <dev/syscons/syscons.h>
static int
green_saver(video_adapter_t *adp, int blank)
{
- int crtc_addr;
- u_char val;
-
- crtc_addr = adp->va_crtc_addr;
- if (blank) {
- switch (adp->va_type) {
- case KD_VGA:
- 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);
- break;
- case KD_EGA:
- /* not yet done XXX */
- break;
- case KD_CGA:
- outb(crtc_addr + 4, 0x25);
- break;
- case KD_MONO:
- case KD_HERCULES:
- outb(crtc_addr + 4, 0x21);
- break;
- default:
- break;
- }
- }
- else {
- switch (adp->va_type) {
- case KD_VGA:
- 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);
- break;
- case KD_EGA:
- /* not yet done XXX */
- break;
- case KD_CGA:
- outb(crtc_addr + 4, 0x2d);
- break;
- case KD_MONO:
- case KD_HERCULES:
- outb(crtc_addr + 4, 0x29);
- break;
- default:
- break;
- }
- }
+ (*vidsw[adp->va_index]->blank_display)(adp,
+ (blank) ? V_DISPLAY_STAND_BY
+ : V_DISPLAY_ON);
return 0;
}
static int
green_init(video_adapter_t *adp)
{
- switch (adp->va_type) {
- case KD_MONO:
- case KD_HERCULES:
- case KD_CGA:
- /*
- * `green' saver is not fully implemented for MDA and CGA.
- * It simply blanks the display instead.
- */
- case KD_VGA:
- break;
- case KD_EGA:
- /* EGA is yet to be supported */
- default:
- return ENODEV;
- }
- return 0;
+ if ((*vidsw[adp->va_index]->blank_display)(adp, V_DISPLAY_ON) == 0)
+ return 0;
+ return ENODEV;
}
static int
OpenPOWER on IntegriCloud