Source-Changes-HG archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
[src/trunk]: src/sys/arch Bring sparc/sparc64 fb code and kernel configuratio...
details: https://anonhg.NetBSD.org/src/rev/8b08194be611
branches: trunk
changeset: 471857:8b08194be611
user: ad <ad%NetBSD.org@localhost>
date: Tue Apr 13 18:45:40 1999 +0000
description:
Bring sparc/sparc64 fb code and kernel configuration into line with
rcons changes.
diffstat:
sys/arch/sparc/conf/BILL-THE-CAT | 8 ++-
sys/arch/sparc/conf/GENERIC | 8 ++-
sys/arch/sparc/conf/INSTALL | 8 ++-
sys/arch/sparc/conf/files.sparc | 4 +-
sys/arch/sparc/dev/fb.c | 75 +++++++++++++++++++++---------------
sys/arch/sparc/include/fbvar.h | 9 +++-
sys/arch/sparc64/conf/GENERIC | 8 ++-
sys/arch/sparc64/conf/GENERIC64 | 8 ++-
sys/arch/sparc64/conf/NONPLUS | 8 ++-
sys/arch/sparc64/conf/NONPLUS64 | 8 ++-
sys/arch/sparc64/conf/files.sparc64 | 4 +-
sys/arch/sparc64/dev/fb.c | 72 ++++++++++++++++++++--------------
sys/arch/sparc64/include/fbvar.h | 9 +++-
13 files changed, 142 insertions(+), 87 deletions(-)
diffs (truncated from 496 to 300 lines):
diff -r 3464f712293c -r 8b08194be611 sys/arch/sparc/conf/BILL-THE-CAT
--- a/sys/arch/sparc/conf/BILL-THE-CAT Tue Apr 13 18:43:17 1999 +0000
+++ b/sys/arch/sparc/conf/BILL-THE-CAT Tue Apr 13 18:45:40 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: BILL-THE-CAT,v 1.2 1999/03/31 14:29:58 mycroft Exp $
+# $NetBSD: BILL-THE-CAT,v 1.3 1999/04/13 18:45:40 ad Exp $
# From: GENERIC,v 1.76 1999/01/17 20:45:26 pk Exp
include "arch/sparc/conf/std.sparc"
@@ -23,8 +23,10 @@
## Use a faster console than the PROM's slow drawing routines. Not needed
## for headless (no framebuffer) machines.
-#options RASTERCONSOLE # fast rasterop console
-
+#options RASTERCONSOLE # fast rasterop console
+#options RASOPS1 # 1-bit operations (XXX)
+#options RASOPS8 # 8-bit operations (XXX)
+#options FONT_LUCIDA16x29 # the console font
#### System options that are the same for all ports
diff -r 3464f712293c -r 8b08194be611 sys/arch/sparc/conf/GENERIC
--- a/sys/arch/sparc/conf/GENERIC Tue Apr 13 18:43:17 1999 +0000
+++ b/sys/arch/sparc/conf/GENERIC Tue Apr 13 18:45:40 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.76 1999/01/17 20:45:26 pk Exp $
+# $NetBSD: GENERIC,v 1.77 1999/04/13 18:45:41 ad Exp $
include "arch/sparc/conf/std.sparc"
@@ -22,8 +22,10 @@
## Use a faster console than the PROM's slow drawing routines. Not needed
## for headless (no framebuffer) machines.
-options RASTERCONSOLE # fast rasterop console
-
+options RASTERCONSOLE # fast rasterop console
+options RASOPS1 # 1-bit operations (XXX)
+options RASOPS8 # 8-bit operations (XXX)
+options FONT_LUCIDA16x29 # the console font
#### System options that are the same for all ports
diff -r 3464f712293c -r 8b08194be611 sys/arch/sparc/conf/INSTALL
--- a/sys/arch/sparc/conf/INSTALL Tue Apr 13 18:43:17 1999 +0000
+++ b/sys/arch/sparc/conf/INSTALL Tue Apr 13 18:45:40 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: INSTALL,v 1.4 1999/01/10 13:40:30 mrg Exp $
+# $NetBSD: INSTALL,v 1.5 1999/04/13 18:45:41 ad Exp $
#
# from: NetBSD: GENERIC,v 1.67 1998/05/20 11:50:54 pk Exp
#
@@ -36,8 +36,10 @@
## Use a faster console than the PROM's slow drawing routines. Not needed
## for headless (no framebuffer) machines.
-#options RASTERCONSOLE # fast rasterop console
-
+#options RASTERCONSOLE # fast rasterop console
+#options RASOPS1 # 1-bit operations (XXX)
+#options RASOPS8 # 8-bit operations (XXX)
+#options FONT_LUCIDA16x29 # the console font
#### System options that are the same for all ports
diff -r 3464f712293c -r 8b08194be611 sys/arch/sparc/conf/files.sparc
--- a/sys/arch/sparc/conf/files.sparc Tue Apr 13 18:43:17 1999 +0000
+++ b/sys/arch/sparc/conf/files.sparc Tue Apr 13 18:45:40 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: files.sparc,v 1.70 1999/02/14 12:36:50 pk Exp $
+# $NetBSD: files.sparc,v 1.71 1999/04/13 18:45:41 ad Exp $
# @(#)files.sparc 8.1 (Berkeley) 7/19/93
# sparc-specific configuration info
@@ -244,6 +244,8 @@
# Raster Console
#
include "../../../dev/rcons/files.rcons"
+include "../../../dev/rasops/files.rasops"
+include "../../../dev/wsfont/files.wsfont"
#
# Compatibility modules
diff -r 3464f712293c -r 8b08194be611 sys/arch/sparc/dev/fb.c
--- a/sys/arch/sparc/dev/fb.c Tue Apr 13 18:43:17 1999 +0000
+++ b/sys/arch/sparc/dev/fb.c Tue Apr 13 18:45:40 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fb.c,v 1.24 1998/03/21 19:42:22 pk Exp $ */
+/* $NetBSD: fb.c,v 1.25 1999/04/13 18:45:41 ad Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -63,6 +63,9 @@
#include <machine/eeprom.h>
#include <sparc/dev/pfourreg.h>
+#include <dev/rasops/rasops.h>
+#include <dev/wsfont/wsfont.h>
+
static struct fbdevice *devfb;
@@ -363,61 +366,69 @@
(void)kbd_docmd(on?KBD_CMD_BELL:KBD_CMD_NOBELL, 0);
}
-#include <sparc/dev/rcons_font.h>
-
void
fbrcons_init(fb)
struct fbdevice *fb;
{
struct rconsole *rc = &fb->fb_rcons;
+ struct rasops_info *ri = &fb->fb_rinfo;
+ int maxrow, maxcol, cookie;
- /*
- * Common glue for rconsole initialization
- * XXX - mostly duplicates values with fbdevice.
- */
- rc->rc_linebytes = fb->fb_linebytes;
- rc->rc_pixels = fb->fb_pixels;
- rc->rc_width = fb->fb_type.fb_width;
- rc->rc_height = fb->fb_type.fb_height;
- rc->rc_depth = fb->fb_type.fb_depth;
- /* Setup the static font */
- rc->rc_font = &console_font;
+ /* Set up what rasops needs to know about */
+ ri->ri_stride = fb->fb_linebytes;
+ ri->ri_bits = (caddr_t)fb->fb_pixels;
+ ri->ri_depth = fb->fb_type.fb_depth;
+ ri->ri_width = fb->fb_type.fb_width;
+ ri->ri_height = fb->fb_type.fb_height;
+
+ /* These'll be sanity checked by rasops... */
+ maxrow = 0;
+ maxcol = 0;
-#if defined(RASTERCONS_FULLSCREEN) || defined(RASTERCONS_SMALLFONT)
- rc->rc_maxcol = rc->rc_width / rc->rc_font->width;
- rc->rc_maxrow = rc->rc_height / rc->rc_font->height;
+ /* Pick our default font. There is always a fallback */
+ wsfont_init();
+
+#ifdef RASTERCONS_SMALLFONT
+ if ((cookie = wsfont_find("Bold", 0, 0, 0)) >= 0)
#else
+ if ((cookie = wsfont_find("Gallant", 0, 0, 0)) >= 0)
+#endif
+ wsfont_lock(cookie, &ri->ri_font, WSFONT_LITTLE, WSFONT_LITTLE);
+
+#if !defined(RASTERCONS_FULLSCREEN) && !defined(RASTERCONS_SMALLFONT)
#if defined(SUN4)
if (CPU_ISSUN4) {
struct eeprom *eep = (struct eeprom *)eeprom_va;
if (eep == NULL) {
- rc->rc_maxcol = 80;
- rc->rc_maxrow = 34;
+ maxcol = 80;
+ maxrow = 34;
} else {
- rc->rc_maxcol = eep->eeTtyCols;
- rc->rc_maxrow = eep->eeTtyRows;
+ maxcol = eep->eeTtyCols;
+ maxrow = eep->eeTtyRows;
}
}
#endif /* SUN4 */
-
if (!CPU_ISSUN4) {
- rc->rc_maxcol =
+ maxcol =
a2int(getpropstring(optionsnode, "screen-#columns"), 80);
- rc->rc_maxrow =
+ maxrow =
a2int(getpropstring(optionsnode, "screen-#rows"), 34);
}
-#endif /* RASTERCONS_FULLSCREEN || RASTERCONS_SMALLFONT */
+#endif /* !RASTERCONS_FULLSCREEN && !RASTERCONS_SMALLFONT */
+ /*
+ * XXX until somebody actually sets the colormap after a call to
+ * rasops_init() with ri->ri_cmap, we can only do mono..
+ */
+ ri->ri_forcemono = 1;
-#if !(defined(RASTERCONS_FULLSCREEN) || defined(RASTERCONS_SMALLFONT))
- /* Determine addresses of prom emulator row and column */
- if (CPU_ISSUN4 ||
- romgetcursoraddr(&rc->rc_row, &rc->rc_col))
-#endif
- rc->rc_row = rc->rc_col = NULL;
-
+ /* Get operations set and connect to rcons */
+ rasops_init(ri, maxrow, maxcol, 1, 0);
+ rc->rc_ops = &ri->ri_ops;
+ rc->rc_cookie = &ri;
rc->rc_bell = fb_bell;
rcons_init(rc);
+
/* Hook up virtual console */
v_putc = rcons_cnputc;
}
diff -r 3464f712293c -r 8b08194be611 sys/arch/sparc/include/fbvar.h
--- a/sys/arch/sparc/include/fbvar.h Tue Apr 13 18:43:17 1999 +0000
+++ b/sys/arch/sparc/include/fbvar.h Tue Apr 13 18:45:40 1999 +0000
@@ -1,4 +1,4 @@
-/* $NetBSD: fbvar.h,v 1.10 1998/03/21 19:42:00 pk Exp $ */
+/* $NetBSD: fbvar.h,v 1.11 1999/04/13 18:45:41 ad Exp $ */
/*
* Copyright (c) 1992, 1993
@@ -51,6 +51,8 @@
#ifdef RASTERCONSOLE
#include <dev/rcons/rcons.h>
+#include <dev/wscons/wsdisplayvar.h>
+#include <dev/rasops/rasops.h>
#endif
struct fbdriver {
@@ -62,6 +64,10 @@
int (*fbd_poll) __P((dev_t, int, struct proc *));
int (*fbd_mmap) __P((dev_t, int, int));
#ifdef notyet
+ /*
+ * XXX redundant idea? these can hook into rasops on a per-device
+ * basis like: fb_rinfo.ri_ops.copycols = ....;
+ */
void (*fbd_wrrop)(); /* `write region' rasterop */
void (*fbd_cprop)(); /* `copy region' rasterop */
void (*fbd_clrop)(); /* `clear region' rasterop */
@@ -87,6 +93,7 @@
#ifdef RASTERCONSOLE
/* Raster console emulator state */
struct rconsole fb_rcons;
+ struct rasops_info fb_rinfo;
#endif
};
diff -r 3464f712293c -r 8b08194be611 sys/arch/sparc64/conf/GENERIC
--- a/sys/arch/sparc64/conf/GENERIC Tue Apr 13 18:43:17 1999 +0000
+++ b/sys/arch/sparc64/conf/GENERIC Tue Apr 13 18:45:40 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC,v 1.13 1999/03/27 17:58:20 eeh Exp $
+# $NetBSD: GENERIC,v 1.14 1999/04/13 18:45:41 ad Exp $
include "arch/sparc64/conf/std.sparc64"
@@ -19,8 +19,10 @@
## Use a faster console than the PROM's slow drawing routines. Not needed
## for headless (no framebuffer) machines.
# XXX broken on sparc64
-#options RASTERCONSOLE # fast rasterop console
-
+#options RASTERCONSOLE # fast rasterop console
+#options RASOPS1 # 1-bit operations (XXX)
+#options RASOPS8 # 8-bit operations (XXX)
+#options FONT_LUCIDA16x29 # the console font
#### System options that are the same for all ports
diff -r 3464f712293c -r 8b08194be611 sys/arch/sparc64/conf/GENERIC64
--- a/sys/arch/sparc64/conf/GENERIC64 Tue Apr 13 18:43:17 1999 +0000
+++ b/sys/arch/sparc64/conf/GENERIC64 Tue Apr 13 18:45:40 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: GENERIC64,v 1.3 1999/03/27 17:58:20 eeh Exp $
+# $NetBSD: GENERIC64,v 1.4 1999/04/13 18:45:42 ad Exp $
include "arch/sparc64/conf/std.sparc64"
@@ -19,8 +19,10 @@
## Use a faster console than the PROM's slow drawing routines. Not needed
## for headless (no framebuffer) machines.
# XXX broken on sparc64
-#options RASTERCONSOLE # fast rasterop console
-
+#options RASTERCONSOLE # fast rasterop console
+#options RASOPS1 # 1-bit operations (XXX)
+#options RASOPS8 # 8-bit operations (XXX)
+#options FONT_LUCIDA16x29 # the console font
#### System options that are the same for all ports
diff -r 3464f712293c -r 8b08194be611 sys/arch/sparc64/conf/NONPLUS
--- a/sys/arch/sparc64/conf/NONPLUS Tue Apr 13 18:43:17 1999 +0000
+++ b/sys/arch/sparc64/conf/NONPLUS Tue Apr 13 18:45:40 1999 +0000
@@ -1,4 +1,4 @@
-# $NetBSD: NONPLUS,v 1.10 1999/03/27 17:58:20 eeh Exp $
+# $NetBSD: NONPLUS,v 1.11 1999/04/13 18:45:42 ad Exp $
include "arch/sparc64/conf/std.sparc64"
@@ -19,8 +19,10 @@
## Use a faster console than the PROM's slow drawing routines. Not needed
## for headless (no framebuffer) machines.
-#options RASTERCONSOLE # fast rasterop console
-
Home |
Main Index |
Thread Index |
Old Index