Module Name:    src
Committed By:   tsutsui
Date:           Sat May 15 10:01:44 UTC 2010

Modified Files:
        src/sys/arch/newsmips/apbus: xafb.c
        src/sys/arch/newsmips/dev: fb.c

Log Message:
Set RI_NO_AUTO in ri_flg if init functions are invoked from cnattach.
Tested on NWS-3470D. xafb.c for NWS-5000 is untested.

XXX: isn't it better to have failsafe default than sprinkle RI_NO_AUTO
XXX: to avoid fatal silent hangup?


To generate a diff of this commit:
cvs rdiff -u -r1.15 -r1.16 src/sys/arch/newsmips/apbus/xafb.c
cvs rdiff -u -r1.24 -r1.25 src/sys/arch/newsmips/dev/fb.c

Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.

Modified files:

Index: src/sys/arch/newsmips/apbus/xafb.c
diff -u src/sys/arch/newsmips/apbus/xafb.c:1.15 src/sys/arch/newsmips/apbus/xafb.c:1.16
--- src/sys/arch/newsmips/apbus/xafb.c:1.15	Wed Apr  9 15:40:30 2008
+++ src/sys/arch/newsmips/apbus/xafb.c	Sat May 15 10:01:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: xafb.c,v 1.15 2008/04/09 15:40:30 tsutsui Exp $	*/
+/*	$NetBSD: xafb.c,v 1.16 2010/05/15 10:01:44 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -29,7 +29,7 @@
 /* "xa" frame buffer driver.  Currently supports 1280x1024x8 only. */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: xafb.c,v 1.15 2008/04/09 15:40:30 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: xafb.c,v 1.16 2010/05/15 10:01:44 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/buf.h>
@@ -152,6 +152,7 @@
 	if (console) {
 		dc = &xafb_console_dc;
 		ri = &dc->dc_ri;
+		ri->ri_flg &= ~RI_NO_AUTO;
 		sc->sc_nscreens = 1;
 	} else {
 		dc = malloc(sizeof(struct xafb_devconfig), M_DEVBUF,
@@ -216,6 +217,8 @@
 	ri->ri_stride = 2048;
 	ri->ri_bits = (void *)dc->dc_fbbase;
 	ri->ri_flg = RI_FORCEMONO | RI_FULLCLEAR;
+	if (dc == &xafb_console_dc)
+		ri->ri_flg |= RI_NO_AUTO;
 
 	rasops_init(ri, 44, 100);
 

Index: src/sys/arch/newsmips/dev/fb.c
diff -u src/sys/arch/newsmips/dev/fb.c:1.24 src/sys/arch/newsmips/dev/fb.c:1.25
--- src/sys/arch/newsmips/dev/fb.c:1.24	Wed Apr  9 15:40:30 2008
+++ src/sys/arch/newsmips/dev/fb.c	Sat May 15 10:01:44 2010
@@ -1,4 +1,4 @@
-/*	$NetBSD: fb.c,v 1.24 2008/04/09 15:40:30 tsutsui Exp $	*/
+/*	$NetBSD: fb.c,v 1.25 2010/05/15 10:01:44 tsutsui Exp $	*/
 
 /*-
  * Copyright (c) 2000 Tsubai Masanari.  All rights reserved.
@@ -27,7 +27,7 @@
  */
 
 #include <sys/cdefs.h>
-__KERNEL_RCSID(0, "$NetBSD: fb.c,v 1.24 2008/04/09 15:40:30 tsutsui Exp $");
+__KERNEL_RCSID(0, "$NetBSD: fb.c,v 1.25 2010/05/15 10:01:44 tsutsui Exp $");
 
 #include <sys/param.h>
 #include <sys/device.h>
@@ -143,6 +143,7 @@
 	if (console) {
 		dc = &fb_console_dc;
 		ri = &dc->dc_ri;
+		ri->ri_flg &= ~RI_NO_AUTO;
 		sc->sc_nscreens = 1;
 	} else {
 		dc = malloc(sizeof(struct fb_devconfig), M_DEVBUF,
@@ -201,6 +202,8 @@
 	ri->ri_stride = 2048 / 8;
 	ri->ri_bits = dc->dc_fbbase;
 	ri->ri_flg = RI_FULLCLEAR;
+	if (dc == &fb_console_dc)
+		ri->ri_flg |= RI_NO_AUTO;
 
 	rasops_init(ri, 24, 80);
 	rows = (height - 2) / ri->ri_font->fontheight;

Reply via email to