qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] Re: More displaystate fallout?
Date: Tue, 27 Jan 2009 14:23:12 +0000	[thread overview]
Message-ID: <497F18D0.2060409@eu.citrix.com> (raw)
In-Reply-To: <49787EAC.5040904@eu.citrix.com>

Any update on this?

Stefano Stabellini wrote:

> Stefan Weil wrote:
> 
>> To reproduce it, the 1st console window must be larger than 640 x 480
>> (or the surface of dumb terminal smaller than this).
>>
>> Systems without VGA start with the monitor console which is larger.
>> Qemu (SDL or VNC) will crash when switching from 1st to 2nd console
>> and then back to 1st (which will never show again).
>>
>> See stack trace below. Maybe you must add a simple assertion to console.c
>> to see the access violation.
>>
>> A simple (but crude) fix is to increase the size of the surface.
>>
> 
> 
> 
> I am still unable to get a crash but I was able to get few rendering
> problems.
> However I think I understand the issue: if the is no graphic card and
> the first console has a fixed size, the size of the display surface may
> be wrong.
> 
> Does this patch fixes the problem for you?
> 
> ---
> 
> diff --git a/console.c b/console.c
> index dbb3b70..e02cf63 100644
> --- a/console.c
> +++ b/console.c
> @@ -1419,13 +1419,22 @@ CharDriverState *text_console_init(const char *p)
>  void text_consoles_set_display(DisplayState *ds)
>  {
>      int i;
> +    TextConsole *s;
>  
>      for (i = 0; i < n_text_consoles; i++) {
>          text_console_do_init(text_consoles[i], ds, text_console_strs[i]);
>          qemu_free(text_console_strs[i]);
>      }
> -
>      n_text_consoles = 0;
> +
> +    /* If there are no graphic cards and the first console has a fixed
> +     * size we need to resize the screen surface according to the size
> +     * of the first console */
> +    s = consoles[0];
> +    if (s && s->console_type == TEXT_CONSOLE_FIXED_SIZE) {
> +        ds->surface = qemu_resize_displaysurface(ds->surface, s->g_width, s->g_height, 32, 4 * s->g_width);
> +        dpy_resize(ds);
> +    }
>  }
>  
>  void qemu_console_resize(DisplayState *ds, int width, int height)
> 
> 
> 

  reply	other threads:[~2009-01-27 14:31 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-18 23:14 [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp Juergen Lock
2009-01-20 14:19 ` Jędrzej Kalinowski
2009-01-20 19:31   ` Matt
2009-01-20 23:12   ` More displaystate fallout? (was: Re: [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp...) Juergen Lock
2009-01-21 11:15     ` [Qemu-devel] Re: More displaystate fallout? (was: Re: [Qemu- devel] testing qemu svn r6367 on FreeB SD - sigev_signo; vmmouse, -vga vmware broken , slirp...) Jędrzej Kalinowski
2009-01-21 12:28       ` [Qemu-devel] Re: More displaystate fallout? Stefano Stabellini
2009-01-21 17:46         ` Stefan Weil
2009-01-21 18:15           ` Stefano Stabellini
2009-01-21 21:34             ` Stefan Weil
2009-01-22 14:11               ` Stefano Stabellini
2009-01-27 14:23                 ` Stefano Stabellini [this message]
2009-01-29 14:55               ` Stefano Stabellini
2009-01-24 11:55 ` [Qemu-devel] testing qemu svn r6367 on FreeBSD - sigev_signo; vmmouse, -vga vmware broken, slirp Blue Swirl

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=497F18D0.2060409@eu.citrix.com \
    --to=stefano.stabellini@eu.citrix.com \
    --cc=qemu-devel@nongnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).