Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1LWZUz-0001HU-KU for qemu-devel@nongnu.org; Mon, 09 Feb 2009 12:00:45 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1LWZUy-0001Gk-5h for qemu-devel@nongnu.org; Mon, 09 Feb 2009 12:00:44 -0500 Received: from [199.232.76.173] (port=48956 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1LWZUw-0001GV-U4 for qemu-devel@nongnu.org; Mon, 09 Feb 2009 12:00:43 -0500 Received: from hall.aurel32.net ([88.191.82.174]:42940) by monty-python.gnu.org with esmtps (TLS-1.0:RSA_AES_256_CBC_SHA1:32) (Exim 4.60) (envelope-from ) id 1LWZUw-0005Wb-8n for qemu-devel@nongnu.org; Mon, 09 Feb 2009 12:00:42 -0500 Date: Mon, 9 Feb 2009 18:00:40 +0100 From: Aurelien Jarno Subject: Re: [Qemu-devel] [6344] graphical_console_init change (Stefano Stabellini) Message-ID: <20090209170040.GB15149@volta.aurel32.net> References: <20090209113853.GA11874@kos.to> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-15 Content-Disposition: inline In-Reply-To: <20090209113853.GA11874@kos.to> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: Riku Voipio Cc: qemu-devel@nongnu.org > From 532ae1dc0dc37ea1e19877ebe3a0ec0dd83c3e05 Mon Sep 17 00:00:00 2001 > From: Riku Voipio > Date: Mon, 9 Feb 2009 13:08:12 +0200 > Subject: [PATCH] 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 > --- > hw/blizzard.c | 8 ++++---- > hw/nseries.c | 3 ++- > 2 files changed, 6 insertions(+), 5 deletions(-) Thanks, applied. > diff --git a/hw/blizzard.c b/hw/blizzard.c > index 83f13bc..0f68016 100644 > --- a/hw/blizzard.c > +++ b/hw/blizzard.c > @@ -959,6 +959,10 @@ void *s1d13745_init(qemu_irq gpio_int) > > 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 @@ void *s1d13745_init(qemu_irq gpio_int) > > blizzard_reset(s); > > - s->state = graphic_console_init(blizzard_update_display, > - blizzard_invalidate_display, > - blizzard_screen_dump, NULL, s); > - > return s; > } > diff --git a/hw/nseries.c b/hw/nseries.c > index b4f2951..32aaead 100644 > --- a/hw/nseries.c > +++ b/hw/nseries.c > @@ -1273,7 +1273,7 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device, > 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 @@ static void n8x0_init(ram_addr_t ram_size, const char *boot_device, > /* 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); > } > -- > 1.5.6.3 > -- Aurelien Jarno GPG: 1024D/F1BCDB73 aurelien@aurel32.net http://www.aurel32.net