FreeBSD Bugzilla – Attachment 148707 Details for
Bug 194635
Speed optimisation for framebuffer console driver on Raspberry Pi
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
changes on /sys/arm/broadcom/bcm2835/bcm2835_fb.c
bcm2835_fb.diff (text/plain), 3.38 KB, created by
Stefan Berndt
on 2014-10-27 17:28:37 UTC
(
hide
)
Description:
changes on /sys/arm/broadcom/bcm2835/bcm2835_fb.c
Filename:
MIME Type:
Creator:
Stefan Berndt
Created:
2014-10-27 17:28:37 UTC
Size:
3.38 KB
patch
obsolete
>80,99c80 >< static uint16_t bcmfb_palette16[16] = { >< 0x0000, >< 0x0015, >< 0x0540, >< 0x0555, >< 0xa800, >< 0xa815, >< 0xaaa0, >< 0xad55, >< 0x52aa, >< 0x52bf, >< 0x57ea, >< 0x57ff, >< 0xfaaa, >< 0xfabf, >< 0xffea, >< 0xffff >< }; >< >< static struct argb bcmfb_palette24[16] = { >--- >> static struct argb bcmfb_palette[16] = { >118,136d98 >< static uint32_t bcmfb_palette32[16] = { >< 0x00000000, >< 0x00aa0000, >< 0x0000aa00, >< 0x00aaaa00, >< 0x000000aa, >< 0x00aa00aa, >< 0x000055aa, >< 0x00aaaaaa, >< 0x00555555, >< 0x00ff5555, >< 0x0055ff55, >< 0x00ffff55, >< 0x005555ff, >< 0x00ff55ff, >< 0x0055ffff, >< 0x00ffffff >< }; >< >943c905 >< int i, j; >--- >> int i, j, k; >945,946d906 >< uint16_t *addr16; >< uint32_t *addr32; >948,953c908,909 >< uint8_t fg, bg; >< uint32_t fg32, bg32; >< uint8_t fg24r, bg24r, fg24g, bg24g, fg24b, bg24b; >< uint16_t fg16, bg16; >< u_char pa; >< uint32_t stride; >--- >> uint8_t fg, bg, color; >> uint16_t rgb; >962a919,921 >> addr = (uint8_t *)sc->fb_addr >> + (row + sc->ymargin)*(sc->stride) >> + (sc->depth/8) * (col + sc->xmargin); >967,969c926,931 >< addr = (uint8_t *)sc->fb_addr >< + (row + sc->ymargin)*(sc->stride) >< + (sc->depth/8) * (col + sc->xmargin); >--- >> for (i = 0; i < BCMFB_FONT_HEIGHT; i++) { >> for (j = 0, k = 7; j < 8; j++, k--) { >> if ((p[i] & (1 << k)) == 0) >> color = bg; >> else >> color = fg; >971,1019c933,953 >< switch (sc->depth) { >< case 32: >< fg32 = bcmfb_palette32[fg]; >< bg32 = bcmfb_palette32[bg]; >< addr32 = (uint32_t *)addr; >< stride = sc->stride >> 2; >< for (i = 0; i < BCMFB_FONT_HEIGHT; i++) { >< pa = p[i]; >< for (j = 0; j < 8; j++) { >< addr32[j] = (pa & 128) ? fg32 : bg32; >< pa = pa << 1; >< } >< addr32 += stride; >< } >< break; >< case 24: >< fg24r = bcmfb_palette24[fg].r; >< fg24g = bcmfb_palette24[fg].g; >< fg24b = bcmfb_palette24[fg].b; >< bg24r = bcmfb_palette24[bg].r; >< bg24g = bcmfb_palette24[bg].g; >< bg24b = bcmfb_palette24[bg].b; >< for (i = 0; i < BCMFB_FONT_HEIGHT; i++) { >< pa = p[i]; >< for (j = 0; j < 24; j+=3) { >< if (pa & 128) { >< addr[j] = fg24r; >< addr[j+1] = fg24g; >< addr[j+2] = fg24b; >< } else { >< addr[j] = bg24r; >< addr[j+1] = bg24g; >< addr[j+2] = bg24b; >< } >< pa = pa << 1; >< } >< addr += sc->stride; >< } >< break; >< case 16: >< fg16 = bcmfb_palette16[fg]; >< bg16 = bcmfb_palette16[bg]; >< stride = sc->stride >> 1; >< addr16 = (uint16_t *)addr; >< for (i = 0; i < BCMFB_FONT_HEIGHT; i++) { >< pa = p[i]; >< for (j = 0; j < 8; j++) { >< addr16[j] = (pa & 128) ? fg16 : bg16; >< pa = pa << 1; >--- >> switch (sc->depth) { >> case 32: >> addr[4*j+0] = bcmfb_palette[color].r; >> addr[4*j+1] = bcmfb_palette[color].g; >> addr[4*j+2] = bcmfb_palette[color].b; >> addr[4*j+3] = bcmfb_palette[color].a; >> break; >> case 24: >> addr[3*j] = bcmfb_palette[color].r; >> addr[3*j+1] = bcmfb_palette[color].g; >> addr[3*j+2] = bcmfb_palette[color].b; >> break; >> case 16: >> rgb = (bcmfb_palette[color].r >> 3) << 11; >> rgb |= (bcmfb_palette[color].g >> 2) << 5; >> rgb |= (bcmfb_palette[color].b >> 3); >> addr[2*j] = rgb & 0xff; >> addr[2*j + 1] = (rgb >> 8) & 0xff; >> default: >> /* Not supported yet */ >> break; >1021d954 >< addr16 += stride; >1023c956,957 >< break; >--- >> >> addr += (sc->stride); >1025c959,960 >< return (0); >--- >> >> return (0);
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 194635
: 148707 |
148738
|
149418