From nobody Thu May 2 15:12:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 152845720900335.81960171409571; Fri, 8 Jun 2018 04:26:49 -0700 (PDT) Received: from localhost ([::1]:34767 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFXc-0003xh-Aj for importer@patchew.org; Fri, 08 Jun 2018 07:26:48 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58123) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFRO-000874-Ks for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:23 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRFRL-0001nw-NH for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:20 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:34160 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fRFRF-0001mH-ND; Fri, 08 Jun 2018 07:20:13 -0400 Received: from smtp.corp.redhat.com (int-mx05.intmail.prod.int.rdu2.redhat.com [10.11.54.5]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 46AA9C12B3; Fri, 8 Jun 2018 11:20:13 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 4C0941CBBF; Fri, 8 Jun 2018 11:20:03 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id B4B8440DF7; Fri, 8 Jun 2018 13:20:01 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 8 Jun 2018 13:19:56 +0200 Message-Id: <20180608112001.14729-2-kraxel@redhat.com> In-Reply-To: <20180608112001.14729-1-kraxel@redhat.com> References: <20180608112001.14729-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.11.54.5 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 08 Jun 2018 11:20:13 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.1]); Fri, 08 Jun 2018 11:20:13 +0000 (UTC) for IP:'10.11.54.5' DOMAIN:'int-mx05.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 1/6] hw/display: add ramfb, a simple boot framebuffer living in guest ram X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , Alex Williamson , qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?L=C3=A1szl=C3=B3=20=C3=89rsek?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" 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 --- include/hw/display/ramfb.h | 9 +++++ hw/display/ramfb.c | 95 ++++++++++++++++++++++++++++++++++++++++++= ++++ hw/display/Makefile.objs | 2 + 3 files changed, 106 insertions(+) create mode 100644 include/hw/display/ramfb.h create mode 100644 hw/display/ramfb.c 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 */ diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c new file mode 100644 index 0000000000..258783fe3b --- /dev/null +++ b/hw/display/ramfb.c @@ -0,0 +1,95 @@ +/* + * early boot framebuffer in guest ram + * configured using fw_cfg + * + * Copyright Red Hat, Inc. 2017 + * + * Author: + * Gerd Hoffmann + * + * This work is licensed under the terms of the GNU GPL, version 2 or late= r. + * See the COPYING file in the top-level directory. + */ +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "hw/loader.h" +#include "hw/display/ramfb.h" +#include "ui/console.h" +#include "sysemu/sysemu.h" + +struct RAMFBCfg { + uint64_t addr; + uint32_t fourcc; + uint32_t flags; + uint32_t width; + uint32_t height; + uint32_t stride; +}; + +struct RAMFBState { + DisplaySurface *ds; + uint32_t width, height; + struct RAMFBCfg cfg; +}; + +static void ramfb_fw_cfg_write(void *dev, off_t offset, size_t len) +{ + RAMFBState *s =3D dev; + void *framebuffer; + uint32_t stride, fourcc, format; + hwaddr addr, length; + + s->width =3D be32_to_cpu(s->cfg.width); + s->height =3D be32_to_cpu(s->cfg.height); + stride =3D be32_to_cpu(s->cfg.stride); + fourcc =3D be32_to_cpu(s->cfg.fourcc); + addr =3D be64_to_cpu(s->cfg.addr); + length =3D stride * s->height; + format =3D qemu_drm_format_to_pixman(fourcc); + + fprintf(stderr, "%s: %dx%d @ 0x%" PRIx64 "\n", __func__, + s->width, s->height, addr); + framebuffer =3D address_space_map(&address_space_memory, + addr, &length, false, + MEMTXATTRS_UNSPECIFIED); + if (!framebuffer || length < stride * s->height) { + s->width =3D 0; + s->height =3D 0; + return; + } + s->ds =3D qemu_create_displaysurface_from(s->width, s->height, + format, stride, framebuffer); +} + +void ramfb_display_update(QemuConsole *con, RAMFBState *s) +{ + if (!s->width || !s->height) { + return; + } + + if (s->ds) { + dpy_gfx_replace_surface(con, s->ds); + s->ds =3D NULL; + } + + /* simple full screen update */ + dpy_gfx_update_full(con); +} + +RAMFBState *ramfb_setup(Error **errp) +{ + FWCfgState *fw_cfg =3D fw_cfg_find(); + RAMFBState *s; + + if (!fw_cfg || !fw_cfg->dma_enabled) { + error_setg(errp, "ramfb device requires fw_cfg with DMA"); + return NULL; + } + + s =3D g_new0(RAMFBState, 1); + + fw_cfg_add_file_callback(fw_cfg, "etc/ramfb", + NULL, ramfb_fw_cfg_write, s, + &s->cfg, sizeof(s->cfg), false); + return s; +} diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index b5d97ab26d..0af04985d2 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -1,3 +1,5 @@ +common-obj-y +=3D ramfb.o + common-obj-$(CONFIG_ADS7846) +=3D ads7846.o common-obj-$(CONFIG_VGA_CIRRUS) +=3D cirrus_vga.o common-obj-$(CONFIG_G364FB) +=3D g364fb.o --=20 2.9.3 From nobody Thu May 2 15:12:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528456942839821.1864948384392; Fri, 8 Jun 2018 04:22:22 -0700 (PDT) Received: from localhost ([::1]:34738 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFT8-0000cW-IW for importer@patchew.org; Fri, 08 Jun 2018 07:22:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58077) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFRI-00084I-BV for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:17 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRFRE-0001li-5E for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:16 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54600 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fRFR6-0001eN-G7; Fri, 08 Jun 2018 07:20:04 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id D96378884C; Fri, 8 Jun 2018 11:20:03 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id 0D874202699C; Fri, 8 Jun 2018 11:20:03 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id C788A422B8; Fri, 8 Jun 2018 13:20:01 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 8 Jun 2018 13:19:57 +0200 Message-Id: <20180608112001.14729-3-kraxel@redhat.com> In-Reply-To: <20180608112001.14729-1-kraxel@redhat.com> References: <20180608112001.14729-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 08 Jun 2018 11:20:03 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 08 Jun 2018 11:20:03 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 2/6] hw/display: add standalone ramfb device X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , Alex Williamson , qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?L=C3=A1szl=C3=B3=20=C3=89rsek?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Signed-off-by: Gerd Hoffmann --- include/hw/display/ramfb.h | 3 +++ hw/arm/sysbus-fdt.c | 7 +++++ hw/arm/virt.c | 2 ++ hw/display/ramfb-standalone.c | 62 +++++++++++++++++++++++++++++++++++++++= ++++ hw/i386/pc_piix.c | 2 ++ hw/i386/pc_q35.c | 2 ++ hw/display/Makefile.objs | 1 + 7 files changed, 79 insertions(+) create mode 100644 hw/display/ramfb-standalone.c diff --git a/include/hw/display/ramfb.h b/include/hw/display/ramfb.h index a3d4c79942..b33a2c467b 100644 --- a/include/hw/display/ramfb.h +++ b/include/hw/display/ramfb.h @@ -6,4 +6,7 @@ typedef struct RAMFBState RAMFBState; void ramfb_display_update(QemuConsole *con, RAMFBState *s); RAMFBState *ramfb_setup(Error **errp); =20 +/* ramfb-standalone.c */ +#define TYPE_RAMFB_DEVICE "ramfb" + #endif /* RAMFB_H */ diff --git a/hw/arm/sysbus-fdt.c b/hw/arm/sysbus-fdt.c index e4c492ea44..277ed872e7 100644 --- a/hw/arm/sysbus-fdt.c +++ b/hw/arm/sysbus-fdt.c @@ -36,6 +36,7 @@ #include "hw/vfio/vfio-platform.h" #include "hw/vfio/vfio-calxeda-xgmac.h" #include "hw/vfio/vfio-amd-xgbe.h" +#include "hw/display/ramfb.h" #include "hw/arm/fdt.h" =20 /* @@ -406,12 +407,18 @@ static int add_amd_xgbe_fdt_node(SysBusDevice *sbdev,= void *opaque) =20 #endif /* CONFIG_LINUX */ =20 +static int no_fdt_node(SysBusDevice *sbdev, void *opaque) +{ + return 0; +} + /* list of supported dynamic sysbus devices */ static const NodeCreationPair add_fdt_node_functions[] =3D { #ifdef CONFIG_LINUX {TYPE_VFIO_CALXEDA_XGMAC, add_calxeda_midway_xgmac_fdt_node}, {TYPE_VFIO_AMD_XGBE, add_amd_xgbe_fdt_node}, #endif + {TYPE_RAMFB_DEVICE, no_fdt_node}, {"", NULL}, /* last element */ }; =20 diff --git a/hw/arm/virt.c b/hw/arm/virt.c index f0a4fa004c..98b99cf236 100644 --- a/hw/arm/virt.c +++ b/hw/arm/virt.c @@ -36,6 +36,7 @@ #include "hw/arm/virt.h" #include "hw/vfio/vfio-calxeda-xgmac.h" #include "hw/vfio/vfio-amd-xgbe.h" +#include "hw/display/ramfb.h" #include "hw/devices.h" #include "net/net.h" #include "sysemu/device_tree.h" @@ -1659,6 +1660,7 @@ static void virt_machine_class_init(ObjectClass *oc, = void *data) mc->max_cpus =3D 255; machine_class_allow_dynamic_sysbus_dev(mc, TYPE_VFIO_CALXEDA_XGMAC); machine_class_allow_dynamic_sysbus_dev(mc, TYPE_VFIO_AMD_XGBE); + machine_class_allow_dynamic_sysbus_dev(mc, TYPE_RAMFB_DEVICE); mc->block_default_type =3D IF_VIRTIO; mc->no_cdrom =3D 1; mc->pci_allow_0_address =3D true; diff --git a/hw/display/ramfb-standalone.c b/hw/display/ramfb-standalone.c new file mode 100644 index 0000000000..05d2b9839e --- /dev/null +++ b/hw/display/ramfb-standalone.c @@ -0,0 +1,62 @@ +#include "qemu/osdep.h" +#include "qapi/error.h" +#include "hw/loader.h" +#include "hw/isa/isa.h" +#include "hw/display/ramfb.h" +#include "ui/console.h" +#include "sysemu/sysemu.h" + +#define RAMFB(obj) OBJECT_CHECK(RAMFBState, (obj), TYPE_RAMFB_DEVICE) + +typedef struct RAMFBState { + SysBusDevice parent_obj; + QemuConsole *con; + RAMFBState *state; +} RAMFBState; + +static void display_update_wrapper(void *dev) +{ + RAMFBState *ramfb =3D RAMFB(dev); + + if (0 /* native driver active */) { + /* non-standalone device would run native display update here */; + } else { + ramfb_display_update(ramfb->con, ramfb->state); + } +} + +static const GraphicHwOps wrapper_ops =3D { + .gfx_update =3D display_update_wrapper, +}; + +static void ramfb_realizefn(DeviceState *dev, Error **errp) +{ + RAMFBState *ramfb =3D RAMFB(dev); + + ramfb->con =3D graphic_console_init(dev, 0, &wrapper_ops, dev); + ramfb->state =3D ramfb_setup(errp); +} + +static void ramfb_class_initfn(ObjectClass *klass, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(klass); + + set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); + dc->realize =3D ramfb_realizefn; + dc->desc =3D "ram framebuffer standalone device"; + dc->user_creatable =3D true; +} + +static const TypeInfo ramfb_info =3D { + .name =3D TYPE_RAMFB_DEVICE, + .parent =3D TYPE_SYS_BUS_DEVICE, + .instance_size =3D sizeof(RAMFBState), + .class_init =3D ramfb_class_initfn, +}; + +static void ramfb_register_types(void) +{ + type_register_static(&ramfb_info); +} + +type_init(ramfb_register_types) diff --git a/hw/i386/pc_piix.c b/hw/i386/pc_piix.c index 3d81136065..5dc4220d02 100644 --- a/hw/i386/pc_piix.c +++ b/hw/i386/pc_piix.c @@ -28,6 +28,7 @@ #include "hw/loader.h" #include "hw/i386/pc.h" #include "hw/i386/apic.h" +#include "hw/display/ramfb.h" #include "hw/smbios/smbios.h" #include "hw/pci/pci.h" #include "hw/pci/pci_ids.h" @@ -423,6 +424,7 @@ static void pc_i440fx_machine_options(MachineClass *m) m->desc =3D "Standard PC (i440FX + PIIX, 1996)"; m->default_machine_opts =3D "firmware=3Dbios-256k.bin"; m->default_display =3D "std"; + machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); } =20 static void pc_i440fx_3_0_machine_options(MachineClass *m) diff --git a/hw/i386/pc_q35.c b/hw/i386/pc_q35.c index b60cbb9266..19294949ce 100644 --- a/hw/i386/pc_q35.c +++ b/hw/i386/pc_q35.c @@ -45,6 +45,7 @@ #include "hw/i386/ich9.h" #include "hw/i386/amd_iommu.h" #include "hw/i386/intel_iommu.h" +#include "hw/display/ramfb.h" #include "hw/smbios/smbios.h" #include "hw/ide/pci.h" #include "hw/ide/ahci.h" @@ -305,6 +306,7 @@ static void pc_q35_machine_options(MachineClass *m) m->no_floppy =3D 1; machine_class_allow_dynamic_sysbus_dev(m, TYPE_AMD_IOMMU_DEVICE); machine_class_allow_dynamic_sysbus_dev(m, TYPE_INTEL_IOMMU_DEVICE); + machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE); m->max_cpus =3D 288; } =20 diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index 0af04985d2..fb8408c6d0 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -1,4 +1,5 @@ common-obj-y +=3D ramfb.o +common-obj-y +=3D ramfb-standalone.o =20 common-obj-$(CONFIG_ADS7846) +=3D ads7846.o common-obj-$(CONFIG_VGA_CIRRUS) +=3D cirrus_vga.o --=20 2.9.3 From nobody Thu May 2 15:12:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528457137290811.9568466912772; Fri, 8 Jun 2018 04:25:37 -0700 (PDT) Received: from localhost ([::1]:34764 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFWS-0003MR-Iw for importer@patchew.org; Fri, 08 Jun 2018 07:25:36 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58110) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFRL-00086M-7s for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:22 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRFRK-0001na-1B for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:19 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:45702 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fRFRF-0001mD-K5; Fri, 08 Jun 2018 07:20:13 -0400 Received: from smtp.corp.redhat.com (int-mx03.intmail.prod.int.rdu2.redhat.com [10.11.54.3]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2E03B81B0325; Fri, 8 Jun 2018 11:20:13 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id F10A510EE6CE; Fri, 8 Jun 2018 11:20:02 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id D2076423E6; Fri, 8 Jun 2018 13:20:01 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 8 Jun 2018 13:19:58 +0200 Message-Id: <20180608112001.14729-4-kraxel@redhat.com> In-Reply-To: <20180608112001.14729-1-kraxel@redhat.com> References: <20180608112001.14729-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.3 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 08 Jun 2018 11:20:13 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.8]); Fri, 08 Jun 2018 11:20:13 +0000 (UTC) for IP:'10.11.54.3' DOMAIN:'int-mx03.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 3/6] hw/display: add virtio-ramfb device X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , Alex Williamson , qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?L=C3=A1szl=C3=B3=20=C3=89rsek?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Like virtio-vga, but using ramfb instead of legacy vga. Note: Not clear yet whenever this will be ever merged upstream. No clear benefit, given that edk2 has a virtio-gpu driver which doesn't depend on the vga compatibility mode. Will keeping it in the devel branch for now, for testing purposes and as playground. Signed-off-by: Gerd Hoffmann --- hw/display/virtio-ramfb.c | 149 ++++++++++++++++++++++++++++++++++++++++++= ++++ hw/display/Makefile.objs | 2 +- 2 files changed, 150 insertions(+), 1 deletion(-) create mode 100644 hw/display/virtio-ramfb.c diff --git a/hw/display/virtio-ramfb.c b/hw/display/virtio-ramfb.c new file mode 100644 index 0000000000..e8ffe66047 --- /dev/null +++ b/hw/display/virtio-ramfb.c @@ -0,0 +1,149 @@ +#include "qemu/osdep.h" +#include "hw/hw.h" +#include "hw/pci/pci.h" +#include "ui/console.h" +#include "hw/virtio/virtio-pci.h" +#include "hw/display/ramfb.h" +#include "qapi/error.h" + +/* + * virtio-ramfb: This extends VirtioPCIProxy. + */ +#define TYPE_VIRTIO_RAMFB "virtio-ramfb" +#define VIRTIO_RAMFB(obj) \ + OBJECT_CHECK(VirtIORAMFB, (obj), TYPE_VIRTIO_RAMFB) + +typedef struct VirtIORAMFB { + VirtIOPCIProxy parent_obj; + VirtIOGPU vdev; + RAMFBState *ramfb; +} VirtIORAMFB; + +static void virtio_ramfb_invalidate_display(void *opaque) +{ + VirtIORAMFB *vramfb =3D opaque; + + if (vramfb->vdev.enable) { + virtio_gpu_ops.invalidate(&vramfb->vdev); + } +} + +static void virtio_ramfb_update_display(void *opaque) +{ + VirtIORAMFB *vramfb =3D opaque; + VirtIOGPU *g =3D &vramfb->vdev; + + if (vramfb->vdev.enable) { + virtio_gpu_ops.gfx_update(&vramfb->vdev); + } else { + ramfb_display_update(g->scanout[0].con, vramfb->ramfb); + } +} + +static int virtio_ramfb_ui_info(void *opaque, uint32_t idx, QemuUIInfo *in= fo) +{ + VirtIORAMFB *vramfb =3D opaque; + + if (virtio_gpu_ops.ui_info) { + return virtio_gpu_ops.ui_info(&vramfb->vdev, idx, info); + } + return -1; +} + +static void virtio_ramfb_gl_block(void *opaque, bool block) +{ + VirtIORAMFB *vramfb =3D opaque; + + if (virtio_gpu_ops.gl_block) { + virtio_gpu_ops.gl_block(&vramfb->vdev, block); + } +} + +static const GraphicHwOps virtio_ramfb_ops =3D { + .invalidate =3D virtio_ramfb_invalidate_display, + .gfx_update =3D virtio_ramfb_update_display, + .ui_info =3D virtio_ramfb_ui_info, + .gl_block =3D virtio_ramfb_gl_block, +}; + +static const VMStateDescription vmstate_virtio_ramfb =3D { + .name =3D "virtio-ramfb", + .version_id =3D 2, + .minimum_version_id =3D 2, + .fields =3D (VMStateField[]) { + /* no pci stuff here, saving the virtio device will handle that */ + /* FIXME */ + VMSTATE_END_OF_LIST() + } +}; + +/* RAMFB device wrapper around PCI device around virtio GPU */ +static void virtio_ramfb_realize(VirtIOPCIProxy *vpci_dev, Error **errp) +{ + VirtIORAMFB *vramfb =3D VIRTIO_RAMFB(vpci_dev); + VirtIOGPU *g =3D &vramfb->vdev; + Error *err =3D NULL; + int i; + + /* init virtio bits */ + qdev_set_parent_bus(DEVICE(g), BUS(&vpci_dev->bus)); + virtio_pci_force_virtio_1(vpci_dev); + object_property_set_bool(OBJECT(g), true, "realized", &err); + if (err) { + error_propagate(errp, err); + return; + } + + /* init ramfb */ + vramfb->ramfb =3D ramfb_setup(errp); + graphic_console_set_hwops(g->scanout[0].con, &virtio_ramfb_ops, vramfb= ); + + for (i =3D 0; i < g->conf.max_outputs; i++) { + object_property_set_link(OBJECT(g->scanout[i].con), + OBJECT(vpci_dev), + "device", errp); + } +} + +static Property virtio_ramfb_properties[] =3D { + DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy), + DEFINE_PROP_END_OF_LIST(), +}; + +static void virtio_ramfb_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(klass); + VirtioPCIClass *k =3D VIRTIO_PCI_CLASS(klass); + PCIDeviceClass *pcidev_k =3D PCI_DEVICE_CLASS(klass); + + set_bit(DEVICE_CATEGORY_DISPLAY, dc->categories); + dc->props =3D virtio_ramfb_properties; + dc->vmsd =3D &vmstate_virtio_ramfb; + dc->hotpluggable =3D false; + + k->realize =3D virtio_ramfb_realize; + pcidev_k->class_id =3D PCI_CLASS_DISPLAY_OTHER; +} + +static void virtio_ramfb_inst_initfn(Object *obj) +{ + VirtIORAMFB *dev =3D VIRTIO_RAMFB(obj); + + virtio_instance_init_common(obj, &dev->vdev, sizeof(dev->vdev), + TYPE_VIRTIO_GPU); +} + +static TypeInfo virtio_ramfb_info =3D { + .name =3D TYPE_VIRTIO_RAMFB, + .parent =3D TYPE_VIRTIO_PCI, + .instance_size =3D sizeof(struct VirtIORAMFB), + .instance_init =3D virtio_ramfb_inst_initfn, + .class_init =3D virtio_ramfb_class_init, +}; + +static void virtio_ramfb_register_types(void) +{ + type_register_static(&virtio_ramfb_info); +} + +type_init(virtio_ramfb_register_types) diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index fb8408c6d0..e70e71ac5c 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -40,7 +40,7 @@ obj-$(CONFIG_VGA) +=3D vga.o common-obj-$(CONFIG_QXL) +=3D qxl.o qxl-logger.o qxl-render.o =20 obj-$(CONFIG_VIRTIO_GPU) +=3D virtio-gpu.o virtio-gpu-3d.o -obj-$(call land,$(CONFIG_VIRTIO_GPU),$(CONFIG_VIRTIO_PCI)) +=3D virtio-gpu= -pci.o +obj-$(call land,$(CONFIG_VIRTIO_GPU),$(CONFIG_VIRTIO_PCI)) +=3D virtio-gpu= -pci.o virtio-ramfb.o obj-$(CONFIG_VIRTIO_VGA) +=3D virtio-vga.o virtio-gpu.o-cflags :=3D $(VIRGL_CFLAGS) virtio-gpu.o-libs +=3D $(VIRGL_LIBS) --=20 2.9.3 From nobody Thu May 2 15:12:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (208.118.235.17 [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528456942701327.1699957831222; Fri, 8 Jun 2018 04:22:22 -0700 (PDT) Received: from localhost ([::1]:34739 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFT8-0000d2-UN for importer@patchew.org; Fri, 08 Jun 2018 07:22:10 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58089) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFRJ-00085F-U2 for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:18 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRFRG-0001me-2t for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:17 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:38436 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fRFR7-0001ej-E2; Fri, 08 Jun 2018 07:20:05 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.rdu2.redhat.com [10.11.54.6]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id EAD61406E974; Fri, 8 Jun 2018 11:20:04 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id E49E1217B40A; Fri, 8 Jun 2018 11:20:02 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id DBE6493CFF; Fri, 8 Jun 2018 13:20:01 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 8 Jun 2018 13:19:59 +0200 Message-Id: <20180608112001.14729-5-kraxel@redhat.com> In-Reply-To: <20180608112001.14729-1-kraxel@redhat.com> References: <20180608112001.14729-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.6 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 08 Jun 2018 11:20:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.7]); Fri, 08 Jun 2018 11:20:05 +0000 (UTC) for IP:'10.11.54.6' DOMAIN:'int-mx06.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 4/6] hw/vfio/display: add ramfb support X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , Alex Williamson , qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?L=C3=A1szl=C3=B3=20=C3=89rsek?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" So we have a boot display when using a vgpu as primary display. Use vfio-pci-ramfb instead of vfio-pci to enable it. Signed-off-by: Gerd Hoffmann --- include/hw/vfio/vfio-common.h | 2 ++ hw/vfio/display.c | 10 ++++++++++ hw/vfio/pci.c | 15 +++++++++++++++ 3 files changed, 27 insertions(+) diff --git a/include/hw/vfio/vfio-common.h b/include/hw/vfio/vfio-common.h index a9036929b2..a58d7e7e77 100644 --- a/include/hw/vfio/vfio-common.h +++ b/include/hw/vfio/vfio-common.h @@ -26,6 +26,7 @@ #include "qemu/queue.h" #include "qemu/notify.h" #include "ui/console.h" +#include "hw/display/ramfb.h" #ifdef CONFIG_LINUX #include #endif @@ -143,6 +144,7 @@ typedef struct VFIODMABuf { =20 typedef struct VFIODisplay { QemuConsole *con; + RAMFBState *ramfb; struct { VFIORegion buffer; DisplaySurface *surface; diff --git a/hw/vfio/display.c b/hw/vfio/display.c index 59c0e5d1d7..409d5a2e3a 100644 --- a/hw/vfio/display.c +++ b/hw/vfio/display.c @@ -124,6 +124,9 @@ static void vfio_display_dmabuf_update(void *opaque) =20 primary =3D vfio_display_get_dmabuf(vdev, DRM_PLANE_TYPE_PRIMARY); if (primary =3D=3D NULL) { + if (dpy->ramfb) { + ramfb_display_update(dpy->con, dpy->ramfb); + } return; } =20 @@ -181,6 +184,8 @@ static int vfio_display_dmabuf_init(VFIOPCIDevice *vdev= , Error **errp) vdev->dpy->con =3D graphic_console_init(DEVICE(vdev), 0, &vfio_display_dmabuf_ops, vdev); + if (strcmp(object_get_typename(OBJECT(vdev)), "vfio-pci-ramfb") =3D=3D= 0) + vdev->dpy->ramfb =3D ramfb_setup(errp); return 0; } =20 @@ -228,6 +233,9 @@ static void vfio_display_region_update(void *opaque) return; } if (!plane.drm_format || !plane.size) { + if (dpy->ramfb) { + ramfb_display_update(dpy->con, dpy->ramfb); + } return; } format =3D qemu_drm_format_to_pixman(plane.drm_format); @@ -300,6 +308,8 @@ static int vfio_display_region_init(VFIOPCIDevice *vdev= , Error **errp) vdev->dpy->con =3D graphic_console_init(DEVICE(vdev), 0, &vfio_display_region_ops, vdev); + if (strcmp(object_get_typename(OBJECT(vdev)), "vfio-pci-ramfb") =3D=3D= 0) + vdev->dpy->ramfb =3D ramfb_setup(errp); return 0; } =20 diff --git a/hw/vfio/pci.c b/hw/vfio/pci.c index 18c493b49e..6a2b42a595 100644 --- a/hw/vfio/pci.c +++ b/hw/vfio/pci.c @@ -3234,9 +3234,24 @@ static const TypeInfo vfio_pci_dev_info =3D { }, }; =20 +static void vfio_pci_ramfb_dev_class_init(ObjectClass *klass, void *data) +{ + DeviceClass *dc =3D DEVICE_CLASS(klass); + + dc->hotpluggable =3D false; +} + +static const TypeInfo vfio_pci_ramfb_dev_info =3D { + .name =3D "vfio-pci-ramfb", + .parent =3D "vfio-pci", + .instance_size =3D sizeof(VFIOPCIDevice), + .class_init =3D vfio_pci_ramfb_dev_class_init, +}; + static void register_vfio_pci_dev_type(void) { type_register_static(&vfio_pci_dev_info); + type_register_static(&vfio_pci_ramfb_dev_info); } =20 type_init(register_vfio_pci_dev_type) --=20 2.9.3 From nobody Thu May 2 15:12:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528457042656963.8749892355215; Fri, 8 Jun 2018 04:24:02 -0700 (PDT) Received: from localhost ([::1]:34753 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFUw-0002LZ-0W for importer@patchew.org; Fri, 08 Jun 2018 07:24:02 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58019) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFRC-0007xC-NY for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRFRB-0001iX-KG for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:10 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:54608 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fRFR7-0001ev-H2; Fri, 08 Jun 2018 07:20:05 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 271798886E; Fri, 8 Jun 2018 11:20:05 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id B04E22026990; Fri, 8 Jun 2018 11:20:04 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id E3F089A8F5; Fri, 8 Jun 2018 13:20:01 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 8 Jun 2018 13:20:00 +0200 Message-Id: <20180608112001.14729-6-kraxel@redhat.com> In-Reply-To: <20180608112001.14729-1-kraxel@redhat.com> References: <20180608112001.14729-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 08 Jun 2018 11:20:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.2]); Fri, 08 Jun 2018 11:20:05 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 5/6] ramfb: enable vgabios X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , Alex Williamson , qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?L=C3=A1szl=C3=B3=20=C3=89rsek?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" --- hw/display/ramfb.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c index 258783fe3b..477316a14d 100644 --- a/hw/display/ramfb.c +++ b/hw/display/ramfb.c @@ -88,6 +88,7 @@ RAMFBState *ramfb_setup(Error **errp) =20 s =3D g_new0(RAMFBState, 1); =20 + rom_add_vga("vgabios-ramfb.bin"); fw_cfg_add_file_callback(fw_cfg, "etc/ramfb", NULL, ramfb_fw_cfg_write, s, &s->cfg, sizeof(s->cfg), false); --=20 2.9.3 From nobody Thu May 2 15:12:15 2024 Delivered-To: importer@patchew.org Received-SPF: pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) client-ip=208.118.235.17; envelope-from=qemu-devel-bounces+importer=patchew.org@nongnu.org; helo=lists.gnu.org; Authentication-Results: mx.zohomail.com; spf=pass (zoho.com: domain of gnu.org designates 208.118.235.17 as permitted sender) smtp.mailfrom=qemu-devel-bounces+importer=patchew.org@nongnu.org; dmarc=fail(p=none dis=none) header.from=redhat.com Return-Path: Received: from lists.gnu.org (lists.gnu.org [208.118.235.17]) by mx.zohomail.com with SMTPS id 1528456942663526.2614151828158; Fri, 8 Jun 2018 04:22:22 -0700 (PDT) Received: from localhost ([::1]:34740 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFTB-0000f5-Bj for importer@patchew.org; Fri, 08 Jun 2018 07:22:13 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:58014) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1fRFRC-0007ws-EJ for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1fRFRB-0001iB-JZ for qemu-devel@nongnu.org; Fri, 08 Jun 2018 07:20:10 -0400 Received: from mx3-rdu2.redhat.com ([66.187.233.73]:48310 helo=mx1.redhat.com) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1fRFR7-0001f1-JZ; Fri, 08 Jun 2018 07:20:05 -0400 Received: from smtp.corp.redhat.com (int-mx04.intmail.prod.int.rdu2.redhat.com [10.11.54.4]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 2DB3D401EF04; Fri, 8 Jun 2018 11:20:05 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-117-155.ams2.redhat.com [10.36.117.155]) by smtp.corp.redhat.com (Postfix) with ESMTP id B56C3202699A; Fri, 8 Jun 2018 11:20:04 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id EB8ED9A8F7; Fri, 8 Jun 2018 13:20:01 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 8 Jun 2018 13:20:01 +0200 Message-Id: <20180608112001.14729-7-kraxel@redhat.com> In-Reply-To: <20180608112001.14729-1-kraxel@redhat.com> References: <20180608112001.14729-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.78 on 10.11.54.4 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 08 Jun 2018 11:20:05 +0000 (UTC) X-Greylist: inspected by milter-greylist-4.5.16 (mx1.redhat.com [10.11.55.5]); Fri, 08 Jun 2018 11:20:05 +0000 (UTC) for IP:'10.11.54.4' DOMAIN:'int-mx04.intmail.prod.int.rdu2.redhat.com' HELO:'smtp.corp.redhat.com' FROM:'kraxel@redhat.com' RCPT:'' X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] [fuzzy] X-Received-From: 66.187.233.73 Subject: [Qemu-devel] [PATCH v3 6/6] bochs-display: enable vgabios X-BeenThere: qemu-devel@nongnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Peter Maydell , Eduardo Habkost , "Michael S. Tsirkin" , Alex Williamson , qemu-arm@nongnu.org, Gerd Hoffmann , Paolo Bonzini , =?UTF-8?q?L=C3=A1szl=C3=B3=20=C3=89rsek?= , Richard Henderson Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" --- hw/display/bochs-display.c | 1 + 1 file changed, 1 insertion(+) diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c index 1187d77576..12d8a66c6c 100644 --- a/hw/display/bochs-display.c +++ b/hw/display/bochs-display.c @@ -337,6 +337,7 @@ static void bochs_display_class_init(ObjectClass *klass= , void *data) k->device_id =3D PCI_DEVICE_ID_QEMU_VGA; =20 k->realize =3D bochs_display_realize; + k->romfile =3D "vgabios-bochs-display.bin"; k->exit =3D bochs_display_exit; dc->vmsd =3D &vmstate_bochs_display; dc->props =3D bochs_display_properties; --=20 2.9.3