qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH 4 of 5] [UPDATE] DisplayState interface change


From: Anthony Liguori
Subject: Re: [Qemu-devel] [PATCH 4 of 5] [UPDATE] DisplayState interface change
Date: Sat, 22 Nov 2008 14:00:11 -0600
User-agent: Thunderbird 2.0.0.17 (X11/20080925)

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 <address@hidden>

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




reply via email to

[Prev in Thread] Current Thread [Next in Thread]