diff mbox series

cirrus_vga/migration: update the bank offset before use

Message ID 20181123064646.23036-1-linzhecheng@huawei.com (mailing list archive)
State New, archived
Headers show
Series cirrus_vga/migration: update the bank offset before use | expand

Commit Message

linzhecheng Nov. 23, 2018, 6:46 a.m. UTC
From: Wang Xin <wangxinxin.wang@huawei.com>

The cirrus bank0/1 offset should be updated before we update the vram's alias
offset.

Signed-off-by: Wang Xin <wangxinxin.wang@huawei.com>

Comments

Gerd Hoffmann Nov. 26, 2018, 10:10 a.m. UTC | #1
On Fri, Nov 23, 2018 at 02:46:46PM +0800, linzhecheng wrote:
> From: Wang Xin <wangxinxin.wang@huawei.com>
> 
> The cirrus bank0/1 offset should be updated before we update the vram's alias
> offset.

Queued for 3.1

thanks,
  Gerd
diff mbox series

Patch

diff --git a/hw/display/cirrus_vga.c b/hw/display/cirrus_vga.c
index d9b854d..a0e7146 100644
--- a/hw/display/cirrus_vga.c
+++ b/hw/display/cirrus_vga.c
@@ -2746,11 +2746,12 @@  static int cirrus_post_load(void *opaque, int version_id)
     s->vga.gr[0x00] = s->cirrus_shadow_gr0 & 0x0f;
     s->vga.gr[0x01] = s->cirrus_shadow_gr1 & 0x0f;
 
+    cirrus_update_bank_ptr(s, 0);
+    cirrus_update_bank_ptr(s, 1);
     cirrus_update_memory_access(s);
     /* force refresh */
     s->vga.graphic_mode = -1;
-    cirrus_update_bank_ptr(s, 0);
-    cirrus_update_bank_ptr(s, 1);
+
     return 0;
 }