Wed Mar 31 01:44:59 2021 UTC ()
There are two interface attriubtues on this device, so we need to be
explcit about it in BOTH config_found() calls.


(thorpej)
diff -r1.53.10.1 -r1.53.10.2 src/sys/dev/pci/voodoofb.c

cvs diff -r1.53.10.1 -r1.53.10.2 src/sys/dev/pci/voodoofb.c (expand / switch to unified diff)

--- src/sys/dev/pci/voodoofb.c 2021/03/21 21:09:14 1.53.10.1
+++ src/sys/dev/pci/voodoofb.c 2021/03/31 01:44:59 1.53.10.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: voodoofb.c,v 1.53.10.1 2021/03/21 21:09:14 thorpej Exp $ */ 1/* $NetBSD: voodoofb.c,v 1.53.10.2 2021/03/31 01:44:59 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2005, 2006, 2012 Michael Lorenz 4 * Copyright (c) 2005, 2006, 2012 Michael Lorenz
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Redistribution and use in source and binary forms, with or without 7 * Redistribution and use in source and binary forms, with or without
8 * modification, are permitted provided that the following conditions 8 * modification, are permitted provided that the following conditions
9 * are met: 9 * are met:
10 * 1. Redistributions of source code must retain the above copyright 10 * 1. Redistributions of source code must retain the above copyright
11 * notice, this list of conditions and the following disclaimer. 11 * notice, this list of conditions and the following disclaimer.
12 * 2. Redistributions in binary form must reproduce the above copyright 12 * 2. Redistributions in binary form must reproduce the above copyright
13 * notice, this list of conditions and the following disclaimer in the 13 * notice, this list of conditions and the following disclaimer in the
14 * documentation and/or other materials provided with the distribution. 14 * documentation and/or other materials provided with the distribution.
@@ -22,27 +22,27 @@ @@ -22,27 +22,27 @@
22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 22 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 23 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 24 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 25 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
26 */ 26 */
27 27
28/* 28/*
29 * A console driver for 3Dfx Voodoo3 graphics boards 29 * A console driver for 3Dfx Voodoo3 graphics boards
30 * Thanks to Andreas Drewke (andreas_dr@gmx.de) for his Voodoo3 driver for BeOS 30 * Thanks to Andreas Drewke (andreas_dr@gmx.de) for his Voodoo3 driver for BeOS
31 * which I used as reference / documentation 31 * which I used as reference / documentation
32 */ 32 */
33 33
34#include <sys/cdefs.h> 34#include <sys/cdefs.h>
35__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.53.10.1 2021/03/21 21:09:14 thorpej Exp $"); 35__KERNEL_RCSID(0, "$NetBSD: voodoofb.c,v 1.53.10.2 2021/03/31 01:44:59 thorpej Exp $");
36 36
37#include <sys/param.h> 37#include <sys/param.h>
38#include <sys/systm.h> 38#include <sys/systm.h>
39#include <sys/kernel.h> 39#include <sys/kernel.h>
40#include <sys/device.h> 40#include <sys/device.h>
41#include <sys/malloc.h> 41#include <sys/malloc.h>
42#include <sys/callout.h> 42#include <sys/callout.h>
43#include <sys/kauth.h> 43#include <sys/kauth.h>
44 44
45#include <dev/pci/pcivar.h> 45#include <dev/pci/pcivar.h>
46#include <dev/pci/pcireg.h> 46#include <dev/pci/pcireg.h>
47#include <dev/pci/pcidevs.h> 47#include <dev/pci/pcidevs.h>
48#include <dev/pci/pciio.h> 48#include <dev/pci/pciio.h>
@@ -536,28 +536,32 @@ voodoofb_attach(device_t parent, device_ @@ -536,28 +536,32 @@ voodoofb_attach(device_t parent, device_
536#endif 536#endif
537 537
538 rasops_unpack_attr(defattr, &fg, &bg, &ul); 538 rasops_unpack_attr(defattr, &fg, &bg, &ul);
539 sc->sc_bg = ri->ri_devcmap[bg]; 539 sc->sc_bg = ri->ri_devcmap[bg];
540 voodoofb_clearscreen(sc); 540 voodoofb_clearscreen(sc);
541 541
542 if (console) 542 if (console)
543 vcons_replay_msgbuf(&voodoofb_console_screen); 543 vcons_replay_msgbuf(&voodoofb_console_screen);
544 aa.console = console; 544 aa.console = console;
545 aa.scrdata = &voodoofb_screenlist; 545 aa.scrdata = &voodoofb_screenlist;
546 aa.accessops = &voodoofb_accessops; 546 aa.accessops = &voodoofb_accessops;
547 aa.accesscookie = &sc->vd; 547 aa.accesscookie = &sc->vd;
548 548
549 config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); 549 config_found(self, &aa, wsemuldisplaydevprint,
550 config_found_ia(self, "drm", aux, voodoofb_drm_print); 550 CFARG_IATTR, "wsemuldisplaydev",
 551 CFARG_EOL);
 552 config_found(self, aux, voodoofb_drm_print,
 553 CFARG_IATTR, "drm",
 554 CFARG_EOL);
551} 555}
552 556
553static int 557static int
554voodoofb_drm_print(void *opaque, const char *pnp) 558voodoofb_drm_print(void *opaque, const char *pnp)
555{ 559{
556 if (pnp) 560 if (pnp)
557 aprint_normal("drm at %s", pnp); 561 aprint_normal("drm at %s", pnp);
558 562
559 return UNCONF; 563 return UNCONF;
560} 564}
561 565
562static int 566static int
563voodoofb_drm_unmap(struct voodoofb_softc *sc) 567voodoofb_drm_unmap(struct voodoofb_softc *sc)