diff options
author | BALATON Zoltan | 2019-08-11 23:14:53 +0200 |
---|---|---|
committer | Gerd Hoffmann | 2019-08-21 10:56:27 +0200 |
commit | 747d7ad231a0955991e179deb482ce94376f1e17 (patch) | |
tree | d318977298df2fbe96208c4f4727b9d8be97305c /hw/display/ati.c | |
parent | ati-vga: Fix cursor color with guest_hwcursor=true (diff) | |
download | qemu-747d7ad231a0955991e179deb482ce94376f1e17.tar.gz qemu-747d7ad231a0955991e179deb482ce94376f1e17.tar.xz qemu-747d7ad231a0955991e179deb482ce94376f1e17.zip |
ati-vga: Fix hardware cursor image offset
The crtc_offset is not needed, cur_offset is relative to the start of
vram not the start of displayed area. This fixes broken pointer image
with MacOS that uses non-0 crtc_offset.
Signed-off-by: BALATON Zoltan <balaton@eik.bme.hu>
Message-id: e6acb1fa3ca980dc948045443e5986e2aa79bf7c.1565558093.git.balaton@eik.bme.hu
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Diffstat (limited to 'hw/display/ati.c')
-rw-r--r-- | hw/display/ati.c | 8 |
1 files changed, 3 insertions, 5 deletions
diff --git a/hw/display/ati.c b/hw/display/ati.c index d372e346ff..ff04f7eb4a 100644 --- a/hw/display/ati.c +++ b/hw/display/ati.c @@ -132,9 +132,8 @@ static void ati_cursor_define(ATIVGAState *s) return; /* Do not update cursor if locked or rendered by guest */ } /* FIXME handle cur_hv_offs correctly */ - src = s->vga.vram_ptr + (s->regs.crtc_offset & 0x07ffffff) + - s->regs.cur_offset - (s->regs.cur_hv_offs >> 16) - - (s->regs.cur_hv_offs & 0xffff) * 16; + src = s->vga.vram_ptr + s->regs.cur_offset - + (s->regs.cur_hv_offs >> 16) - (s->regs.cur_hv_offs & 0xffff) * 16; for (i = 0; i < 64; i++) { for (j = 0; j < 8; j++, idx++) { data[idx] = src[i * 16 + j]; @@ -190,8 +189,7 @@ static void ati_cursor_draw_line(VGACommonState *vga, uint8_t *d, int scr_y) return; } /* FIXME handle cur_hv_offs correctly */ - src = s->vga.vram_ptr + (s->regs.crtc_offset & 0x07ffffff) + - s->cursor_offset + (scr_y - vga->hw_cursor_y) * 16; + src = s->vga.vram_ptr + s->cursor_offset + (scr_y - vga->hw_cursor_y) * 16; dp = &dp[vga->hw_cursor_x]; h = ((s->regs.crtc_h_total_disp >> 16) + 1) * 8; for (i = 0; i < 8; i++) { |