* [Qemu-devel] [PATCH 0/2] two little bochs-display patches. @ 2018-10-05 16:01 Gerd Hoffmann 2018-10-05 16:01 ` [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display Gerd Hoffmann 2018-10-05 16:01 ` [Qemu-devel] [PATCH 2/2] bochs-display: wire up edid support Gerd Hoffmann 0 siblings, 2 replies; 6+ messages in thread From: Gerd Hoffmann @ 2018-10-05 16:01 UTC (permalink / raw) To: qemu-devel; +Cc: Marcel Apfelbaum, Gerd Hoffmann, Michael S. Tsirkin Gerd Hoffmann (2): display: add separate config option for bochs-display bochs-display: wire up edid support hw/display/bochs-display.c | 13 +++++++++++++ default-configs/pci.mak | 1 + hw/display/Makefile.objs | 3 ++- 3 files changed, 16 insertions(+), 1 deletion(-) -- 2.9.3 ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display 2018-10-05 16:01 [Qemu-devel] [PATCH 0/2] two little bochs-display patches Gerd Hoffmann @ 2018-10-05 16:01 ` Gerd Hoffmann 2018-10-05 16:22 ` Alistair Francis 2018-10-05 16:01 ` [Qemu-devel] [PATCH 2/2] bochs-display: wire up edid support Gerd Hoffmann 1 sibling, 1 reply; 6+ messages in thread From: Gerd Hoffmann @ 2018-10-05 16:01 UTC (permalink / raw) To: qemu-devel; +Cc: Marcel Apfelbaum, Gerd Hoffmann, Michael S. Tsirkin 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 <kraxel@redhat.com> --- 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=y CONFIG_EDU=y CONFIG_VGA=y CONFIG_VGA_PCI=y +CONFIG_BOCHS_DISPLAY=y CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM) CONFIG_ROCKER=y 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) += ssd0323.o common-obj-$(CONFIG_XEN) += xenfb.o common-obj-$(CONFIG_VGA_PCI) += vga-pci.o -common-obj-$(CONFIG_VGA_PCI) += bochs-display.o common-obj-$(CONFIG_VGA_PCI) += edid-region.o common-obj-$(CONFIG_VGA_ISA) += vga-isa.o common-obj-$(CONFIG_VGA_ISA_MM) += vga-isa-mm.o common-obj-$(CONFIG_VMWARE_VGA) += vmware_vga.o +common-obj-$(CONFIG_BOCHS_DISPLAY) += bochs-display.o common-obj-$(CONFIG_BLIZZARD) += blizzard.o common-obj-$(CONFIG_EXYNOS4) += exynos4210_fimd.o -- 2.9.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display 2018-10-05 16:01 ` [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display Gerd Hoffmann @ 2018-10-05 16:22 ` Alistair Francis 2018-10-05 16:48 ` Gerd Hoffmann 0 siblings, 1 reply; 6+ messages in thread From: Alistair Francis @ 2018-10-05 16:22 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel@nongnu.org Developers, Michael S. Tsirkin On Fri, Oct 5, 2018 at 9:13 AM Gerd Hoffmann <kraxel@redhat.com> wrote: > > This allows modern architectures which don't care about vga > compatibility (risc-v for example) build bochs-display without > including all vga emulation too. For RISC-V we end up including pci.mak anyway for other things such as NVMe drives. So we don't really need this, but it still seems useful. > > Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> Reviewed-by: Alistair Francis <alistair.francis@wdc.com> Alistair > --- > 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=y > CONFIG_EDU=y > CONFIG_VGA=y > CONFIG_VGA_PCI=y > +CONFIG_BOCHS_DISPLAY=y > CONFIG_IVSHMEM_DEVICE=$(CONFIG_IVSHMEM) > CONFIG_ROCKER=y > 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) += ssd0323.o > common-obj-$(CONFIG_XEN) += xenfb.o > > common-obj-$(CONFIG_VGA_PCI) += vga-pci.o > -common-obj-$(CONFIG_VGA_PCI) += bochs-display.o > common-obj-$(CONFIG_VGA_PCI) += edid-region.o > common-obj-$(CONFIG_VGA_ISA) += vga-isa.o > common-obj-$(CONFIG_VGA_ISA_MM) += vga-isa-mm.o > common-obj-$(CONFIG_VMWARE_VGA) += vmware_vga.o > +common-obj-$(CONFIG_BOCHS_DISPLAY) += bochs-display.o > > common-obj-$(CONFIG_BLIZZARD) += blizzard.o > common-obj-$(CONFIG_EXYNOS4) += exynos4210_fimd.o > -- > 2.9.3 > > ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display 2018-10-05 16:22 ` Alistair Francis @ 2018-10-05 16:48 ` Gerd Hoffmann 2018-10-05 17:04 ` Alistair 0 siblings, 1 reply; 6+ messages in thread From: Gerd Hoffmann @ 2018-10-05 16:48 UTC (permalink / raw) To: Alistair Francis; +Cc: qemu-devel@nongnu.org Developers, Michael S. Tsirkin On Fri, Oct 05, 2018 at 09:22:29AM -0700, Alistair Francis wrote: > On Fri, Oct 5, 2018 at 9:13 AM Gerd Hoffmann <kraxel@redhat.com> wrote: > > > > This allows modern architectures which don't care about vga > > compatibility (risc-v for example) build bochs-display without > > including all vga emulation too. > > For RISC-V we end up including pci.mak anyway for other things such as > NVMe drives. So we don't really need this, but it still seems useful. Hmm, maybe we should split pci.mak into pci-legacy.mak and pci-express.mak then? cheers, Gerd ^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display 2018-10-05 16:48 ` Gerd Hoffmann @ 2018-10-05 17:04 ` Alistair 0 siblings, 0 replies; 6+ messages in thread From: Alistair @ 2018-10-05 17:04 UTC (permalink / raw) To: Gerd Hoffmann; +Cc: qemu-devel@nongnu.org Developers, Michael S. Tsirkin On 10/05/2018 09:48 AM, Gerd Hoffmann wrote: > On Fri, Oct 05, 2018 at 09:22:29AM -0700, Alistair Francis wrote: >> On Fri, Oct 5, 2018 at 9:13 AM Gerd Hoffmann <kraxel@redhat.com> wrote: >>> >>> This allows modern architectures which don't care about vga >>> compatibility (risc-v for example) build bochs-display without >>> including all vga emulation too. >> >> For RISC-V we end up including pci.mak anyway for other things such as >> NVMe drives. So we don't really need this, but it still seems useful. > > Hmm, maybe we should split pci.mak into pci-legacy.mak and pci-express.mak > then? That sounds like a good idea. Alistair > > cheers, > Gerd > ^ permalink raw reply [flat|nested] 6+ messages in thread
* [Qemu-devel] [PATCH 2/2] bochs-display: wire up edid support 2018-10-05 16:01 [Qemu-devel] [PATCH 0/2] two little bochs-display patches Gerd Hoffmann 2018-10-05 16:01 ` [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display Gerd Hoffmann @ 2018-10-05 16:01 ` Gerd Hoffmann 1 sibling, 0 replies; 6+ messages in thread From: Gerd Hoffmann @ 2018-10-05 16:01 UTC (permalink / raw) To: qemu-devel; +Cc: Marcel Apfelbaum, Gerd Hoffmann, Michael S. Tsirkin Signed-off-by: Gerd Hoffmann <kraxel@redhat.com> --- 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" #include "qapi/error.h" @@ -35,9 +36,13 @@ typedef struct BochsDisplayState { MemoryRegion mmio; MemoryRegion vbe; MemoryRegion qext; + MemoryRegion edid; /* device config */ uint64_t vgamem; + bool enable_edid; + qemu_edid_info edid_info; + uint8_t edid_blob[256]; /* device registers */ uint16_t vbe_regs[VBE_DISPI_INDEX_NB]; @@ -283,6 +288,12 @@ static void bochs_display_realize(PCIDevice *dev, Error **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); + if (s->enable_edid) { + qemu_edid_generate(s->edid_blob, sizeof(s->edid_blob), &s->edid_info); + qemu_edid_region_io(&s->edid, obj, s->edid_blob, sizeof(s->edid_blob)); + memory_region_add_subregion(&s->mmio, 0, &s->edid); + } + if (pci_bus_is_express(pci_get_bus(dev))) { dev->cap_present |= QEMU_PCI_CAP_EXPRESS; ret = pcie_endpoint_cap_init(dev, 0x80); @@ -325,6 +336,8 @@ static void bochs_display_exit(PCIDevice *dev) static Property bochs_display_properties[] = { 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(), }; 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) += vga-isa.o common-obj-$(CONFIG_VGA_ISA_MM) += vga-isa-mm.o common-obj-$(CONFIG_VMWARE_VGA) += vmware_vga.o common-obj-$(CONFIG_BOCHS_DISPLAY) += bochs-display.o +common-obj-$(CONFIG_BOCHS_DISPLAY) += edid-region.o common-obj-$(CONFIG_BLIZZARD) += blizzard.o common-obj-$(CONFIG_EXYNOS4) += exynos4210_fimd.o -- 2.9.3 ^ permalink raw reply related [flat|nested] 6+ messages in thread
end of thread, other threads:[~2018-10-05 17:04 UTC | newest] Thread overview: 6+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2018-10-05 16:01 [Qemu-devel] [PATCH 0/2] two little bochs-display patches Gerd Hoffmann 2018-10-05 16:01 ` [Qemu-devel] [PATCH 1/2] display: add separate config option for bochs-display Gerd Hoffmann 2018-10-05 16:22 ` Alistair Francis 2018-10-05 16:48 ` Gerd Hoffmann 2018-10-05 17:04 ` Alistair 2018-10-05 16:01 ` [Qemu-devel] [PATCH 2/2] bochs-display: wire up edid support Gerd Hoffmann
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).