diff options
author | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-08-17 10:59:39 +0000 |
---|---|---|
committer | Martin Pieuchot <mpi@cvs.openbsd.org> | 2013-08-17 10:59:39 +0000 |
commit | 56f8613aaa9e5a839928963830c58bd41e114e64 (patch) | |
tree | 94df4c2859fc0bb68b52d0843005b72d4f62ac40 | |
parent | 38475fef190a987bc250073c053b1003c4e2142a (diff) |
Because vgafb(4) only match the console, no need for an additional check
when setting up multiple screens and don't clear the screen again at this
moment.
-rw-r--r-- | sys/arch/macppc/pci/vgafb.c | 24 | ||||
-rw-r--r-- | sys/arch/macppc/pci/vgafb_pci.c | 4 | ||||
-rw-r--r-- | sys/arch/macppc/pci/vgafbvar.h | 4 |
3 files changed, 13 insertions, 19 deletions
diff --git a/sys/arch/macppc/pci/vgafb.c b/sys/arch/macppc/pci/vgafb.c index 5fef7718b33..9825c30b207 100644 --- a/sys/arch/macppc/pci/vgafb.c +++ b/sys/arch/macppc/pci/vgafb.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafb.c,v 1.51 2013/08/17 09:15:47 mpi Exp $ */ +/* $OpenBSD: vgafb.c,v 1.52 2013/08/17 10:59:38 mpi Exp $ */ /* $NetBSD: vga.c,v 1.3 1996/12/02 22:24:54 cgd Exp $ */ /* @@ -110,25 +110,19 @@ vgafb_restore_default_colors(struct vga_config *vc) } void -vgafb_wsdisplay_attach(struct device *parent, struct vga_config *vc, - int console) +vgafb_wsdisplay_attach(struct device *parent, struct vga_config *vc) { struct wsemuldisplaydev_attach_args aa; + struct rasops_info *ri = &vc->ri; + long defattr; - /* Setup virtual console now that we can allocate resources. */ - if (console) { - struct rasops_info *ri = &vc->ri; - long defattr; - - ri->ri_flg |= RI_VCONS | RI_WRONLY; - rasops_init(ri, 160, 160); + ri->ri_flg = RI_CENTER | RI_VCONS | RI_WRONLY; + rasops_init(ri, 160, 160); - ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr); - wsdisplay_cnattach(&vgafb_stdscreen, ri->ri_active, - 0, 0, defattr); - } + ri->ri_ops.alloc_attr(ri->ri_active, 0, 0, 0, &defattr); + wsdisplay_cnattach(&vgafb_stdscreen, ri->ri_active, 0, 0, defattr); - aa.console = console; + aa.console = 1; aa.scrdata = &vgafb_screenlist; aa.accessops = &vgafb_accessops; aa.accesscookie = vc; diff --git a/sys/arch/macppc/pci/vgafb_pci.c b/sys/arch/macppc/pci/vgafb_pci.c index 71ba37c013b..7bb34fe3a60 100644 --- a/sys/arch/macppc/pci/vgafb_pci.c +++ b/sys/arch/macppc/pci/vgafb_pci.c @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafb_pci.c,v 1.34 2013/08/17 09:11:22 mpi Exp $ */ +/* $OpenBSD: vgafb_pci.c,v 1.35 2013/08/17 10:59:38 mpi Exp $ */ /* $NetBSD: vga_pci.c,v 1.4 1996/12/05 01:39:38 cgd Exp $ */ /* @@ -189,5 +189,5 @@ vgafb_pci_attach(struct device *parent, struct device *self, void *aux) } printf("\n"); - vgafb_wsdisplay_attach(self, vc, 1); + vgafb_wsdisplay_attach(self, vc); } diff --git a/sys/arch/macppc/pci/vgafbvar.h b/sys/arch/macppc/pci/vgafbvar.h index 287a42a455f..2f3596edec6 100644 --- a/sys/arch/macppc/pci/vgafbvar.h +++ b/sys/arch/macppc/pci/vgafbvar.h @@ -1,4 +1,4 @@ -/* $OpenBSD: vgafbvar.h,v 1.21 2013/08/17 09:15:47 mpi Exp $ */ +/* $OpenBSD: vgafbvar.h,v 1.22 2013/08/17 10:59:38 mpi Exp $ */ /* $NetBSD: vgavar.h,v 1.2 1996/11/23 06:06:43 cgd Exp $ */ /* @@ -55,4 +55,4 @@ struct vga_config { int vgafb_cnattach(bus_space_tag_t, bus_space_tag_t, int, int); int vgafb_is_console(int); -void vgafb_wsdisplay_attach(struct device *, struct vga_config *, int); +void vgafb_wsdisplay_attach(struct device *, struct vga_config *); |