Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWZV2-0001IE-8P for qemu-devel@nongnu.org; Mon, 09 Feb 2009 12:00:48 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWZV0-0001Hd-5O for qemu-devel@nongnu.org; Mon, 09 Feb 2009 12:00:47 -0500 Received: from [199.232.76.173] (port=48958 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWZUz-0001HW-RV for qemu-devel@nongnu.org; Mon, 09 Feb 2009 12:00:45 -0500 Received: from savannah.gnu.org ([199.232.41.3]:42250 helo=sv.gnu.org) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LWZUz-0005Wr-90 for qemu-devel@nongnu.org; Mon, 09 Feb 2009 12:00:45 -0500 Received: from cvs.savannah.gnu.org ([199.232.41.69]) by sv.gnu.org with esmtp (Exim 4.63) (envelope-from ) id 1LWZUw-0008SZ-87 for qemu-devel@nongnu.org; Mon, 09 Feb 2009 17:00:42 +0000 Received: from aurel32 by cvs.savannah.gnu.org with local (Exim 4.63) (envelope-from ) id 1LWZUw-0008SV-0q for qemu-devel@nongnu.org; Mon, 09 Feb 2009 17:00:42 +0000 MIME-Version: 1.0 Errors-To: aurel32 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit From: Aurelien Jarno Message-Id: Date: Mon, 09 Feb 2009 17:00:42 +0000 Subject: [Qemu-devel] [6577] Fix displaystate (r6344) regression in blizzard Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: qemu-devel@nongnu.org Revision: 6577 http://svn.sv.gnu.org/viewvc/?view=rev&root=qemu&revision=6577 Author: aurel32 Date: 2009-02-09 17:00:41 +0000 (Mon, 09 Feb 2009) Log Message: ----------- Fix displaystate (r6344) regression in blizzard Testcase: qemu-system-arm -M n810 -kernel /dev/null -m 130 Without this patch, we get a segfault. Signed-off-by: Riku Voipio Signed-off-by: Aurelien Jarno Modified Paths: -------------- trunk/hw/blizzard.c trunk/hw/nseries.c Modified: trunk/hw/blizzard.c =================================================================== --- trunk/hw/blizzard.c 2009-02-09 16:50:00 UTC (rev 6576) +++ trunk/hw/blizzard.c 2009-02-09 17:00:41 UTC (rev 6577) @@ -959,6 +959,10 @@ s->fb = qemu_malloc(0x180000); + s->state = graphic_console_init(blizzard_update_display, + blizzard_invalidate_display, + blizzard_screen_dump, NULL, s); + switch (ds_get_bits_per_pixel(s->state)) { case 0: s->line_fn_tab[0] = s->line_fn_tab[1] = @@ -991,9 +995,5 @@ blizzard_reset(s); - s->state = graphic_console_init(blizzard_update_display, - blizzard_invalidate_display, - blizzard_screen_dump, NULL, s); - return s; } Modified: trunk/hw/nseries.c =================================================================== --- trunk/hw/nseries.c 2009-02-09 16:50:00 UTC (rev 6576) +++ trunk/hw/nseries.c 2009-02-09 17:00:41 UTC (rev 6577) @@ -1273,7 +1273,7 @@ struct n800_s *s = (struct n800_s *) qemu_mallocz(sizeof(*s)); int sdram_size = binfo->ram_size; int onenandram_size = 0x00010000; - DisplayState *ds = get_displaystate(); + DisplayState *ds; if (ram_size < sdram_size + onenandram_size + OMAP242X_SRAM_SIZE) { fprintf(stderr, "This architecture uses %i bytes of memory\n", @@ -1361,6 +1361,7 @@ /* FIXME: We shouldn't really be doing this here. The LCD controller will set the size once configured, so this just sets an initial size until the guest activates the display. */ + ds = get_displaystate(); ds->surface = qemu_resize_displaysurface(ds->surface, 800, 480, 32, 4 * 800); dpy_resize(ds); }