versatile_clcd.c (244755) | versatile_clcd.c (245071) |
---|---|
1/* 2 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> | 1/* 2 * Copyright (c) 2012 Oleksandr Tymoshenko <gonzo@freebsd.org> 3 * All rights reserved. 4 * 5 * Redistribution and use in source and binary forms, with or without 6 * modification, are permitted provided that the following conditions 7 * are met: 8 * 1. Redistributions of source code must retain the above copyright --- 11 unchanged lines hidden (view full) --- 20 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24 * SUCH DAMAGE. 25 */ 26 27#include <sys/cdefs.h> |
28__FBSDID("$FreeBSD: head/sys/arm/versatile/versatile_clcd.c 244755 2012-12-28 00:55:43Z gonzo $"); | 28__FBSDID("$FreeBSD: head/sys/arm/versatile/versatile_clcd.c 245071 2013-01-05 21:05:16Z gonzo $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35#include <sys/malloc.h> 36#include <sys/rman.h> --- 850 unchanged lines hidden (view full) --- 887 row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight; 888 col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth; 889 p = sc->font + c*VERSATILE_FONT_HEIGHT; 890 addr = (uint8_t *)sc->fb_addr 891 + (row + sc->ymargin)*(sc->stride) 892 + (sc->depth/8) * (col + sc->xmargin); 893 894 fg = a & 0xf ; | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bus.h> 33#include <sys/kernel.h> 34#include <sys/module.h> 35#include <sys/malloc.h> 36#include <sys/rman.h> --- 850 unchanged lines hidden (view full) --- 887 row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight; 888 col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth; 889 p = sc->font + c*VERSATILE_FONT_HEIGHT; 890 addr = (uint8_t *)sc->fb_addr 891 + (row + sc->ymargin)*(sc->stride) 892 + (sc->depth/8) * (col + sc->xmargin); 893 894 fg = a & 0xf ; |
895 bg = (a >> 8) & 0xf; | 895 bg = (a >> 4) & 0xf; |
896 897 for (i = 0; i < VERSATILE_FONT_HEIGHT; i++) { 898 for (j = 0, k = 7; j < 8; j++, k--) { 899 if ((p[i] & (1 << k)) == 0) 900 color = bg; 901 else 902 color = fg; 903 --- 56 unchanged lines hidden --- | 896 897 for (i = 0; i < VERSATILE_FONT_HEIGHT; i++) { 898 for (j = 0, k = 7; j < 8; j++, k--) { 899 if ((p[i] & (1 << k)) == 0) 900 color = bg; 901 else 902 color = fg; 903 --- 56 unchanged lines hidden --- |