From nobody Thu Nov 6 01:27:57 2025 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 1538756085038326.3817608831215; Fri, 5 Oct 2018 09:14:45 -0700 (PDT) Received: from localhost ([::1]:35955 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8SkV-0006ub-Si for importer@patchew.org; Fri, 05 Oct 2018 12:14:43 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34279) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8SYC-0003f8-UW for qemu-devel@nongnu.org; Fri, 05 Oct 2018 12:02:01 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8SY4-0001c5-IE for qemu-devel@nongnu.org; Fri, 05 Oct 2018 12:01:58 -0400 Received: from mx1.redhat.com ([209.132.183.28]:41422) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g8SY2-0001Zs-8R for qemu-devel@nongnu.org; Fri, 05 Oct 2018 12:01:52 -0400 Received: from smtp.corp.redhat.com (int-mx01.intmail.prod.int.phx2.redhat.com [10.5.11.11]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id B19883091D66; Fri, 5 Oct 2018 16:01:48 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-29.ams2.redhat.com [10.36.116.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 69C816BC2B; Fri, 5 Oct 2018 16:01:48 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6338C982BE; Fri, 5 Oct 2018 18:01:47 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 5 Oct 2018 18:01:46 +0200 Message-Id: <20181005160147.892-2-kraxel@redhat.com> In-Reply-To: <20181005160147.892-1-kraxel@redhat.com> References: <20181005160147.892-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.11 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.42]); Fri, 05 Oct 2018 16:01:48 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display 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: Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 RSF_0 Z_629925259 SPT_0 Content-Transfer-Encoding: quoted-printable MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" This allows modern architectures which don't care about vga compatibility (risc-v for example) build bochs-display without including all vga emulation too. Signed-off-by: Gerd Hoffmann Reviewed-by: Alistair Francis --- default-configs/pci.mak | 1 + hw/display/Makefile.objs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/default-configs/pci.mak b/default-configs/pci.mak index de53d20ac6..6c7be12779 100644 --- a/default-configs/pci.mak +++ b/default-configs/pci.mak @@ -44,5 +44,6 @@ CONFIG_SDHCI=3Dy CONFIG_EDU=3Dy CONFIG_VGA=3Dy CONFIG_VGA_PCI=3Dy +CONFIG_BOCHS_DISPLAY=3Dy CONFIG_IVSHMEM_DEVICE=3D$(CONFIG_IVSHMEM) CONFIG_ROCKER=3Dy diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index 780a76b9f0..2a0de16a55 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -14,11 +14,11 @@ common-obj-$(CONFIG_SSD0323) +=3D ssd0323.o common-obj-$(CONFIG_XEN) +=3D xenfb.o =20 common-obj-$(CONFIG_VGA_PCI) +=3D vga-pci.o -common-obj-$(CONFIG_VGA_PCI) +=3D bochs-display.o common-obj-$(CONFIG_VGA_PCI) +=3D edid-region.o common-obj-$(CONFIG_VGA_ISA) +=3D vga-isa.o common-obj-$(CONFIG_VGA_ISA_MM) +=3D vga-isa-mm.o common-obj-$(CONFIG_VMWARE_VGA) +=3D vmware_vga.o +common-obj-$(CONFIG_BOCHS_DISPLAY) +=3D bochs-display.o =20 common-obj-$(CONFIG_BLIZZARD) +=3D blizzard.o common-obj-$(CONFIG_EXYNOS4) +=3D exynos4210_fimd.o --=20 2.9.3 From nobody Thu Nov 6 01:27:57 2025 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 1538755927702181.34161247499844; Fri, 5 Oct 2018 09:12:07 -0700 (PDT) Received: from localhost ([::1]:35921 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8Shs-0003yg-Uq for importer@patchew.org; Fri, 05 Oct 2018 12:12:00 -0400 Received: from eggs.gnu.org ([2001:4830:134:3::10]:34331) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1g8SYM-0003ou-Vo for qemu-devel@nongnu.org; Fri, 05 Oct 2018 12:02:11 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1g8SYF-0001im-Rq for qemu-devel@nongnu.org; Fri, 05 Oct 2018 12:02:10 -0400 Received: from mx1.redhat.com ([209.132.183.28]:32478) by eggs.gnu.org with esmtps (TLS1.0:DHE_RSA_AES_256_CBC_SHA1:32) (Exim 4.71) (envelope-from ) id 1g8SYA-0001dk-2K for qemu-devel@nongnu.org; Fri, 05 Oct 2018 12:02:00 -0400 Received: from smtp.corp.redhat.com (int-mx06.intmail.prod.int.phx2.redhat.com [10.5.11.16]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by mx1.redhat.com (Postfix) with ESMTPS id 5C8AC32B672; Fri, 5 Oct 2018 16:01:55 +0000 (UTC) Received: from sirius.home.kraxel.org (ovpn-116-29.ams2.redhat.com [10.36.116.29]) by smtp.corp.redhat.com (Postfix) with ESMTP id 72DC75C220; Fri, 5 Oct 2018 16:01:48 +0000 (UTC) Received: by sirius.home.kraxel.org (Postfix, from userid 1000) id 6CDC0982BF; Fri, 5 Oct 2018 18:01:47 +0200 (CEST) From: Gerd Hoffmann To: qemu-devel@nongnu.org Date: Fri, 5 Oct 2018 18:01:47 +0200 Message-Id: <20181005160147.892-3-kraxel@redhat.com> In-Reply-To: <20181005160147.892-1-kraxel@redhat.com> References: <20181005160147.892-1-kraxel@redhat.com> X-Scanned-By: MIMEDefang 2.79 on 10.5.11.16 X-Greylist: Sender IP whitelisted, not delayed by milter-greylist-4.5.16 (mx1.redhat.com [10.5.110.38]); Fri, 05 Oct 2018 16:01:55 +0000 (UTC) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.2.x-3.x [generic] X-Received-From: 209.132.183.28 Subject: [Qemu-devel] [PATCH 2/2] bochs-display: wire up edid 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: Gerd Hoffmann , "Michael S. Tsirkin" Errors-To: qemu-devel-bounces+importer=patchew.org@nongnu.org Sender: "Qemu-devel" X-ZohoMail: RDMRC_1 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 --- hw/display/bochs-display.c | 13 +++++++++++++ hw/display/Makefile.objs | 1 + 2 files changed, 14 insertions(+) diff --git a/hw/display/bochs-display.c b/hw/display/bochs-display.c index 09d8944a1b..3d439eb240 100644 --- a/hw/display/bochs-display.c +++ b/hw/display/bochs-display.c @@ -9,6 +9,7 @@ #include "hw/hw.h" #include "hw/pci/pci.h" #include "hw/display/bochs-vbe.h" +#include "hw/display/edid.h" =20 #include "qapi/error.h" =20 @@ -35,9 +36,13 @@ typedef struct BochsDisplayState { MemoryRegion mmio; MemoryRegion vbe; MemoryRegion qext; + MemoryRegion edid; =20 /* device config */ uint64_t vgamem; + bool enable_edid; + qemu_edid_info edid_info; + uint8_t edid_blob[256]; =20 /* device registers */ uint16_t vbe_regs[VBE_DISPI_INDEX_NB]; @@ -283,6 +288,12 @@ static void bochs_display_realize(PCIDevice *dev, Erro= r **errp) pci_register_bar(&s->pci, 0, PCI_BASE_ADDRESS_MEM_PREFETCH, &s->vram); pci_register_bar(&s->pci, 2, PCI_BASE_ADDRESS_SPACE_MEMORY, &s->mmio); =20 + if (s->enable_edid) { + qemu_edid_generate(s->edid_blob, sizeof(s->edid_blob), &s->edid_in= fo); + qemu_edid_region_io(&s->edid, obj, s->edid_blob, sizeof(s->edid_bl= ob)); + memory_region_add_subregion(&s->mmio, 0, &s->edid); + } + if (pci_bus_is_express(pci_get_bus(dev))) { dev->cap_present |=3D QEMU_PCI_CAP_EXPRESS; ret =3D pcie_endpoint_cap_init(dev, 0x80); @@ -325,6 +336,8 @@ static void bochs_display_exit(PCIDevice *dev) =20 static Property bochs_display_properties[] =3D { DEFINE_PROP_SIZE("vgamem", BochsDisplayState, vgamem, 16 * MiB), + DEFINE_PROP_BOOL("edid", BochsDisplayState, enable_edid, false), + DEFINE_EDID_PROPERTIES(BochsDisplayState, edid_info), DEFINE_PROP_END_OF_LIST(), }; =20 diff --git a/hw/display/Makefile.objs b/hw/display/Makefile.objs index 2a0de16a55..2e1b1bcd22 100644 --- a/hw/display/Makefile.objs +++ b/hw/display/Makefile.objs @@ -19,6 +19,7 @@ common-obj-$(CONFIG_VGA_ISA) +=3D vga-isa.o common-obj-$(CONFIG_VGA_ISA_MM) +=3D vga-isa-mm.o common-obj-$(CONFIG_VMWARE_VGA) +=3D vmware_vga.o common-obj-$(CONFIG_BOCHS_DISPLAY) +=3D bochs-display.o +common-obj-$(CONFIG_BOCHS_DISPLAY) +=3D edid-region.o =20 common-obj-$(CONFIG_BLIZZARD) +=3D blizzard.o common-obj-$(CONFIG_EXYNOS4) +=3D exynos4210_fimd.o --=20 2.9.3