diff options
author | jkim <jkim@FreeBSD.org> | 2010-03-23 22:16:57 +0000 |
---|---|---|
committer | jkim <jkim@FreeBSD.org> | 2010-03-23 22:16:57 +0000 |
commit | 3a9a11a6bdaa096babff3bcdf41e8cbf8c229498 (patch) | |
tree | c66e25dde4521c876cdae88b61867874d1a50e7a /sys | |
parent | 878de09a93e08cb18bd6536eea31295915a0314c (diff) | |
download | FreeBSD-src-3a9a11a6bdaa096babff3bcdf41e8cbf8c229498.zip FreeBSD-src-3a9a11a6bdaa096babff3bcdf41e8cbf8c229498.tar.gz |
Separate 24-bit pixel draw from 32-bit case. Although it is slower, we do
not want to write a useless zero to inaccessible memory region.
Diffstat (limited to 'sys')
-rw-r--r-- | sys/dev/syscons/scvgarndr.c | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/sys/dev/syscons/scvgarndr.c b/sys/dev/syscons/scvgarndr.c index fd823ce..583e51a 100644 --- a/sys/dev/syscons/scvgarndr.c +++ b/sys/dev/syscons/scvgarndr.c @@ -181,9 +181,12 @@ static u_short mouse_or_mask[16] = { #define vga_drawpxl(pos, color) \ switch (scp->sc->adp->va_info.vi_depth) { \ case 32: \ - case 24: \ writel(pos, vga_palette32[color]); \ break; \ + case 24: \ + writew(pos, vga_palette32[color]); \ + writeb(pos + 2, vga_palette32[color] >> 16); \ + break; \ case 16: \ if (scp->sc->adp->va_info.vi_pixel_fsizes[1] == 5)\ writew(pos, vga_palette15[color]); \ |