summaryrefslogtreecommitdiffstats
path: root/sys/pc98/cbus/gdc.c
diff options
context:
space:
mode:
authornyan <nyan@FreeBSD.org>2000-03-29 12:29:27 +0000
committernyan <nyan@FreeBSD.org>2000-03-29 12:29:27 +0000
commitf92fa6a3e6d429f3f64ab2d4caaedaa7024612a6 (patch)
tree6f793df0bc95e89938376af913ab562f951f4fa5 /sys/pc98/cbus/gdc.c
parented031b005eaa9ea1bc4a341fcae0790ea6050813 (diff)
downloadFreeBSD-src-f92fa6a3e6d429f3f64ab2d4caaedaa7024612a6.zip
FreeBSD-src-f92fa6a3e6d429f3f64ab2d4caaedaa7024612a6.tar.gz
- Supported display suspended mode.
- Switch on/off not only text screen but also graphic screen. Submitted by: chi@bd.mbn.or.jp (Chiharu Shibata)
Diffstat (limited to 'sys/pc98/cbus/gdc.c')
-rw-r--r--sys/pc98/cbus/gdc.c16
1 files changed, 10 insertions, 6 deletions
diff --git a/sys/pc98/cbus/gdc.c b/sys/pc98/cbus/gdc.c
index 26dcb43..504e9fd 100644
--- a/sys/pc98/cbus/gdc.c
+++ b/sys/pc98/cbus/gdc.c
@@ -942,6 +942,7 @@ static int
gdc_blank_display(video_adapter_t *adp, int mode)
{
int s;
+ static int standby = 0;
if (!gdc_init_done)
return ENXIO;
@@ -950,10 +951,9 @@ gdc_blank_display(video_adapter_t *adp, int mode)
switch (mode) {
case V_DISPLAY_SUSPEND:
case V_DISPLAY_STAND_BY:
- /*
- * FIXME: I don't know how to put the display into `suspend'
- * or `stand-by' mode via GDC...
- */
+ outb(0x09a2, 0x80 | 0x40); /* V/H-SYNC mask */
+ if (inb(0x09a2) == (0x80 | 0x40))
+ standby = 1;
/* FALL THROUGH */
case V_DISPLAY_BLANK:
@@ -965,7 +965,7 @@ gdc_blank_display(video_adapter_t *adp, int mode)
} else {
while (!(inb(TEXT_GDC) & 0x20)) /* V-SYNC wait */
;
- outb(TEXT_GDC + 2, 0xc); /* text off */
+ outb(TEXT_GDC + 8, 0x0e); /* DISP off */
}
break;
@@ -978,7 +978,11 @@ gdc_blank_display(video_adapter_t *adp, int mode)
} else {
while (!(inb(TEXT_GDC) & 0x20)) /* V-SYNC wait */
;
- outb(TEXT_GDC + 2, 0xd); /* text on */
+ outb(TEXT_GDC + 8, 0x0f); /* DISP on */
+ }
+ if (standby) {
+ outb(0x09a2, 0x00); /* V/H-SYNC unmask */
+ standby = 0;
}
break;
}
OpenPOWER on IntegriCloud