From: Anthony Liguori <anthony@codemonkey.ws>
To: qemu-devel@nongnu.org
Subject: Re: [Qemu-devel] [PATCH 4 of 5] [UPDATE] DisplayState interface change
Date: Sat, 22 Nov 2008 14:00:11 -0600 [thread overview]
Message-ID: <492864CB.3060905@codemonkey.ws> (raw)
In-Reply-To: <4926EB0B.6040007@eu.citrix.com>
Stefano Stabellini 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.
>
> Currently DisplayState is managed by sdl (or vnc) and sdl (or vnc) is
> also responsible for allocating the data and setting the depth.
> Vga.c (or another backend) will do any necessary conversion.
>
> The idea is to change it so that is vga.c (or another backend) together
> with console.c that fully manage the DisplayState interface allocating
> data and setting the depth (either 16 or 32 bit, if the guest uses a
> different resolution or is in text mode, vga.c (or another backend) is
> in charge of doing the conversion seamlessly).
>
> The other idea is that DisplayState supports *multiple* frontends
> like sdl and vnc; each of them can register some callbacks to be called
> when a display event occurs.
>
> The interesting changes are:
>
> - the new structures and related functions in console.h and console.c
>
> in particular the following functions are very helpful to manage a
> DisplaySurface:
>
> qemu_createDisplaySurface
> qemu_resizeDisplaySurface
> qemu_createDisplaySurfaceFrom
> qemu_freeDisplaySurface
>
> - console_select and qemu_console_resize in console.c
> this two functions manage multiple consoles on a single host display
>
> - moving code around in hw/vga.c
> as for the shared_buf patch this is necessary to be able to handle a dynamic
> DisplaySurface bpp
>
> - changes to vga_draw_graphic in hw/vga.c
> this is the place where the DisplaySurface buffer is shared with the
> videoram, when possible;
>
> Signed-off-by: Stefano Stabellini <stefano.stabellini@eu.citrix.com>
>
I think we need another intermediate step here.
Right now, we have a pretty poor abstraction wrt QEMUConsole and
DisplayState. QEMUConsole is known to much of the hardware emulation
but DisplayState is too.
I think we need a step that replaces all notions of QEMUConsole in
hw/*.c with DisplayState including an appropriate creation functions.
There's really no point in passing a DisplayState to the hardware
devices, instead they should be allocating it and returning it to be
passed to the SDL/VNC front-ends.
Regards,
Anthony Liguori
next prev parent reply other threads:[~2008-11-22 20:00 UTC|newest]
Thread overview: 8+ messages / expand[flat|nested] mbox.gz Atom feed top
2008-11-21 17:08 [Qemu-devel] [PATCH 4 of 5] [UPDATE] DisplayState interface change Stefano Stabellini
[not found] ` <200811211736.23473.paul@codesourcery.com>
2008-11-21 17:45 ` Stefano Stabellini
2008-11-22 20:00 ` Anthony Liguori [this message]
2008-11-24 16:51 ` Stefano Stabellini
2008-11-24 19:58 ` Anthony Liguori
2008-11-25 12:23 ` Stefano Stabellini
2008-11-25 12:38 ` Stefano Stabellini
2008-11-25 14:35 ` 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=492864CB.3060905@codemonkey.ws \
--to=anthony@codemonkey.ws \
--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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.