aboutsummaryrefslogtreecommitdiff
path: root/hw/vga.c
diff options
context:
space:
mode:
authorblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-05 17:37:06 +0000
committerblueswir1 <blueswir1@c046a42c-6fe2-441c-8c8c-71466251a162>2009-01-05 17:37:06 +0000
commit4abc796d41ee01a698032e74ac17c1cdc5d290c3 (patch)
tree2766fbe0feae85ffb186cc3c42a7f5d509e3f05f /hw/vga.c
parent785f451b62c8008428343d84549d175cd4f9d099 (diff)
Add cirrus reset handler
The vga reset handler overwrites some cirrus registers, causing reboots to corrupt cirrus state to the point that guests can only bring up 640x480 resolutions. Fix by adding a dedicated cirrus reset handler (which calls the common vga handler). Signed-off-by: Avi Kivity <avi@redhat.com> git-svn-id: svn://svn.savannah.nongnu.org/qemu/trunk@6191 c046a42c-6fe2-441c-8c8c-71466251a162
Diffstat (limited to 'hw/vga.c')
-rw-r--r--hw/vga.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/hw/vga.c b/hw/vga.c
index 80212070ea..bf84c246ed 100644
--- a/hw/vga.c
+++ b/hw/vga.c
@@ -1839,7 +1839,7 @@ static void vga_invalidate_display(void *opaque)
s->last_height = -1;
}
-static void vga_reset(void *opaque)
+void vga_reset(void *opaque)
{
VGAState *s = (VGAState *) opaque;
@@ -2277,7 +2277,6 @@ void vga_common_init(VGAState *s, DisplayState *ds, uint8_t *vga_ram_base,
s->update_retrace_info = vga_precise_update_retrace_info;
break;
}
- qemu_register_reset(vga_reset, s);
vga_reset(s);
}
@@ -2286,6 +2285,7 @@ void vga_init(VGAState *s)
{
int vga_io_memory;
+ qemu_register_reset(vga_reset, s);
register_savevm("vga", 0, 2, vga_save, vga_load, s);
register_ioport_write(0x3c0, 16, 1, vga_ioport_write, s);