From cda2a3bba155c9e0c14f8040f14383a204d7b6e8 Mon Sep 17 00:00:00 2001 From: jmmv Date: Fri, 30 Jul 2004 10:47:20 +0000 Subject: [PATCH] Fix initialitzation of border color at boot time through the WSDISPLAY_BORDER_COLOR option, broken by a last-minute change. Pointed out by xtraeme@. Also back out the previous change by dogcow@, which was an attempt to fix kernel builds that didn't define WSDISPLAY_CUSTOM_BORDER; shouldn't be needed now. (Problem also introduced by the same last-minute change; sorry). --- sys/dev/ic/vga.c | 13 +++++-------- 1 file changed, 5 insertions(+), 8 deletions(-) diff --git a/sys/dev/ic/vga.c b/sys/dev/ic/vga.c index 1756b8e1911b..32207a4f412b 100644 --- a/sys/dev/ic/vga.c +++ b/sys/dev/ic/vga.c @@ -1,4 +1,4 @@ -/* $NetBSD: vga.c,v 1.77 2004/07/30 07:40:26 dogcow Exp $ */ +/* $NetBSD: vga.c,v 1.78 2004/07/30 10:47:20 jmmv Exp $ */ /* * Copyright (c) 1995, 1996 Carnegie-Mellon University. @@ -35,7 +35,7 @@ #include "opt_wsmsgattrs.h" #include -__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.77 2004/07/30 07:40:26 dogcow Exp $"); +__KERNEL_RCSID(0, "$NetBSD: vga.c,v 1.78 2004/07/30 10:47:20 jmmv Exp $"); #include #include @@ -591,12 +591,9 @@ vga_init(struct vga_config *vc, bus_space_tag_t iot, bus_space_tag_t memt) vc->currentfontset1 = vc->currentfontset2 = 0; -#ifdef WSDISPLAY_CUSTOM_BORDER - /* This function does all the required sanity checks for us - * (mono video, valid color, etc.); we just don't care about - * possible errors during initialization. */ - (void)vga_setborder(vc->active, WSDISPLAY_BORDER_COLOR); -#endif /* WSDISPLAY_CUSTOM_BORDER */ + if (!vh->vh_mono && (u_int)WSDISPLAY_BORDER_COLOR < sizeof(fgansitopc)) + _vga_attr_write(vh, VGA_ATC_OVERSCAN, + fgansitopc[WSDISPLAY_BORDER_COLOR]); } void