Set clear-screen and cursor-row so the transition from the early console
driver and genfb is seamless. While we're here, clear the screen when we first attach in case the bootloader scribbled on it.
This commit is contained in:
parent
d994f000f0
commit
7075548498
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: genfb_machdep.c,v 1.1 2009/02/17 01:42:52 jmcneill Exp $ */
|
||||
/* $NetBSD: genfb_machdep.c,v 1.2 2009/02/17 02:21:13 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 2009 Jared D. McNeill <jmcneill@invisible.ca>
|
||||
|
@ -31,7 +31,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.1 2009/02/17 01:42:52 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.2 2009/02/17 02:21:13 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/conf.h>
|
||||
|
@ -54,7 +54,7 @@ __KERNEL_RCSID(0, "$NetBSD: genfb_machdep.c,v 1.1 2009/02/17 01:42:52 jmcneill E
|
|||
#include "genfb.h"
|
||||
|
||||
#if NWSDISPLAY > 0 && NGENFB > 0
|
||||
static struct vcons_screen x86_genfb_console_screen;
|
||||
struct vcons_screen x86_genfb_console_screen;
|
||||
|
||||
static struct wsscreen_descr x86_genfb_stdscreen = {
|
||||
"std",
|
||||
|
@ -111,7 +111,7 @@ x86_genfb_cnattach(void)
|
|||
ri->ri_depth = fbinfo->depth;
|
||||
ri->ri_stride = fbinfo->stride;
|
||||
ri->ri_bits = bits;
|
||||
ri->ri_flg = RI_CENTER | RI_FULLCLEAR;
|
||||
ri->ri_flg = RI_CENTER | RI_FULLCLEAR | RI_CLEAR;
|
||||
rasops_init(ri, ri->ri_width / 8, ri->ri_height / 8);
|
||||
ri->ri_caps = WSSCREEN_WSCOLORS;
|
||||
rasops_reconfig(ri, ri->ri_height / ri->ri_font->fontheight,
|
||||
|
|
|
@ -1,4 +1,4 @@
|
|||
/* $NetBSD: x86_autoconf.c,v 1.36 2009/02/16 22:29:33 jmcneill Exp $ */
|
||||
/* $NetBSD: x86_autoconf.c,v 1.37 2009/02/17 02:21:13 jmcneill Exp $ */
|
||||
|
||||
/*-
|
||||
* Copyright (c) 1990 The Regents of the University of California.
|
||||
|
@ -35,7 +35,7 @@
|
|||
*/
|
||||
|
||||
#include <sys/cdefs.h>
|
||||
__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.36 2009/02/16 22:29:33 jmcneill Exp $");
|
||||
__KERNEL_RCSID(0, "$NetBSD: x86_autoconf.c,v 1.37 2009/02/17 02:21:13 jmcneill Exp $");
|
||||
|
||||
#include <sys/param.h>
|
||||
#include <sys/systm.h>
|
||||
|
@ -557,6 +557,8 @@ device_register(struct device *dev, void *aux)
|
|||
prop_dictionary_t dict;
|
||||
|
||||
if (PCI_CLASS(pa->pa_class) == PCI_CLASS_DISPLAY) {
|
||||
extern struct vcons_screen x86_genfb_console_screen;
|
||||
|
||||
fbinfo = lookup_bootinfo(BTINFO_FRAMEBUFFER);
|
||||
if (fbinfo == NULL || fbinfo->physaddr == 0)
|
||||
return;
|
||||
|
@ -572,6 +574,9 @@ device_register(struct device *dev, void *aux)
|
|||
prop_dictionary_set_uint16(dict, "linebytes",
|
||||
fbinfo->stride);
|
||||
prop_dictionary_set_bool(dict, "is_console", true);
|
||||
prop_dictionary_set_bool(dict, "clear-screen", false);
|
||||
prop_dictionary_set_uint16(dict, "cursor-row",
|
||||
x86_genfb_console_screen.scr_ri.ri_crow);
|
||||
#if notyet
|
||||
prop_dictionary_set_bool(dict, "splash",
|
||||
fbinfo->flags & BI_FB_SPLASH ? true : false);
|
||||
|
|
Loading…
Reference in New Issue