summaryrefslogtreecommitdiffstats
path: root/sys/dev/vt
diff options
context:
space:
mode:
authorray <ray@FreeBSD.org>2014-07-07 14:16:05 +0000
committerray <ray@FreeBSD.org>2014-07-07 14:16:05 +0000
commit74b8e10dc8320877d77c972a0f9a432c58388311 (patch)
tree7d808123341a80f55c4f3e9f60035f4df44fc403 /sys/dev/vt
parent51242982dad67c86d8775c0abc241de6f2dc768d (diff)
downloadFreeBSD-src-74b8e10dc8320877d77c972a0f9a432c58388311.zip
FreeBSD-src-74b8e10dc8320877d77c972a0f9a432c58388311.tar.gz
267622 Log:
Rename vt(4) vga module to dismiss interference with syscons(4) vga module. 267623 Log: Remove stale link to deleted vt(4) xboxfb driver. 267624 Log: syscons(4) and vt(4) can be built together now. 267625 Log: Allow to disable syscons(4) if "hw.syscons.disable" kenv is set. 267626 Log: Suspend vt(4) initialization if "kern.vt.disable" kenv is set. 267965 by emaste@ Log: Use a common tunable to choose between vt(4)/sc(4) With this change and previous work from ray@ it will be possible to put both in GENERIC, and have one enabled by default, but allow the other to be selected via the loader. (The previous implementation had separate kern.vt.disable and hw.syscons.disable tunables, and would panic if both drivers were compiled in and neither was explicitly disabled.) 268175 by emaste@ Log: Fix vt(4) detection in kbdcontrol and vidcontrol As sc(4) and vt(4) coexist and are both enabled in GENERIC, the existence of a vt(4) sysctl is not sufficient to determine that vt(4) is in use. Reported by: Trond Endrestøl 268045 by emaste@ Log: Add vt(4) to GENERIC and retire the separate VT config vt(4) and sc(4) can now coexist in the same kernel. To choose the vt driver, set the loader tunable kern.vty=vt . Sponsored by: The FreeBSD Foundation
Diffstat (limited to 'sys/dev/vt')
-rw-r--r--sys/dev/vt/hw/vga/vt_vga.c (renamed from sys/dev/vt/hw/vga/vga.c)2
-rw-r--r--sys/dev/vt/hw/vga/vt_vga_reg.h (renamed from sys/dev/vt/hw/vga/vga_reg.h)0
-rw-r--r--sys/dev/vt/vt.h5
-rw-r--r--sys/dev/vt/vt_consolectl.c2
-rw-r--r--sys/dev/vt/vt_core.c11
-rw-r--r--sys/dev/vt/vt_sysmouse.c2
6 files changed, 16 insertions, 6 deletions
diff --git a/sys/dev/vt/hw/vga/vga.c b/sys/dev/vt/hw/vga/vt_vga.c
index a13e094..15bed12 100644
--- a/sys/dev/vt/hw/vga/vga.c
+++ b/sys/dev/vt/hw/vga/vt_vga.c
@@ -38,7 +38,7 @@ __FBSDID("$FreeBSD$");
#include <sys/systm.h>
#include <dev/vt/vt.h>
-#include <dev/vt/hw/vga/vga_reg.h>
+#include <dev/vt/hw/vga/vt_vga_reg.h>
#include <machine/bus.h>
diff --git a/sys/dev/vt/hw/vga/vga_reg.h b/sys/dev/vt/hw/vga/vt_vga_reg.h
index 5bfb8ce..5bfb8ce 100644
--- a/sys/dev/vt/hw/vga/vga_reg.h
+++ b/sys/dev/vt/hw/vga/vt_vga_reg.h
diff --git a/sys/dev/vt/vt.h b/sys/dev/vt/vt.h
index 176c053..b216499 100644
--- a/sys/dev/vt/vt.h
+++ b/sys/dev/vt/vt.h
@@ -50,11 +50,6 @@
#include "opt_syscons.h"
#include "opt_splash.h"
-#ifdef DEV_SC
-#error "Build with both syscons and vt is not supported. Please enable only \
-one 'device sc' or 'device vt'"
-#endif
-
#ifndef VT_MAXWINDOWS
#ifdef MAXCONS
#define VT_MAXWINDOWS MAXCONS
diff --git a/sys/dev/vt/vt_consolectl.c b/sys/dev/vt/vt_consolectl.c
index df8b341..32e3ba6 100644
--- a/sys/dev/vt/vt_consolectl.c
+++ b/sys/dev/vt/vt_consolectl.c
@@ -73,6 +73,8 @@ static void
consolectl_drvinit(void *unused)
{
+ if (!vty_enabled(VTY_VT))
+ return;
make_dev(&consolectl_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
"consolectl");
}
diff --git a/sys/dev/vt/vt_core.c b/sys/dev/vt/vt_core.c
index 476fb4e4..ad90463 100644
--- a/sys/dev/vt/vt_core.c
+++ b/sys/dev/vt/vt_core.c
@@ -215,6 +215,8 @@ static void
vt_update_static(void *dummy)
{
+ if (!vty_enabled(VTY_VT))
+ return;
if (main_vd->vd_driver != NULL)
printf("VT: running with driver \"%s\".\n",
main_vd->vd_driver->vd_name);
@@ -959,6 +961,9 @@ vtterm_cnprobe(struct terminal *tm, struct consdev *cp)
term_attr_t attr;
term_char_t c;
+ if (!vty_enabled(VTY_VT))
+ return;
+
if (vd->vd_flags & VDF_INITIALIZED)
/* Initialization already done. */
return;
@@ -1998,6 +2003,9 @@ vt_upgrade(struct vt_device *vd)
struct vt_window *vw;
unsigned int i;
+ if (!vty_enabled(VTY_VT))
+ return;
+
for (i = 0; i < VT_MAXWINDOWS; i++) {
vw = vd->vd_windows[i];
if (vw == NULL) {
@@ -2063,6 +2071,9 @@ vt_allocate(struct vt_driver *drv, void *softc)
struct vt_device *vd;
struct winsize wsz;
+ if (!vty_enabled(VTY_VT))
+ return;
+
if (main_vd->vd_driver == NULL) {
main_vd->vd_driver = drv;
printf("VT: initialize with new VT driver \"%s\".\n",
diff --git a/sys/dev/vt/vt_sysmouse.c b/sys/dev/vt/vt_sysmouse.c
index 92eee3c..21b2400 100644
--- a/sys/dev/vt/vt_sysmouse.c
+++ b/sys/dev/vt/vt_sysmouse.c
@@ -405,6 +405,8 @@ static void
sysmouse_drvinit(void *unused)
{
+ if (!vty_enabled(VTY_VT))
+ return;
mtx_init(&sysmouse_lock, "sysmouse", NULL, MTX_DEF);
cv_init(&sysmouse_sleep, "sysmrd");
make_dev(&sysmouse_cdevsw, 0, UID_ROOT, GID_WHEEL, 0600,
OpenPOWER on IntegriCloud