Patchwork [12/13] vga: Move vga_sync_dirty_bitmap

login
register
mail settings
Submitter Jan Kiszka
Date June 14, 2011, 4:53 p.m.
Message ID <5d2486cc482173fbbdba475705a9520ef4380d13.1308070416.git.jan.kiszka@siemens.com>
Download mbox | patch
Permalink /patch/100391/
State New
Headers show

Comments

Jan Kiszka - June 14, 2011, 4:53 p.m.
We will need it earlier in the code.

Signed-off-by: Jan Kiszka <jan.kiszka@siemens.com>
---
 hw/vga.c |   37 ++++++++++++++++++-------------------
 1 files changed, 18 insertions(+), 19 deletions(-)

Patch

diff --git a/hw/vga.c b/hw/vga.c
index ee0c68e..4208151 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -152,6 +152,24 @@  static void vga_screen_dump(void *opaque, const char *filename);
 static char *screen_dump_filename;
 static DisplayChangeListener *screen_dump_dcl;
 
+static void vga_sync_dirty_bitmap(VGACommonState *s)
+{
+    if (s->map_addr) {
+        cpu_physical_sync_dirty_bitmap(s->map_addr, s->map_end);
+    }
+    if (s->vga_mem_mapped) {
+        cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa0000, 0xa8000);
+        cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa8000, 0xb0000);
+    }
+#ifdef CONFIG_BOCHS_VBE
+    if (s->vbe_mapped) {
+        cpu_physical_sync_dirty_bitmap(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
+                                       VBE_DISPI_LFB_PHYSICAL_ADDRESS +
+                                       s->vram_size);
+    }
+#endif
+}
+
 static void vga_dumb_update_retrace_info(VGACommonState *s)
 {
     (void) s;
@@ -1551,25 +1569,6 @@  void vga_invalidate_scanlines(VGACommonState *s, int y1, int y2)
     }
 }
 
-static void vga_sync_dirty_bitmap(VGACommonState *s)
-{
-    if (s->map_addr)
-        cpu_physical_sync_dirty_bitmap(s->map_addr, s->map_end);
-
-    if (s->vga_mem_mapped) {
-        cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa0000, 0xa8000);
-        cpu_physical_sync_dirty_bitmap(isa_mem_base + 0xa8000, 0xb0000);
-    }
-
-#ifdef CONFIG_BOCHS_VBE
-    if (s->vbe_mapped) {
-        cpu_physical_sync_dirty_bitmap(VBE_DISPI_LFB_PHYSICAL_ADDRESS,
-                                       VBE_DISPI_LFB_PHYSICAL_ADDRESS + s->vram_size);
-    }
-#endif
-
-}
-
 /*
  * graphic modes
  */