1 From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
2 From: Gerd Hoffmann <kraxel@redhat.com>
3 Date: Tue, 10 Oct 2017 16:13:21 +0200
4 Subject: [PATCH] vga: drop line_offset variable
6 Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
8 hw/display/vga.c | 7 +++----
9 1 file changed, 3 insertions(+), 4 deletions(-)
11 diff --git a/hw/display/vga.c b/hw/display/vga.c
12 index a99d831e04..77af807a51 100644
13 --- a/hw/display/vga.c
14 +++ b/hw/display/vga.c
15 @@ -1464,7 +1464,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
17 DisplaySurface *surface = qemu_console_surface(s->con);
18 int y1, y, update, linesize, y_start, double_scan, mask, depth;
19 - int width, height, shift_control, line_offset, bwidth, bits;
20 + int width, height, shift_control, bwidth, bits;
21 ram_addr_t page0, page1;
22 DirtyBitmapSnapshot *snap = NULL;
23 int disp_width, multi_scan, multi_run;
24 @@ -1614,7 +1614,6 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
25 s->cursor_invalidate(s);
28 - line_offset = s->line_offset;
30 printf("w=%d h=%d v=%d line_offset=%d cr[0x09]=0x%02x cr[0x17]=0x%02x linecmp=%d sr[0x01]=0x%02x\n",
31 width, height, v, line_offset, s->cr[9], s->cr[VGA_CRTC_MODE],
32 @@ -1629,7 +1628,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
35 ram_addr_t region_start = addr1;
36 - ram_addr_t region_end = addr1 + line_offset * height;
37 + ram_addr_t region_end = addr1 + s->line_offset * height;
38 vga_sync_dirty_bitmap(s);
39 if (s->line_compare < height) {
40 /* split screen mode */
41 @@ -1681,7 +1680,7 @@ static void vga_draw_graphic(VGACommonState *s, int full_update)
43 mask = (s->cr[VGA_CRTC_MODE] & 3) ^ 3;
44 if ((y1 & mask) == mask)
45 - addr1 += line_offset;
46 + addr1 += s->line_offset;
48 multi_run = multi_scan;