diff options
author | Jason Wright <jason@cvs.openbsd.org> | 2000-05-18 13:31:13 +0000 |
---|---|---|
committer | Jason Wright <jason@cvs.openbsd.org> | 2000-05-18 13:31:13 +0000 |
commit | f91d6bab7f52d69c80c813778f169971cee7a861 (patch) | |
tree | 841c9dcbe91b2d28cfb48c32f9b4809fd385f9b1 /sys/arch/sparc | |
parent | 5f6bc7799cd98587b12f1c087a71a3c729eef23c (diff) |
add machdep.vsyncblank sysctl for controlling whether vsync is disabled
when the monitor is blanked.
Diffstat (limited to 'sys/arch/sparc')
-rw-r--r-- | sys/arch/sparc/dev/cgsix.c | 7 | ||||
-rw-r--r-- | sys/arch/sparc/include/cpu.h | 6 | ||||
-rw-r--r-- | sys/arch/sparc/sparc/machdep.c | 7 |
3 files changed, 15 insertions, 5 deletions
diff --git a/sys/arch/sparc/dev/cgsix.c b/sys/arch/sparc/dev/cgsix.c index 8ace1e00fcc..a0f3194672b 100644 --- a/sys/arch/sparc/dev/cgsix.c +++ b/sys/arch/sparc/dev/cgsix.c @@ -1,4 +1,4 @@ -/* $OpenBSD: cgsix.c,v 1.12 1999/05/08 01:15:58 jason Exp $ */ +/* $OpenBSD: cgsix.c,v 1.13 2000/05/18 13:31:12 jason Exp $ */ /* $NetBSD: cgsix.c,v 1.33 1997/08/07 19:12:30 pk Exp $ */ /* @@ -88,6 +88,8 @@ #include <sparc/dev/pfourreg.h> #endif +extern int sparc_vsyncblank; + union cursor_cmap { /* colormap, like bt_cmap, but tiny */ u_char cm_map[2][3]; /* 2 R/G/B entries */ u_int cm_chip[2]; /* 2 chip equivalents */ @@ -429,7 +431,8 @@ cgsixioctl(dev, cmd, data, flags, p) cg6_unblank(&sc->sc_dev); else if (!sc->sc_blanked) { sc->sc_blanked = 1; - sc->sc_thc->thc_misc &= ~(THC_MISC_VIDEN|THC_MISC_SYNCEN); + sc->sc_thc->thc_misc &= ~(THC_MISC_VIDEN | + (sparc_vsyncblank ? THC_MISC_SYNCEN : 0)); } break; diff --git a/sys/arch/sparc/include/cpu.h b/sys/arch/sparc/include/cpu.h index 5ccf95a2502..c510fb680d1 100644 --- a/sys/arch/sparc/include/cpu.h +++ b/sys/arch/sparc/include/cpu.h @@ -1,4 +1,4 @@ -/* $OpenBSD: cpu.h,v 1.8 2000/02/21 21:05:58 art Exp $ */ +/* $OpenBSD: cpu.h,v 1.9 2000/05/18 13:31:12 jason Exp $ */ /* $NetBSD: cpu.h,v 1.24 1997/03/15 22:25:15 pk Exp $ */ /* @@ -52,11 +52,13 @@ * CTL_MACHDEP definitions. */ #define CPU_LED_BLINK 1 /* int: twiddle the power LED */ -#define CPU_MAXID 2 /* 1 valid machdep ID */ +#define CPU_VSYNCBLANK 2 /* int: turn off monitors in *blank */ +#define CPU_MAXID 3 /* 2 valid machdep IDs */ #define CTL_MACHDEP_NAMES { \ { 0, 0 }, \ { "led_blink", CTLTYPE_INT }, \ + { "vsyncblank", CTLTYPE_INT }, \ } #ifdef _KERNEL diff --git a/sys/arch/sparc/sparc/machdep.c b/sys/arch/sparc/sparc/machdep.c index d063046906f..12d5111cc35 100644 --- a/sys/arch/sparc/sparc/machdep.c +++ b/sys/arch/sparc/sparc/machdep.c @@ -1,4 +1,4 @@ -/* $OpenBSD: machdep.c,v 1.48 2000/03/23 09:59:56 art Exp $ */ +/* $OpenBSD: machdep.c,v 1.49 2000/05/18 13:31:12 jason Exp $ */ /* $NetBSD: machdep.c,v 1.85 1997/09/12 08:55:02 pk Exp $ */ /* @@ -141,6 +141,7 @@ int physmem; /* sysctl settable */ int sparc_led_blink = 0; +int sparc_vsyncblank = 0; /* * safepri is a safe priority for sleep to set for a spin-wait @@ -553,6 +554,10 @@ cpu_sysctl(name, namelen, oldp, oldlenp, newp, newlen, p) return (ENOTDIR); /* overloaded */ switch (name[0]) { + case CPU_VSYNCBLANK: + ret = sysctl_int(oldp, oldlenp, newp, newlen, + &sparc_vsyncblank); + return (ret); case CPU_LED_BLINK: #if (NLED > 0) || (NAUXREG > 0) || (NSCF > 0) oldval = sparc_led_blink; |