| @@ -1,14 +1,14 @@ | | | @@ -1,14 +1,14 @@ |
1 | /* $NetBSD: omapfb.c,v 1.18 2013/02/01 02:53:47 macallan Exp $ */ | | 1 | /* $NetBSD: omapfb.c,v 1.19 2013/02/02 21:02:06 christos Exp $ */ |
2 | | | 2 | |
3 | /* | | 3 | /* |
4 | * Copyright (c) 2010 Michael Lorenz | | 4 | * Copyright (c) 2010 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. |
| @@ -21,27 +21,27 @@ | | | @@ -21,27 +21,27 @@ |
21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, | | 21 | * NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, |
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 OMAP 3530's built-in video controller | | 29 | * A console driver for OMAP 3530's built-in video controller |
30 | * tested on beagleboard only so far | | 30 | * tested on beagleboard only so far |
31 | */ | | 31 | */ |
32 | | | 32 | |
33 | #include <sys/cdefs.h> | | 33 | #include <sys/cdefs.h> |
34 | __KERNEL_RCSID(0, "$NetBSD: omapfb.c,v 1.18 2013/02/01 02:53:47 macallan Exp $"); | | 34 | __KERNEL_RCSID(0, "$NetBSD: omapfb.c,v 1.19 2013/02/02 21:02:06 christos Exp $"); |
35 | | | 35 | |
36 | #include <sys/param.h> | | 36 | #include <sys/param.h> |
37 | #include <sys/systm.h> | | 37 | #include <sys/systm.h> |
38 | #include <sys/kernel.h> | | 38 | #include <sys/kernel.h> |
39 | #include <sys/device.h> | | 39 | #include <sys/device.h> |
40 | #include <sys/malloc.h> | | 40 | #include <sys/malloc.h> |
41 | #include <sys/lwp.h> | | 41 | #include <sys/lwp.h> |
42 | #include <sys/kauth.h> | | 42 | #include <sys/kauth.h> |
43 | | | 43 | |
44 | #include <uvm/uvm_extern.h> | | 44 | #include <uvm/uvm_extern.h> |
45 | | | 45 | |
46 | #include <dev/videomode/videomode.h> | | 46 | #include <dev/videomode/videomode.h> |
47 | | | 47 | |
| @@ -547,27 +547,27 @@ omapfb_ioctl(void *v, void *vs, u_long c | | | @@ -547,27 +547,27 @@ omapfb_ioctl(void *v, void *vs, u_long c |
547 | return EPASSTHROUGH; | | 547 | return EPASSTHROUGH; |
548 | } | | 548 | } |
549 | | | 549 | |
550 | static paddr_t | | 550 | static paddr_t |
551 | omapfb_mmap(void *v, void *vs, off_t offset, int prot) | | 551 | omapfb_mmap(void *v, void *vs, off_t offset, int prot) |
552 | { | | 552 | { |
553 | paddr_t pa = -1; | | 553 | paddr_t pa = -1; |
554 | struct vcons_data *vd = v; | | 554 | struct vcons_data *vd = v; |
555 | struct omapfb_softc *sc = vd->cookie; | | 555 | struct omapfb_softc *sc = vd->cookie; |
556 | | | 556 | |
557 | /* 'regular' framebuffer mmap()ing */ | | 557 | /* 'regular' framebuffer mmap()ing */ |
558 | if (offset < sc->sc_vramsize) { | | 558 | if (offset < sc->sc_vramsize) { |
559 | pa = bus_dmamem_mmap(sc->sc_dmat, sc->sc_dmamem, 1, | | 559 | pa = bus_dmamem_mmap(sc->sc_dmat, sc->sc_dmamem, 1, |
560 | offset + 0x1000, prot, BUS_DMA_PREFETCHABLE); | | 560 | offset + 0x1000, prot, BUS_DMA_COHERENT); |
561 | return pa; | | 561 | return pa; |
562 | } | | 562 | } |
563 | return pa; | | 563 | return pa; |
564 | } | | 564 | } |
565 | | | 565 | |
566 | static void | | 566 | static void |
567 | omapfb_init_screen(void *cookie, struct vcons_screen *scr, | | 567 | omapfb_init_screen(void *cookie, struct vcons_screen *scr, |
568 | int existing, long *defattr) | | 568 | int existing, long *defattr) |
569 | { | | 569 | { |
570 | struct omapfb_softc *sc = cookie; | | 570 | struct omapfb_softc *sc = cookie; |
571 | struct rasops_info *ri = &scr->scr_ri; | | 571 | struct rasops_info *ri = &scr->scr_ri; |
572 | | | 572 | |
573 | ri->ri_depth = sc->sc_depth; | | 573 | ri->ri_depth = sc->sc_depth; |