bcm2835_fbd.c (244762) | bcm2835_fbd.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/broadcom/bcm2835/bcm2835_fb.c 244762 2012-12-28 03:18:05Z gonzo $"); | 28__FBSDID("$FreeBSD: head/sys/arm/broadcom/bcm2835/bcm2835_fb.c 245071 2013-01-05 21:05:16Z gonzo $"); |
29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bio.h> 33#include <sys/bus.h> 34#include <sys/conf.h> 35#include <sys/endian.h> 36#include <sys/kernel.h> --- 849 unchanged lines hidden (view full) --- 886 row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight; 887 col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth; 888 p = sc->font + c*BCMFB_FONT_HEIGHT; 889 addr = (uint8_t *)sc->fb_addr 890 + (row + sc->ymargin)*(sc->stride) 891 + (sc->depth/8) * (col + sc->xmargin); 892 893 fg = a & 0xf ; | 29 30#include <sys/param.h> 31#include <sys/systm.h> 32#include <sys/bio.h> 33#include <sys/bus.h> 34#include <sys/conf.h> 35#include <sys/endian.h> 36#include <sys/kernel.h> --- 849 unchanged lines hidden (view full) --- 886 row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight; 887 col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth; 888 p = sc->font + c*BCMFB_FONT_HEIGHT; 889 addr = (uint8_t *)sc->fb_addr 890 + (row + sc->ymargin)*(sc->stride) 891 + (sc->depth/8) * (col + sc->xmargin); 892 893 fg = a & 0xf ; |
894 bg = (a >> 8) & 0xf; | 894 bg = (a >> 4) & 0xf; |
895 896 for (i = 0; i < BCMFB_FONT_HEIGHT; i++) { 897 for (j = 0, k = 7; j < 8; j++, k--) { 898 if ((p[i] & (1 << k)) == 0) 899 color = bg; 900 else 901 color = fg; 902 --- 67 unchanged lines hidden --- | 895 896 for (i = 0; i < BCMFB_FONT_HEIGHT; i++) { 897 for (j = 0, k = 7; j < 8; j++, k--) { 898 if ((p[i] & (1 << k)) == 0) 899 color = bg; 900 else 901 color = fg; 902 --- 67 unchanged lines hidden --- |