Sat Apr 24 18:23:09 2021 UTC ()
Make sure to explcitly specify the "wsemuldisplaydev" interface attribute
when attaching the wscons display instance, because these devices can
also attach children using the "drm" interface attribute.


(thorpej)
diff -r1.70.32.2 -r1.70.32.3 src/sys/arch/macppc/dev/ofb.c
diff -r1.48.4.1 -r1.48.4.2 src/sys/dev/ic/vga_raster.c
diff -r1.103.4.2 -r1.103.4.3 src/sys/dev/pci/machfb.c
diff -r1.113.2.2 -r1.113.2.3 src/sys/dev/pci/radeonfb.c
diff -r1.19.34.2 -r1.19.34.3 src/sys/dev/pci/unichromefb.c

cvs diff -r1.70.32.2 -r1.70.32.3 src/sys/arch/macppc/dev/ofb.c (expand / switch to unified diff)

--- src/sys/arch/macppc/dev/ofb.c 2021/04/02 22:17:40 1.70.32.2
+++ src/sys/arch/macppc/dev/ofb.c 2021/04/24 18:23:09 1.70.32.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: ofb.c,v 1.70.32.2 2021/04/02 22:17:40 thorpej Exp $ */ 1/* $NetBSD: ofb.c,v 1.70.32.3 2021/04/24 18:23:09 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 1995, 1996 Carnegie-Mellon University. 4 * Copyright (c) 1995, 1996 Carnegie-Mellon University.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Author: Chris G. Demetriou 7 * Author: Chris G. Demetriou
8 *  8 *
9 * Permission to use, copy, modify and distribute this software and 9 * Permission to use, copy, modify and distribute this software and
10 * its documentation is hereby granted, provided that both the copyright 10 * its documentation is hereby granted, provided that both the copyright
11 * notice and this permission notice appear in all copies of the 11 * notice and this permission notice appear in all copies of the
12 * software, derivative works or modified versions, and any portions 12 * software, derivative works or modified versions, and any portions
13 * thereof, and that both notices appear in supporting documentation. 13 * thereof, and that both notices appear in supporting documentation.
14 *  14 *
@@ -18,27 +18,27 @@ @@ -18,27 +18,27 @@
18 *  18 *
19 * Carnegie Mellon requests users of this software to return to 19 * Carnegie Mellon requests users of this software to return to
20 * 20 *
21 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 21 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
22 * School of Computer Science 22 * School of Computer Science
23 * Carnegie Mellon University 23 * Carnegie Mellon University
24 * Pittsburgh PA 15213-3890 24 * Pittsburgh PA 15213-3890
25 * 25 *
26 * any improvements or extensions that they make and grant Carnegie the 26 * any improvements or extensions that they make and grant Carnegie the
27 * rights to redistribute these changes. 27 * rights to redistribute these changes.
28 */ 28 */
29 29
30#include <sys/cdefs.h> 30#include <sys/cdefs.h>
31__KERNEL_RCSID(0, "$NetBSD: ofb.c,v 1.70.32.2 2021/04/02 22:17:40 thorpej Exp $"); 31__KERNEL_RCSID(0, "$NetBSD: ofb.c,v 1.70.32.3 2021/04/24 18:23:09 thorpej Exp $");
32 32
33#include <sys/param.h> 33#include <sys/param.h>
34#include <sys/buf.h> 34#include <sys/buf.h>
35#include <sys/conf.h> 35#include <sys/conf.h>
36#include <sys/device.h> 36#include <sys/device.h>
37#include <sys/ioctl.h> 37#include <sys/ioctl.h>
38#include <sys/kernel.h> 38#include <sys/kernel.h>
39#include <sys/malloc.h> 39#include <sys/malloc.h>
40#include <sys/systm.h> 40#include <sys/systm.h>
41#include <sys/kauth.h> 41#include <sys/kauth.h>
42#include <sys/lwp.h> 42#include <sys/lwp.h>
43 43
44#include <dev/pci/pcidevs.h> 44#include <dev/pci/pcidevs.h>
@@ -207,27 +207,29 @@ ofbattach(device_t parent, device_t self @@ -207,27 +207,29 @@ ofbattach(device_t parent, device_t self
207 sizeof(sc->sc_addrs)) == -1) { 207 sizeof(sc->sc_addrs)) == -1) {
208 sc->sc_node = OF_parent(sc->sc_node); 208 sc->sc_node = OF_parent(sc->sc_node);
209 OF_getprop(sc->sc_node, "assigned-addresses", sc->sc_addrs, 209 OF_getprop(sc->sc_node, "assigned-addresses", sc->sc_addrs,
210 sizeof(sc->sc_addrs)); 210 sizeof(sc->sc_addrs));
211 } 211 }
212 212
213 ofb_init_cmap(sc); 213 ofb_init_cmap(sc);
214 214
215 a.console = console; 215 a.console = console;
216 a.scrdata = &ofb_screenlist; 216 a.scrdata = &ofb_screenlist;
217 a.accessops = &ofb_accessops; 217 a.accessops = &ofb_accessops;
218 a.accesscookie = &sc->vd; 218 a.accesscookie = &sc->vd;
219 219
220 config_found(self, &a, wsemuldisplaydevprint, CFARG_EOL); 220 config_found(self, &a, wsemuldisplaydevprint,
 221 CFARG_IATTR, "wsemuldisplaydev",
 222 CFARG_EOL);
