aboutsummaryrefslogtreecommitdiff
path: root/hw/display/vga.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-06-21 15:51:52 +1000
committerGerd Hoffmann <kraxel@redhat.com>2014-09-30 13:34:09 +0200
commitd2e043a804141ec0a896270d25d6ae370c473ddd (patch)
treef1fe9a52bc512fa0f428cc4f25f6d3a8ef832a1a /hw/display/vga.c
parent9e057c0b09c3018cd24c7a49995f8b66d5b3d1eb (diff)
downloadqemu-d2e043a804141ec0a896270d25d6ae370c473ddd.zip
qemu-d2e043a804141ec0a896270d25d6ae370c473ddd.tar.gz
qemu-d2e043a804141ec0a896270d25d6ae370c473ddd.tar.bz2
vga: Remove remainder of old conversion cruft
All the macros used to generate different versions of vga_template.h are now unnecessary, take them all out and remove the _32 suffix from most functions. Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: David Gibson <david@gibson.dropbear.id.au>
Diffstat (limited to 'hw/display/vga.c')
-rw-r--r--hw/display/vga.c46
1 files changed, 22 insertions, 24 deletions
diff --git a/hw/display/vga.c b/hw/display/vga.c
index 47e5d70..721309f 100644
--- a/hw/display/vga.c
+++ b/hw/display/vga.c
@@ -1009,10 +1009,8 @@ void vga_mem_writeb(VGACommonState *s, hwaddr addr, uint32_t val)
typedef void vga_draw_line_func(VGACommonState *s1, uint8_t *d,
const uint8_t *s, int width);
-#define DEPTH 32
#include "vga_template.h"
-
static unsigned int rgb_to_pixel32_dup(unsigned int r, unsigned int g, unsigned b)
{
unsigned int col;
@@ -1311,19 +1309,19 @@ static void vga_draw_text(VGACommonState *s, int full_update)
bgcol = palette[cattr >> 4];
fgcol = palette[cattr & 0x0f];
if (cw == 16) {
- vga_draw_glyph16_32(d1, linesize,
- font_ptr, cheight, fgcol, bgcol);
+ vga_draw_glyph16(d1, linesize,
+ font_ptr, cheight, fgcol, bgcol);
} else if (cw != 9) {
- vga_draw_glyph8_32(d1, linesize,
- font_ptr, cheight, fgcol, bgcol);
+ vga_draw_glyph8(d1, linesize,
+ font_ptr, cheight, fgcol, bgcol);
} else {
dup9 = 0;
if (ch >= 0xb0 && ch <= 0xdf &&
(s->ar[VGA_ATC_MODE] & 0x04)) {
dup9 = 1;
}
- vga_draw_glyph9_32(d1, linesize,
- font_ptr, cheight, fgcol, bgcol, dup9);
+ vga_draw_glyph9(d1, linesize,
+ font_ptr, cheight, fgcol, bgcol, dup9);
}
if (src == cursor_ptr &&
!(s->cr[VGA_CRTC_CURSOR_START] & 0x20) &&
@@ -1339,14 +1337,14 @@ static void vga_draw_text(VGACommonState *s, int full_update)
h = line_last - line_start + 1;
d = d1 + linesize * line_start;
if (cw == 16) {
- vga_draw_glyph16_32(d, linesize,
- cursor_glyph, h, fgcol, bgcol);
+ vga_draw_glyph16(d, linesize,
+ cursor_glyph, h, fgcol, bgcol);
} else if (cw != 9) {
- vga_draw_glyph8_32(d, linesize,
- cursor_glyph, h, fgcol, bgcol);
+ vga_draw_glyph8(d, linesize,
+ cursor_glyph, h, fgcol, bgcol);
} else {
- vga_draw_glyph9_32(d, linesize,
- cursor_glyph, h, fgcol, bgcol, 1);
+ vga_draw_glyph9(d, linesize,
+ cursor_glyph, h, fgcol, bgcol, 1);
}
}
}
@@ -1384,16 +1382,16 @@ enum {
};
static vga_draw_line_func * const vga_draw_line_table[VGA_DRAW_LINE_NB] = {
- vga_draw_line2_32,
- vga_draw_line2d2_32,
- vga_draw_line4_32,
- vga_draw_line4d2_32,
- vga_draw_line8d2_32,
- vga_draw_line8_32,
- vga_draw_line15_32,
- vga_draw_line16_32,
- vga_draw_line24_32,
- vga_draw_line32_32,
+ vga_draw_line2,
+ vga_draw_line2d2,
+ vga_draw_line4,
+ vga_draw_line4d2,
+ vga_draw_line8d2,
+ vga_draw_line8,
+ vga_draw_line15,
+ vga_draw_line16,
+ vga_draw_line24,
+ vga_draw_line32,
};
static int vga_get_bpp(VGACommonState *s)