Prettify intelfb/radeondrmkmsfb autoconf output.diff -r1.4 -r1.5 src/sys/external/bsd/drm2/i915drm/intelfb.c
(riastradh)
--- src/sys/external/bsd/drm2/i915drm/intelfb.c 2014/07/24 21:45:03 1.4
+++ src/sys/external/bsd/drm2/i915drm/intelfb.c 2014/07/25 16:35:43 1.5
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: intelfb.c,v 1.4 2014/07/24 21:45:03 riastradh Exp $ */ | 1 | /* $NetBSD: intelfb.c,v 1.5 2014/07/25 16:35:43 riastradh Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Taylor R. Campbell. | 8 | * by Taylor R. Campbell. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -20,27 +20,27 @@ | @@ -20,27 +20,27 @@ | |||
20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | 20 | * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED | |
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | #include <sys/cdefs.h> | 32 | #include <sys/cdefs.h> | |
33 | __KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.4 2014/07/24 21:45:03 riastradh Exp $"); | 33 | __KERNEL_RCSID(0, "$NetBSD: intelfb.c,v 1.5 2014/07/25 16:35:43 riastradh Exp $"); | |
34 | 34 | |||
35 | #ifdef _KERNEL_OPT | 35 | #ifdef _KERNEL_OPT | |
36 | #include "vga.h" | 36 | #include "vga.h" | |
37 | #endif | 37 | #endif | |
38 | 38 | |||
39 | #include <sys/types.h> | 39 | #include <sys/types.h> | |
40 | #include <sys/bus.h> | 40 | #include <sys/bus.h> | |
41 | #include <sys/device.h> | 41 | #include <sys/device.h> | |
42 | 42 | |||
43 | #include <dev/pci/pciio.h> | 43 | #include <dev/pci/pciio.h> | |
44 | #include <dev/pci/pcireg.h> | 44 | #include <dev/pci/pcireg.h> | |
45 | #include <dev/pci/pcivar.h> | 45 | #include <dev/pci/pcivar.h> | |
46 | 46 | |||
@@ -104,26 +104,29 @@ intelfb_match(device_t parent, cfdata_t | @@ -104,26 +104,29 @@ intelfb_match(device_t parent, cfdata_t | |||
104 | static void | 104 | static void | |
105 | intelfb_attach(device_t parent, device_t self, void *aux) | 105 | intelfb_attach(device_t parent, device_t self, void *aux) | |
106 | { | 106 | { | |
107 | struct intelfb_softc *const sc = device_private(self); | 107 | struct intelfb_softc *const sc = device_private(self); | |
108 | const struct intelfb_attach_args *const ifa = aux; | 108 | const struct intelfb_attach_args *const ifa = aux; | |
109 | int error; | 109 | int error; | |
110 | 110 | |||
111 | sc->sc_dev = self; | 111 | sc->sc_dev = self; | |
112 | sc->sc_ifa = *ifa; | 112 | sc->sc_ifa = *ifa; | |
113 | sc->sc_mapped = false; | 113 | sc->sc_mapped = false; | |
114 | sc->sc_scheduled = false; | 114 | sc->sc_scheduled = false; | |
115 | sc->sc_attached = false; | 115 | sc->sc_attached = false; | |
116 | 116 | |||
117 | aprint_naive("\n"); | |||
118 | aprint_normal("\n"); | |||
119 | ||||
117 | /* XXX Defer this too? */ | 120 | /* XXX Defer this too? */ | |
118 | error = bus_space_map(ifa->ifa_fb_bst, ifa->ifa_fb_addr, | 121 | error = bus_space_map(ifa->ifa_fb_bst, ifa->ifa_fb_addr, | |
119 | ifa->ifa_fb_size, | 122 | ifa->ifa_fb_size, | |
120 | (BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE), | 123 | (BUS_SPACE_MAP_LINEAR | BUS_SPACE_MAP_PREFETCHABLE), | |
121 | &sc->sc_fb_bsh); | 124 | &sc->sc_fb_bsh); | |
122 | if (error) { | 125 | if (error) { | |
123 | aprint_error_dev(self, "unable to map framebuffer: %d\n", | 126 | aprint_error_dev(self, "unable to map framebuffer: %d\n", | |
124 | error); | 127 | error); | |
125 | goto fail0; | 128 | goto fail0; | |
126 | } | 129 | } | |
127 | sc->sc_mapped = true; | 130 | sc->sc_mapped = true; | |
128 | 131 | |||
129 | i915drmkms_task_init(&sc->sc_setconfig_task, &intelfb_setconfig_task); | 132 | i915drmkms_task_init(&sc->sc_setconfig_task, &intelfb_setconfig_task); |
--- src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c 2014/07/25 12:35:03 1.1
+++ src/sys/external/bsd/drm2/radeon/radeondrmkmsfb.c 2014/07/25 16:35:43 1.2
@@ -1,14 +1,14 @@ | @@ -1,14 +1,14 @@ | |||
1 | /* $NetBSD: radeondrmkmsfb.c,v 1.1 2014/07/25 12:35:03 riastradh Exp $ */ | 1 | /* $NetBSD: radeondrmkmsfb.c,v 1.2 2014/07/25 16:35:43 riastradh Exp $ */ | |
2 | 2 | |||
3 | /*- | 3 | /*- | |
4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | 4 | * Copyright (c) 2014 The NetBSD Foundation, Inc. | |
5 | * All rights reserved. | 5 | * All rights reserved. | |
6 | * | 6 | * | |
7 | * This code is derived from software contributed to The NetBSD Foundation | 7 | * This code is derived from software contributed to The NetBSD Foundation | |
8 | * by Taylor R. Campbell. | 8 | * by Taylor R. Campbell. | |
9 | * | 9 | * | |
10 | * Redistribution and use in source and binary forms, with or without | 10 | * Redistribution and use in source and binary forms, with or without | |
11 | * modification, are permitted provided that the following conditions | 11 | * modification, are permitted provided that the following conditions | |
12 | * are met: | 12 | * are met: | |
13 | * 1. Redistributions of source code must retain the above copyright | 13 | * 1. Redistributions of source code must retain the above copyright | |
14 | * notice, this list of conditions and the following disclaimer. | 14 | * notice, this list of conditions and the following disclaimer. | |
@@ -21,27 +21,27 @@ | @@ -21,27 +21,27 @@ | |||
21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | 21 | * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR | |
22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | 22 | * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS | |
23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | 23 | * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR | |
24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | 24 | * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF | |
25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | 25 | * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS | |
26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | 26 | * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN | |
27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | 27 | * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) | |
28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | 28 | * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE | |
29 | * POSSIBILITY OF SUCH DAMAGE. | 29 | * POSSIBILITY OF SUCH DAMAGE. | |
30 | */ | 30 | */ | |
31 | 31 | |||
32 | 32 | |||
33 | #include <sys/cdefs.h> | 33 | #include <sys/cdefs.h> | |
34 | __KERNEL_RCSID(0, "$NetBSD: radeondrmkmsfb.c,v 1.1 2014/07/25 12:35:03 riastradh Exp $"); | 34 | __KERNEL_RCSID(0, "$NetBSD: radeondrmkmsfb.c,v 1.2 2014/07/25 16:35:43 riastradh Exp $"); | |
35 | 35 | |||
36 | #ifdef _KERNEL_OPT | 36 | #ifdef _KERNEL_OPT | |
37 | #include "vga.h" | 37 | #include "vga.h" | |
38 | #endif | 38 | #endif | |
39 | 39 | |||
40 | #include <sys/types.h> | 40 | #include <sys/types.h> | |
41 | #include <sys/device.h> | 41 | #include <sys/device.h> | |
42 | 42 | |||
43 | #include <dev/pci/pciio.h> | 43 | #include <dev/pci/pciio.h> | |
44 | #include <dev/pci/pcireg.h> | 44 | #include <dev/pci/pcireg.h> | |
45 | #include <dev/pci/pcivar.h> | 45 | #include <dev/pci/pcivar.h> | |
46 | 46 | |||
47 | #include <dev/pci/wsdisplay_pci.h> | 47 | #include <dev/pci/wsdisplay_pci.h> | |
@@ -101,26 +101,29 @@ radeonfb_match(device_t parent, cfdata_t | @@ -101,26 +101,29 @@ radeonfb_match(device_t parent, cfdata_t | |||
101 | 101 | |||
102 | static void | 102 | static void | |
103 | radeonfb_attach(device_t parent, device_t self, void *aux) | 103 | radeonfb_attach(device_t parent, device_t self, void *aux) | |
104 | { | 104 | { | |
105 | struct radeonfb_softc *const sc = device_private(self); | 105 | struct radeonfb_softc *const sc = device_private(self); | |
106 | const struct radeonfb_attach_args *const rfa = aux; | 106 | const struct radeonfb_attach_args *const rfa = aux; | |
107 | int error; | 107 | int error; | |
108 | 108 | |||
109 | sc->sc_dev = self; | 109 | sc->sc_dev = self; | |
110 | sc->sc_rfa = *rfa; | 110 | sc->sc_rfa = *rfa; | |
111 | sc->sc_scheduled = false; | 111 | sc->sc_scheduled = false; | |
112 | sc->sc_attached = false; | 112 | sc->sc_attached = false; | |
113 | 113 | |||
114 | aprint_naive("\n"); | |||
115 | aprint_normal("\n"); | |||
116 | ||||
114 | radeon_task_init(&sc->sc_setconfig_task, &radeonfb_setconfig_task); | 117 | radeon_task_init(&sc->sc_setconfig_task, &radeonfb_setconfig_task); | |
115 | error = radeon_task_schedule(parent, &sc->sc_setconfig_task); | 118 | error = radeon_task_schedule(parent, &sc->sc_setconfig_task); | |
116 | if (error) { | 119 | if (error) { | |
117 | aprint_error_dev(self, "failed to schedule mode set: %d\n", | 120 | aprint_error_dev(self, "failed to schedule mode set: %d\n", | |
118 | error); | 121 | error); | |
119 | goto fail0; | 122 | goto fail0; | |
120 | } | 123 | } | |
121 | sc->sc_scheduled = true; | 124 | sc->sc_scheduled = true; | |
122 | 125 | |||
123 | /* Success! */ | 126 | /* Success! */ | |
124 | return; | 127 | return; | |
125 | 128 | |||
126 | fail0: return; | 129 | fail0: return; |