221 223
222 config_found(self, aux, ofb_drm_print, 224 config_found(self, aux, ofb_drm_print,
223 CFARG_IATTR, "drm", 225 CFARG_IATTR, "drm",
224 CFARG_EOL); 226 CFARG_EOL);
225} 227}
226 228
227static int 229static int
228ofb_drm_print(void *aux, const char *pnp) 230ofb_drm_print(void *aux, const char *pnp)
229{ 231{
230 if (pnp) 232 if (pnp)
231 aprint_normal("direct rendering for %s", pnp); 233 aprint_normal("direct rendering for %s", pnp);
232 return (UNSUPP); 234 return (UNSUPP);
233} 235}

cvs diff -r1.48.4.1 -r1.48.4.2 src/sys/dev/ic/vga_raster.c (expand / switch to unified diff)

--- src/sys/dev/ic/vga_raster.c 2021/03/21 21:09:12 1.48.4.1
+++ src/sys/dev/ic/vga_raster.c 2021/04/24 18:23:09 1.48.4.2
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: vga_raster.c,v 1.48.4.1 2021/03/21 21:09:12 thorpej Exp $ */ 1/* $NetBSD: vga_raster.c,v 1.48.4.2 2021/04/24 18:23:09 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2001, 2002 Bang Jun-Young 4 * Copyright (c) 2001, 2002 Bang Jun-Young
5 * Copyright (c) 2004 Julio M. Merino Vidal 5 * Copyright (c) 2004 Julio M. Merino Vidal
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -46,27 +46,27 @@ @@ -46,27 +46,27 @@
46 * 46 *
47 * Carnegie Mellon requests users of this software to return to 47 * Carnegie Mellon requests users of this software to return to
48 * 48 *
49 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU 49 * Software Distribution Coordinator or Software.Distribution@CS.CMU.EDU
50 * School of Computer Science 50 * School of Computer Science
51 * Carnegie Mellon University 51 * Carnegie Mellon University
52 * Pittsburgh PA 15213-3890 52 * Pittsburgh PA 15213-3890
53 * 53 *
54 * any improvements or extensions that they make and grant Carnegie the 54 * any improvements or extensions that they make and grant Carnegie the
55 * rights to redistribute these changes. 55 * rights to redistribute these changes.
56 */ 56 */
57 57
58#include <sys/cdefs.h> 58#include <sys/cdefs.h>
59__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.48.4.1 2021/03/21 21:09:12 thorpej Exp $"); 59__KERNEL_RCSID(0, "$NetBSD: vga_raster.c,v 1.48.4.2 2021/04/24 18:23:09 thorpej Exp $");
60 60
61#include "opt_vga.h" 61#include "opt_vga.h"
62#include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */ 62#include "opt_wsmsgattrs.h" /* for WSDISPLAY_CUSTOM_OUTPUT */
63 63
64#include <sys/param.h> 64#include <sys/param.h>
65#include <sys/systm.h> 65#include <sys/systm.h>
66#include <sys/callout.h> 66#include <sys/callout.h>
67#include <sys/kernel.h> 67#include <sys/kernel.h>
68#include <sys/device.h> 68#include <sys/device.h>
69#include <sys/malloc.h> 69#include <sys/malloc.h>
70#include <sys/queue.h> 70#include <sys/queue.h>
71#include <sys/bus.h> 71#include <sys/bus.h>
72 72
@@ -538,27 +538,29 @@ vga_common_attach(struct vga_softc *sc,  @@ -538,27 +538,29 @@ vga_common_attach(struct vga_softc *sc,
538 } 538 }
539 539
540 vc->vc_type = type; 540 vc->vc_type = type;
541 vc->vc_funcs = vf; 541 vc->vc_funcs = vf;
542 542
543 sc->sc_vc = vc; 543 sc->sc_vc = vc;
544 vc->softc = sc; 544 vc->softc = sc;
545 545
546 aa.console = console; 546 aa.console = console;
547 aa.scrdata = (vc->hdl.vh_mono ? &vga_screenlist_mono : &vga_screenlist); 547 aa.scrdata = (vc->hdl.vh_mono ? &vga_screenlist_mono : &vga_screenlist);
548 aa.accessops = &vga_raster_accessops; 548 aa.accessops = &vga_raster_accessops;
549 aa.accesscookie = vc; 549 aa.accesscookie = vc;
550 550
551 config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); 551 config_found(sc->sc_dev, &aa, wsemuldisplaydevprint,
 552 CFARG_IATTR, "wsemuldisplaydev",
 553 CFARG_EOL);
