aboutsummaryrefslogtreecommitdiff
path: root/hw/display/cirrus_vga.c
diff options
context:
space:
mode:
authorBenjamin Herrenschmidt <benh@kernel.crashing.org>2014-06-22 11:00:50 +1000
committerGerd Hoffmann <kraxel@redhat.com>2014-09-30 13:34:09 +0200
commitd3c2343af09b2e1a568ccac608b8b3d10a36c20c (patch)
tree707983bfcb70a26fd0987750a402938ee1a531f5 /hw/display/cirrus_vga.c
parent46c3a8c8ebe2966cc1f7af12626f89c83d547bfb (diff)
vga: Remove rgb_to_pixel indirection
We always use rgb_to_pixel32 nowadays. 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/cirrus_vga.c')
-rw-r--r--hw/display/cirrus_vga.c15
1 files changed, 9 insertions, 6 deletions
diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index db330e9548..6f8d149d60 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -29,6 +29,7 @@
#include "hw/hw.h"
#include "hw/pci/pci.h"
#include "ui/console.h"
+#include "ui/pixel_ops.h"
#include "vga_int.h"
#include "hw/loader.h"
@@ -2212,6 +2213,8 @@ static void cirrus_cursor_draw_line(VGACommonState *s1, uint8_t *d1, int scr_y)
} else {
src += (s->vga.sr[0x13] & 0x3f) * 256;
src += (scr_y - s->hw_cursor_y) * 4;
+
+
poffset = 128;
content = ((uint32_t *)src)[0] |
((uint32_t *)(src + 128))[0];
@@ -2229,12 +2232,12 @@ static void cirrus_cursor_draw_line(VGACommonState *s1, uint8_t *d1, int scr_y)
x2 = s->vga.last_scr_width;
w = x2 - x1;
palette = s->cirrus_hidden_palette;
- color0 = s->vga.rgb_to_pixel(c6_to_8(palette[0x0 * 3]),
- c6_to_8(palette[0x0 * 3 + 1]),
- c6_to_8(palette[0x0 * 3 + 2]));
- color1 = s->vga.rgb_to_pixel(c6_to_8(palette[0xf * 3]),
- c6_to_8(palette[0xf * 3 + 1]),
- c6_to_8(palette[0xf * 3 + 2]));
+ color0 = rgb_to_pixel32(c6_to_8(palette[0x0 * 3]),
+ c6_to_8(palette[0x0 * 3 + 1]),
+ c6_to_8(palette[0x0 * 3 + 2]));
+ color1 = rgb_to_pixel32(c6_to_8(palette[0xf * 3]),
+ c6_to_8(palette[0xf * 3 + 1]),
+ c6_to_8(palette[0xf * 3 + 2]));
bpp = surface_bytes_per_pixel(surface);
d1 += x1 * bpp;
switch (surface_bits_per_pixel(surface)) {