summaryrefslogtreecommitdiffstats
path: root/sys/dev/syscons/syscons.c
diff options
context:
space:
mode:
authordelphij <delphij@FreeBSD.org>2005-05-29 08:43:44 +0000
committerdelphij <delphij@FreeBSD.org>2005-05-29 08:43:44 +0000
commitd85e2a245dcc8641613836c5e18ff42c27142b88 (patch)
treeaab9212340bf7a27e76d41fc69335774ce01644e /sys/dev/syscons/syscons.c
parent0f324ed5e81e771192910f591b74e28af9e1141a (diff)
downloadFreeBSD-src-d85e2a245dcc8641613836c5e18ff42c27142b88.zip
FreeBSD-src-d85e2a245dcc8641613836c5e18ff42c27142b88.tar.gz
Add VESA mode support for syscons, which enables the support of 15, 16,
24, and 32 bit modes. To use that, syscons(4) must be built with the compile time option 'options SC_PIXEL_MODE', and VESA support (a.k.a. vesa.ko) must be either loaded, or be compiled into the kernel. Do not return EINVAL when the mouse state is changed to what it already is, which seems to cause problems when you have two mice attached, and applications are not likely obtain useful information through the EINVAL caused by showing the mouse pointer twice. Teach vidcontrol(8) about mode names like MODE_<NUMBER>, where <NUMBER> is the video mode number from the vidcontrol -i mode output. Also, revert the video mode if something fails. Obtained from: DragonFlyBSD Discussed at: current@ with patch attached [1] PR: kern/71142 [2] Submitted by: Xuefeng DENG <dsnofe at msn com> [1], Cyrille Lefevre <cyrille dot lefevre at laposte dot net> [2]
Diffstat (limited to 'sys/dev/syscons/syscons.c')
-rw-r--r--sys/dev/syscons/syscons.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/sys/dev/syscons/syscons.c b/sys/dev/syscons/syscons.c
index bc81080..238c83f 100644
--- a/sys/dev/syscons/syscons.c
+++ b/sys/dev/syscons/syscons.c
@@ -2,6 +2,9 @@
* Copyright (c) 1992-1998 Søren Schmidt
* All rights reserved.
*
+ * This code is derived from software contributed to The DragonFly Project
+ * by Sascha Wildner <saw@online.de>
+ *
* Redistribution and use in source and binary forms, with or without
* modification, are permitted provided that the following conditions
* are met:
@@ -3042,6 +3045,7 @@ sc_init_emulator(scr_stat *scp, char *name)
if (sw == scp->tsw) {
error = (*sw->te_init)(scp, &scp->ts, SC_TE_WARM_INIT);
scp->rndr = rndr;
+ scp->rndr->init(scp);
sc_clear_screen(scp);
/* assert(error == 0); */
return error;
@@ -3062,6 +3066,7 @@ sc_init_emulator(scr_stat *scp, char *name)
scp->tsw = sw;
scp->ts = p;
scp->rndr = rndr;
+ scp->rndr->init(scp);
/* XXX */
(*sw->te_default_attr)(scp, user_default.std_color, user_default.rev_color);
@@ -3420,6 +3425,7 @@ set_mode(scr_stat *scp)
/* setup video hardware for the given mode */
(*vidsw[scp->sc->adapter]->set_mode)(scp->sc->adp, scp->mode);
+ scp->rndr->init(scp);
#ifndef __sparc64__
sc_vtb_init(&scp->scr, VTB_FRAMEBUFFER, scp->xsize, scp->ysize,
(void *)scp->sc->adp->va_window, FALSE);
OpenPOWER on IntegriCloud