bcm2835_fb.c (243423) | bcm2835_fb.c (243666) |
---|---|
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 243423 2012-11-23 04:30:54Z gonzo $"); | 28__FBSDID("$FreeBSD: head/sys/arm/broadcom/bcm2835/bcm2835_fb.c 243666 2012-11-29 05:46:46Z 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> --- 709 unchanged lines hidden (view full) --- 746 if (sc->fb_addr == 0) 747 return (0); 748 749 row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight; 750 col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth; 751 p = sc->font + c*BCMFB_FONT_HEIGHT; 752 addr = (uint8_t *)sc->fb_addr 753 + (row + sc->ymargin)*(sc->stride) | 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> --- 709 unchanged lines hidden (view full) --- 746 if (sc->fb_addr == 0) 747 return (0); 748 749 row = (off / adp->va_info.vi_width) * adp->va_info.vi_cheight; 750 col = (off % adp->va_info.vi_width) * adp->va_info.vi_cwidth; 751 p = sc->font + c*BCMFB_FONT_HEIGHT; 752 addr = (uint8_t *)sc->fb_addr 753 + (row + sc->ymargin)*(sc->stride) |
754 + 3 * (col + sc->xmargin); | 754 + (sc->depth/8) * (col + sc->xmargin); |
755 756 fg = a & 0xf ; 757 bg = (a >> 8) & 0xf; 758 759 for (i = 0; i < BCMFB_FONT_HEIGHT; i++) { 760 for (j = 0, k = 7; j < 8; j++, k--) { 761 if ((p[i] & (1 << k)) == 0) 762 color = bg; --- 70 unchanged lines hidden --- | 755 756 fg = a & 0xf ; 757 bg = (a >> 8) & 0xf; 758 759 for (i = 0; i < BCMFB_FONT_HEIGHT; i++) { 760 for (j = 0, k = 7; j < 8; j++, k--) { 761 if ((p[i] & (1 << k)) == 0) 762 color = bg; --- 70 unchanged lines hidden --- |