Thu Jan 17 01:10:53 2013 UTC ()
don't draw blanks by hand, use the blitter instead


(macallan)
diff -r1.12 -r1.13 src/sys/arch/arm/omap/omapfb.c

cvs diff -r1.12 -r1.13 src/sys/arch/arm/omap/Attic/omapfb.c (expand / switch to unified diff)

--- src/sys/arch/arm/omap/Attic/omapfb.c 2013/01/16 20:34:10 1.12
+++ src/sys/arch/arm/omap/Attic/omapfb.c 2013/01/17 01:10:52 1.13
@@ -1,14 +1,14 @@ @@ -1,14 +1,14 @@
1/* $NetBSD: omapfb.c,v 1.12 2013/01/16 20:34:10 macallan Exp $ */ 1/* $NetBSD: omapfb.c,v 1.13 2013/01/17 01:10:52 macallan 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.12 2013/01/16 20:34:10 macallan Exp $"); 34__KERNEL_RCSID(0, "$NetBSD: omapfb.c,v 1.13 2013/01/17 01:10:52 macallan 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
@@ -791,26 +791,37 @@ omapfb_cursor(void *cookie, int on, int  @@ -791,26 +791,37 @@ omapfb_cursor(void *cookie, int on, int
791 scr->scr_ri.ri_crow = row; 791 scr->scr_ri.ri_crow = row;
792 scr->scr_ri.ri_ccol = col; 792 scr->scr_ri.ri_ccol = col;
793 scr->scr_ri.ri_flg &= ~RI_CURSOR; 793 scr->scr_ri.ri_flg &= ~RI_CURSOR;
794 } 794 }
795} 795}
796 796
797static void 797static void
798omapfb_putchar(void *cookie, int row, int col, u_int c, long attr) 798omapfb_putchar(void *cookie, int row, int col, u_int c, long attr)
799{ 799{
800 struct rasops_info *ri = cookie; 800 struct rasops_info *ri = cookie;
801 struct vcons_screen *scr = ri->ri_hw; 801 struct vcons_screen *scr = ri->ri_hw;
802 struct omapfb_softc *sc = scr->scr_cookie; 802 struct omapfb_softc *sc = scr->scr_cookie;
803 803
 804 if (c == 0x20) {
 805 uint32_t fg, bg, ul;
 806 rasops_unpack_attr(attr, &fg, &bg, &ul);
 807 omapfb_rectfill(sc,
 808 ri->ri_xorigin + ri->ri_font->fontwidth * col,
 809 ri->ri_yorigin + ri->ri_font->fontheight * row,
 810 ri->ri_font->fontwidth,
 811 ri->ri_font->fontheight,
 812 ri->ri_devcmap[bg]);
 813 return;
 814 }
804 omapfb_wait_idle(sc); 815 omapfb_wait_idle(sc);
805 sc->sc_putchar(cookie, row, col, c, attr);  816 sc->sc_putchar(cookie, row, col, c, attr);
806} 817}
807 818
808static void 819static void
809omapfb_copycols(void *cookie, int row, int srccol, int dstcol, int ncols) 820omapfb_copycols(void *cookie, int row, int srccol, int dstcol, int ncols)
810{ 821{
811 struct rasops_info *ri = cookie; 822 struct rasops_info *ri = cookie;
812 struct vcons_screen *scr = ri->ri_hw; 823 struct vcons_screen *scr = ri->ri_hw;
813 struct omapfb_softc *sc = scr->scr_cookie; 824 struct omapfb_softc *sc = scr->scr_cookie;
814 int32_t xs, xd, y, width, height; 825 int32_t xs, xd, y, width, height;
815  826
816 if ((sc->sc_locked == 0) && (sc->sc_mode == WSDISPLAYIO_MODE_EMUL)) { 827 if ((sc->sc_locked == 0) && (sc->sc_mode == WSDISPLAYIO_MODE_EMUL)) {