552} 554}
553 555
554int 556int
555vga_cndetach(void) 557vga_cndetach(void)
556{ 558{
557 struct vga_config *vc; 559 struct vga_config *vc;
558 struct vga_handle *vh; 560 struct vga_handle *vh;
559 561
560 vc = &vga_console_vc; 562 vc = &vga_console_vc;
561 vh = &vc->hdl; 563 vh = &vc->hdl;
562 564
563 if (vgaconsole) { 565 if (vgaconsole) {
564 wsdisplay_cndetach(); 566 wsdisplay_cndetach();

cvs diff -r1.103.4.2 -r1.103.4.3 src/sys/dev/pci/machfb.c (expand / switch to unified diff)

--- src/sys/dev/pci/machfb.c 2021/04/02 22:17:44 1.103.4.2
+++ src/sys/dev/pci/machfb.c 2021/04/24 18:23:09 1.103.4.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: machfb.c,v 1.103.4.2 2021/04/02 22:17:44 thorpej Exp $ */ 1/* $NetBSD: machfb.c,v 1.103.4.3 2021/04/24 18:23:09 thorpej Exp $ */
2 2
3/* 3/*
4 * Copyright (c) 2002 Bang Jun-Young 4 * Copyright (c) 2002 Bang Jun-Young
5 * Copyright (c) 2005, 2006, 2007 Michael Lorenz 5 * Copyright (c) 2005, 2006, 2007 Michael Lorenz
6 * All rights reserved. 6 * All rights reserved.
7 * 7 *
8 * Redistribution and use in source and binary forms, with or without 8 * Redistribution and use in source and binary forms, with or without
9 * modification, are permitted provided that the following conditions 9 * modification, are permitted provided that the following conditions
10 * are met: 10 * are met:
11 * 1. Redistributions of source code must retain the above copyright 11 * 1. Redistributions of source code must retain the above copyright
12 * notice, this list of conditions and the following disclaimer. 12 * notice, this list of conditions and the following disclaimer.
13 * 2. Redistributions in binary form must reproduce the above copyright 13 * 2. Redistributions in binary form must reproduce the above copyright
14 * notice, this list of conditions and the following disclaimer in the 14 * notice, this list of conditions and the following disclaimer in the
@@ -24,27 +24,27 @@ @@ -24,27 +24,27 @@
24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, 24 * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY 25 * DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 26 * THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF 27 * (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF
28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. 28 * THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
29 */ 29 */
30 30
31/* 31/*
32 * Some code is derived from ATI Rage Pro and Derivatives Programmer's Guide. 32 * Some code is derived from ATI Rage Pro and Derivatives Programmer's Guide.
33 */ 33 */
34 34
35#include <sys/cdefs.h> 35#include <sys/cdefs.h>
36__KERNEL_RCSID(0, 36__KERNEL_RCSID(0,
37 "$NetBSD: machfb.c,v 1.103.4.2 2021/04/02 22:17:44 thorpej Exp $"); 37 "$NetBSD: machfb.c,v 1.103.4.3 2021/04/24 18:23:09 thorpej Exp $");
38 38
39#include <sys/param.h> 39#include <sys/param.h>
40#include <sys/systm.h> 40#include <sys/systm.h>
41#include <sys/kernel.h> 41#include <sys/kernel.h>
42#include <sys/device.h> 42#include <sys/device.h>
43#include <sys/malloc.h> 43#include <sys/malloc.h>
44#include <sys/callout.h> 44#include <sys/callout.h>
45#include <sys/lwp.h> 45#include <sys/lwp.h>
46#include <sys/kauth.h> 46#include <sys/kauth.h>
47 47
48#include <dev/videomode/videomode.h> 48#include <dev/videomode/videomode.h>
49#include <dev/videomode/edidvar.h> 49#include <dev/videomode/edidvar.h>
50 50
@@ -775,27 +775,29 @@ mach64_attach(device_t parent, device_t  @@ -775,27 +775,29 @@ mach64_attach(device_t parent, device_t
775 mach64_clearscreen(sc); 775 mach64_clearscreen(sc);
776 mach64_init_lut(sc); 776 mach64_init_lut(sc);
777 777
778 if (sc->sc_console) 778 if (sc->sc_console)
779 vcons_replay_msgbuf(&mach64_console_screen); 779 vcons_replay_msgbuf(&mach64_console_screen);
780 780
781 machfb_blank(sc, 0); /* unblank the screen */ 781 machfb_blank(sc, 0); /* unblank the screen */
782 782
783 aa.console = sc->sc_console; 783 aa.console = sc->sc_console;
784 aa.scrdata = &mach64_screenlist; 784 aa.scrdata = &mach64_screenlist;
785 aa.accessops = &sc->sc_accessops; 785 aa.accessops = &sc->sc_accessops;
786 aa.accesscookie = &sc->vd; 786 aa.accesscookie = &sc->vd;
787 787
788 config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); 788 config_found(self, &aa, wsemuldisplaydevprint,
 789 CFARG_IATTR, "wsemuldisplaydev",
 790 CFARG_EOL);
789#if 0 791#if 0
790 /* XXX 792 /* XXX
791 * turns out some firmware doesn't turn these back on when needed 793 * turns out some firmware doesn't turn these back on when needed
792 * so we need to turn them off only when mapping vram in 794 * so we need to turn them off only when mapping vram in
793 * WSDISPLAYIO_MODE_DUMB would overlap ( unlikely but far from 795 * WSDISPLAYIO_MODE_DUMB would overlap ( unlikely but far from
794 * impossible ) 796 * impossible )
795 */ 797 */
796 if (use_mmio) { 798 if (use_mmio) {
797 /* 799 /*
798 * Now that we took over, turn off the aperture registers if we 800 * Now that we took over, turn off the aperture registers if we
799 * don't use them. Can't do this earlier since on some hardware 801 * don't use them. Can't do this earlier since on some hardware
800 * we use firmware calls as early console output which may in 802 * we use firmware calls as early console output which may in
801 * turn try to access these registers. 803 * turn try to access these registers.

cvs diff -r1.113.2.2 -r1.113.2.3 src/sys/dev/pci/radeonfb.c (expand / switch to unified diff)

--- src/sys/dev/pci/radeonfb.c 2021/04/02 22:17:44 1.113.2.2
+++ src/sys/dev/pci/radeonfb.c 2021/04/24 18:23:09 1.113.2.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: radeonfb.c,v 1.113.2.2 2021/04/02 22:17:44 thorpej Exp $ */ 1/* $NetBSD: radeonfb.c,v 1.113.2.3 2021/04/24 18:23:09 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2006 Itronix Inc. 4 * Copyright (c) 2006 Itronix Inc.
5 * All rights reserved. 5 * All rights reserved.
6 * 6 *
7 * Written by Garrett D'Amore for Itronix Inc. 7 * Written by Garrett D'Amore for Itronix Inc.
8 * 8 *
9 * Redistribution and use in source and binary forms, with or without 9 * Redistribution and use in source and binary forms, with or without
10 * modification, are permitted provided that the following conditions 10 * modification, are permitted provided that the following conditions
11 * are met: 11 * are met:
12 * 1. Redistributions of source code must retain the above copyright 12 * 1. Redistributions of source code must retain the above copyright
13 * notice, this list of conditions and the following disclaimer. 13 * notice, this list of conditions and the following disclaimer.
14 * 2. Redistributions in binary form must reproduce the above copyright 14 * 2. Redistributions in binary form must reproduce the above copyright
@@ -60,27 +60,27 @@ @@ -60,27 +60,27 @@
60 * portions of the Software. 60 * portions of the Software.
61 * 61 *
62 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 62 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
63 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 63 * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
64 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND 64 * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
65 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR 65 * NON-INFRINGEMENT. IN NO EVENT SHALL ATI, VA LINUX SYSTEMS AND/OR
66 * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, 66 * THEIR SUPPLIERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
67 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, 67 * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
68 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 68 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
69 * DEALINGS IN THE SOFTWARE. 69 * DEALINGS IN THE SOFTWARE.
70 */ 70 */
71 71
72#include <sys/cdefs.h> 72#include <sys/cdefs.h>
73__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.113.2.2 2021/04/02 22:17:44 thorpej Exp $"); 73__KERNEL_RCSID(0, "$NetBSD: radeonfb.c,v 1.113.2.3 2021/04/24 18:23:09 thorpej Exp $");
74 74
75#include <sys/param.h> 75#include <sys/param.h>
76#include <sys/systm.h> 76#include <sys/systm.h>
77#include <sys/device.h> 77#include <sys/device.h>
78#include <sys/malloc.h> 78#include <sys/malloc.h>
79#include <sys/bus.h> 79#include <sys/bus.h>
80#include <sys/kernel.h> 80#include <sys/kernel.h>
81#include <sys/lwp.h> 81#include <sys/lwp.h>
82#include <sys/kauth.h> 82#include <sys/kauth.h>
83#include <sys/kmem.h> 83#include <sys/kmem.h>
84 84
85#include <dev/wscons/wsdisplayvar.h> 85#include <dev/wscons/wsdisplayvar.h>
86#include <dev/wscons/wsconsio.h> 86#include <dev/wscons/wsconsio.h>
@@ -1003,27 +1003,29 @@ radeonfb_attach(device_t parent, device_ @@ -1003,27 +1003,29 @@ radeonfb_attach(device_t parent, device_
1003 1003
1004#ifdef SPLASHSCREEN 1004#ifdef SPLASHSCREEN
1005 if (splash_render(&dp->rd_splash, 1005 if (splash_render(&dp->rd_splash,
1006 SPLASH_F_CENTER|SPLASH_F_FILL) == 0) 1006 SPLASH_F_CENTER|SPLASH_F_FILL) == 0)
1007 SCREEN_DISABLE_DRAWING(&dp->rd_vscreen); 1007 SCREEN_DISABLE_DRAWING(&dp->rd_vscreen);
1008#endif 1008#endif
1009 } 1009 }
1010 1010
1011 aa.console = dp->rd_console; 1011 aa.console = dp->rd_console;
1012 aa.scrdata = &dp->rd_wsscreenlist; 1012 aa.scrdata = &dp->rd_wsscreenlist;
1013 aa.accessops = &radeonfb_accessops; 1013 aa.accessops = &radeonfb_accessops;
1014 aa.accesscookie = &dp->rd_vd; 1014 aa.accesscookie = &dp->rd_vd;
1015 1015
1016 config_found(sc->sc_dev, &aa, wsemuldisplaydevprint, CFARG_EOL); 1016 config_found(sc->sc_dev, &aa, wsemuldisplaydevprint,
 1017 CFARG_IATTR, "wsemuldisplaydev",
 1018 CFARG_EOL);
1017  1019
1018 radeonfb_blank(dp, 0); 1020 radeonfb_blank(dp, 0);
1019 1021
1020 /* Initialise delayed lvds operations for backlight. */ 1022 /* Initialise delayed lvds operations for backlight. */
1021 callout_init(&dp->rd_bl_lvds_co, 0); 1023 callout_init(&dp->rd_bl_lvds_co, 0);
1022 callout_setfunc(&dp->rd_bl_lvds_co, 1024 callout_setfunc(&dp->rd_bl_lvds_co,
1023 radeonfb_lvds_callout, dp); 1025 radeonfb_lvds_callout, dp);
1024 1026
1025 dp->rd_bl_on = 1; 1027 dp->rd_bl_on = 1;
1026 if (sc->sc_flags & RFB_MOB) { 1028 if (sc->sc_flags & RFB_MOB) {
1027 dp->rd_bl_level = radeonfb_get_backlight(dp); 1029 dp->rd_bl_level = radeonfb_get_backlight(dp);
1028 } else 1030 } else
1029 dp->rd_bl_level = 128; 1031 dp->rd_bl_level = 128;

cvs diff -r1.19.34.2 -r1.19.34.3 src/sys/dev/pci/unichromefb.c (expand / switch to unified diff)

--- src/sys/dev/pci/unichromefb.c 2021/04/02 22:17:44 1.19.34.2
+++ src/sys/dev/pci/unichromefb.c 2021/04/24 18:23:09 1.19.34.3
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: unichromefb.c,v 1.19.34.2 2021/04/02 22:17:44 thorpej Exp $ */ 1/* $NetBSD: unichromefb.c,v 1.19.34.3 2021/04/24 18:23:09 thorpej Exp $ */
2 2
3/*- 3/*-
4 * Copyright (c) 2006, 2008 Jared D. McNeill <jmcneill@invisible.ca> 4 * Copyright (c) 2006, 2008 Jared D. McNeill <jmcneill@invisible.ca>
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.
@@ -41,27 +41,27 @@ @@ -41,27 +41,27 @@
41 * next paragraph) shall be included in all copies or substantial portions 41 * next paragraph) shall be included in all copies or substantial portions
42 * of the Software. 42 * of the Software.
43 * 43 *
44 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR 44 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
45 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, 45 * IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
46 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL 46 * FITNESS FOR A PARTICULAR PURPOSE AND NON-INFRINGEMENT. IN NO EVENT SHALL
47 * THE AUTHOR(S) OR COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR 47 * THE AUTHOR(S) OR COPYRIGHT HOLDER(S) BE LIABLE FOR ANY CLAIM, DAMAGES OR
48 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 48 * OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
49 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER 49 * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER
50 * DEALINGS IN THE SOFTWARE. 50 * DEALINGS IN THE SOFTWARE.
51 */ 51 */
52 52
53#include <sys/cdefs.h> 53#include <sys/cdefs.h>
54__KERNEL_RCSID(0, "$NetBSD: unichromefb.c,v 1.19.34.2 2021/04/02 22:17:44 thorpej Exp $"); 54__KERNEL_RCSID(0, "$NetBSD: unichromefb.c,v 1.19.34.3 2021/04/24 18:23:09 thorpej Exp $");
55 55
56#include <sys/param.h> 56#include <sys/param.h>
57#include <sys/systm.h> 57#include <sys/systm.h>
58#include <sys/device.h> 58#include <sys/device.h>
59#include <sys/malloc.h> 59#include <sys/malloc.h>
60 60
61#include <sys/bus.h> 61#include <sys/bus.h>
62 62
63#include <dev/pci/pcivar.h> 63#include <dev/pci/pcivar.h>
64#include <dev/pci/pcireg.h> 64#include <dev/pci/pcireg.h>
65#include <dev/pci/pcidevs.h> 65#include <dev/pci/pcidevs.h>
66#include <dev/pci/pciio.h> 66#include <dev/pci/pciio.h>
67 67
@@ -341,27 +341,29 @@ unichromefb_attach(device_t parent, devi @@ -341,27 +341,29 @@ unichromefb_attach(device_t parent, devi
341 unichromefb_stdscreen.ncols = ri->ri_cols; 341 unichromefb_stdscreen.ncols = ri->ri_cols;
342 unichromefb_stdscreen.nrows = ri->ri_rows; 342 unichromefb_stdscreen.nrows = ri->ri_rows;
343 unichromefb_stdscreen.textops = &ri->ri_ops; 343 unichromefb_stdscreen.textops = &ri->ri_ops;
344 unichromefb_stdscreen.capabilities = ri->ri_caps; 344 unichromefb_stdscreen.capabilities = ri->ri_caps;
345 unichromefb_stdscreen.modecookie = NULL; 345 unichromefb_stdscreen.modecookie = NULL;
346 346
347 wsdisplay_cnattach(&unichromefb_stdscreen, ri, 0, 0, defattr); 347 wsdisplay_cnattach(&unichromefb_stdscreen, ri, 0, 0, defattr);
348 348
349 aa.console = 1; /* XXX */ 349 aa.console = 1; /* XXX */
350 aa.scrdata = &unichromefb_screenlist; 350 aa.scrdata = &unichromefb_screenlist;
351 aa.accessops = &unichromefb_accessops; 351 aa.accessops = &unichromefb_accessops;
352 aa.accesscookie = &sc->sc_vd; 352 aa.accesscookie = &sc->sc_vd;
353 353
354 config_found(self, &aa, wsemuldisplaydevprint, CFARG_EOL); 354 config_found(self, &aa, wsemuldisplaydevprint,
 355 CFARG_IATTR, "wsemuldisplaydev",
 356 CFARG_EOL);
355 357
356 config_found(self, opaque, unichromefb_drm_print, 358 config_found(self, opaque, unichromefb_drm_print,
357 CFARG_IATTR, "drm", 359 CFARG_IATTR, "drm",
358 CFARG_EOL); 360 CFARG_EOL);
359 361
360 return; 362 return;
361} 363}
362 364
363static int 365static int
364unichromefb_drm_print(void *opaque, const char *pnp) 366unichromefb_drm_print(void *opaque, const char *pnp)
365{ 367{
366 if (pnp) 368 if (pnp)
367 aprint_normal("drm at %s", pnp); 369 aprint_normal("drm at %s", pnp);