From 995b30179bdc97a01ff2e4e0dce07f3e9b7d7d7d Mon Sep 17 00:00:00 2001 From: Gerd Hoffmann Date: Wed, 13 Jun 2018 14:29:45 +0200 Subject: hw/display: add ramfb, a simple boot framebuffer living in guest ram The boot framebuffer is expected to be configured by the firmware, so it uses fw_cfg as interface. Initialization goes as follows: (1) Check whenever etc/ramfb is present. (2) Allocate framebuffer from RAM. (3) Fill struct RAMFBCfg, write it to etc/ramfb. Done. You can write stuff to the framebuffer now, and it should appear automagically on the screen. Note that this isn't very efficient because it does a full display update on each refresh. No dirty tracking. Dirty tracking would have to be active for the whole ram slot, so that wouldn't be very efficient either. For a boot display which is active for a short time only this isn't a big deal. As permanent guest display something better should be used (if possible). This is the ramfb core code. Some windup is needed for display devices which want have a ramfb boot display. Signed-off-by: Gerd Hoffmann Tested-by: Laszlo Ersek Message-id: 20180613122948.18149-2-kraxel@redhat.com Signed-off-by: Gerd Hoffmann --- include/hw/display/ramfb.h | 9 +++++++++ 1 file changed, 9 insertions(+) create mode 100644 include/hw/display/ramfb.h (limited to 'include/hw/display') diff --git a/include/hw/display/ramfb.h b/include/hw/display/ramfb.h new file mode 100644 index 0000000000..a3d4c79942 --- /dev/null +++ b/include/hw/display/ramfb.h @@ -0,0 +1,9 @@ +#ifndef RAMFB_H +#define RAMFB_H + +/* ramfb.c */ +typedef struct RAMFBState RAMFBState; +void ramfb_display_update(QemuConsole *con, RAMFBState *s); +RAMFBState *ramfb_setup(Error **errp); + +#endif /* RAMFB_H */ -- cgit v1.2.3-55-g7522