From: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
To: Paul Brook <paul@codesourcery.com>
Cc: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 0 of 7] [UPDATE] DisplayState interface change
Date: Wed, 26 Nov 2008 19:08:20 +0000 [thread overview]
Message-ID: <492D9EA4.9050008@eu.citrix.com> (raw)
In-Reply-To: <200811261840.22618.paul@codesourcery.com>
Paul Brook wrote:
>> This patch changes the DisplayState interface adding support for
>> multiple frontends at the same time (sdl and vnc) and implements most
>> of the benefit of the shared_buf patch without the added complexity.
>
> I'm still not convinced you've got the abstraction right here.
>
> By my reading your shared buffer code is fairly fragile. If the users switches
> VCs (which will cause qemu to reallocate the surface independently of the
> device) then qemu will reallocate the buffer. Having both qemu and individual
> device code allocating surfaces seems wrong. It should be one or the other.
This is something that happens even without my patches and will go away
by itself when we get rid of QEMUConsole.
> It also feels messy the way that allocating the surface and notifying the
> DisplayState of the change are two separate operations.
> IMHO DisplayState should be an opaque structure as far as devices are
> concerned. They should never have to access its members (or deal with
> DisplaySurface) directly.
I can fix that implementing a qemu_console_resize_shared(int width, int
height, int bpp, int linesize, uint8_t *data) that does what the vga
code is now doing.
Since it is important for you I'll do it.
>> - do not use is_active_console, use is_graphic_console instead.
>
> This is wrong. There may be multiple graphic consoles.
I thought we wanted to move to a model in which a DisplayState
corresponds to a single QEMUConsole and a single graphic device.
This is the reason for Anthony to ask me this update, if I am not mistaken.
>> This patch changes the graphical_console_init function to return an
>> allocated DisplayState instead of a QEMUConsole.
>
> You should also remove QEMUConsole.
I removed QEMUConsole from the graphic devices, I am not going to
completely get rid of it because it is currently needed by text consoles
and to multiplex multiple consoles.
Implementing a DisplayState multiplexer is the subject of another patch
series.
Keep in mind that now (without this series) we multiplex multiple
QEMUConsole on a DisplayState. I didn't introduce it, it was already there.
>> + s->ds = graphic_console_init(s->update, s->invalidate,
>> + s->screen_dump, s->text_update, s);
>> + register_displaystate(s->ds);
>
> Why have you got separate allocate and register functions?
>
No need. I can easily change that.
next prev parent reply other threads:[~2008-11-26 19:04 UTC|newest]
Thread overview: 14+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-26 17:47 [Qemu-devel] [PATCH 0 of 7] [UPDATE] DisplayState interface change Stefano Stabellini
2008-11-26 18:40 ` Paul Brook
2008-11-26 19:08 ` Stefano Stabellini [this message]
2008-11-27 23:42 ` Anthony Liguori
2008-11-28 0:29 ` Paul Brook
2008-12-02 19:35 ` Anthony Liguori
2008-12-11 11:55 ` Stefano Stabellini
2008-12-11 12:39 ` Paul Brook
2008-12-11 15:22 ` Stefano Stabellini
2008-12-11 15:29 ` Paul Brook
2008-12-11 15:37 ` Stefano Stabellini
2008-12-11 15:45 ` Paul Brook
2008-11-28 11:03 ` Stefano Stabellini
2008-12-02 19:33 ` Anthony Liguori
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=492D9EA4.9050008@eu.citrix.com \
--to=stefano.stabellini@eu.citrix.com \
--cc=paul@codesourcery.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).