Skip to contentSkip to conversation

Vga 20180618 patches

GIT PULL Applied Gerd Hoffmann 2 participants 6 messages Jun 18, 2018 – Jun 19, 2018

lore
Share & tools
lore
#0 lore raw

The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2:

Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)

are available in the git repository at:

git://git.kraxel.org/qemu tags/vga-20180618-pull-request

for you to fetch changes up to 58d632c7ce66c272868b057491cec7ee5a6a1050:

Add ramfb MAINTAINERS entry (2018-06-18 11:24:25 +0200)

----------------------------------------------------------------
vga: add ramfb, print virglrenderer version

----------------------------------------------------------------

Gerd Hoffmann (3):
hw/display: add ramfb, a simple boot framebuffer living in guest ram hw/display: add standalone ramfb device
Add ramfb MAINTAINERS entry

Marc-André Lureau (1):
configure: print virglrenderer version

 configure                     |  3 +-
 include/hw/display/ramfb.h    | 12 ++++++
 hw/arm/sysbus-fdt.c           |  7 ++++
 hw/arm/virt.c                 |  2 +
 hw/display/ramfb-standalone.c | 62 ++++++++++++++++++++++++++++
 hw/display/ramfb.c            | 95 +++++++++++++++++++++++++++++++++++++++++++
 hw/i386/pc_piix.c             |  2 +
 hw/i386/pc_q35.c              |  2 +
 MAINTAINERS                   |  6 +++
 hw/display/Makefile.objs      |  3 ++
 10 files changed, 193 insertions(+), 1 deletion(-)
 create mode 100644 include/hw/display/ramfb.h
 create mode 100644 hw/display/ramfb-standalone.c
 create mode 100644 hw/display/ramfb.c
Signature · 1 line
2.9.3
#1 lore raw

[Qemu-arm] [PULL 1/4] configure: print virglrenderer version

From: Marc-André Lureau <[email protected]>

Message-id: [email protected]

---
 configure | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)
configure +2 -1
index a8c4094c87..6b2bcb3a0d 100755
@@ -4599,6 +4599,7 @@ int main(void) { virgl_renderer_poll(); return 0; }
 EOF
   virgl_cflags=$($pkg_config --cflags virglrenderer 2>/dev/null)
   virgl_libs=$($pkg_config --libs virglrenderer 2>/dev/null)
+  virgl_version=$($pkg_config --modversion virglrenderer 2>/dev/null)
   if $pkg_config virglrenderer >/dev/null 2>&1 && \
      compile_prog "$virgl_cflags" "$virgl_libs" ; then
     virglrenderer="yes"
@@ -5827,7 +5828,7 @@ echo "nettle            $nettle $(echo_version $nettle $nettle_version)"
 echo "nettle kdf        $nettle_kdf"
 echo "libtasn1          $tasn1"
 echo "curses support    $curses"
-echo "virgl support     $virglrenderer"
+echo "virgl support     $virglrenderer $(echo_version $virglrenderer $virgl_version)"
 echo "curl support      $curl"
 echo "mingw32 support   $mingw32"
 echo "Audio drivers     $audio_drv_list"
Signature · 1 line
2.9.3
#2 lore raw

[Qemu-arm] [PULL 4/4] Add ramfb MAINTAINERS entry

In reply to Gerd Hoffmann

Message-id: [email protected]

---
 MAINTAINERS | 6 ++++++
 1 file changed, 6 insertions(+)
MAINTAINERS +6 -0
index 0fb5f38f9f..da91501c7a 100644
@@ -1331,6 +1331,12 @@ F: hw/display/bochs-display.c
 F: include/hw/display/vga.h
 F: include/hw/display/bochs-vbe.h
 
+ramfb
+M: Gerd Hoffmann <[email protected]>
+S: Maintained
+F: hw/display/ramfb*.c
+F: include/hw/display/ramfb.h
+
 virtio-gpu
 M: Gerd Hoffmann <[email protected]>
 S: Maintained
Signature · 1 line
2.9.3
#3 lore raw

[Qemu-arm] [PULL 3/4] hw/display: add standalone ramfb device

In reply to Gerd Hoffmann

Message-id: [email protected]

---
 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
include/hw/display/ramfb.h +3 -0
index a3d4c79942..b33a2c467b 100644
@@ -6,4 +6,7 @@ typedef struct RAMFBState RAMFBState;
 void ramfb_display_update(QemuConsole *con, RAMFBState *s);
 RAMFBState *ramfb_setup(Error **errp);
 
+/* ramfb-standalone.c */
+#define TYPE_RAMFB_DEVICE "ramfb"
+
 #endif /* RAMFB_H */
hw/arm/sysbus-fdt.c +7 -0
index e4c492ea44..277ed872e7 100644
@@ -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"
 
 /*
@@ -406,12 +407,18 @@ static int add_amd_xgbe_fdt_node(SysBusDevice *sbdev, void *opaque)
 
 #endif /* CONFIG_LINUX */
 
+static int no_fdt_node(SysBusDevice *sbdev, void *opaque)
+{
+    return 0;
+}
+
 /* list of supported dynamic sysbus devices */
 static const NodeCreationPair add_fdt_node_functions[] = {
 #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 */
 };
 
hw/arm/virt.c +2 -0
index f0a4fa004c..98b99cf236 100644
@@ -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 = 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 = IF_VIRTIO;
     mc->no_cdrom = 1;
     mc->pci_allow_0_address = true;
hw/display/ramfb-standalone.c new file +62 -0

62 lines not on this page · raw message

hw/i386/pc_piix.c +2 -0
index 3b87f3cedb..e9b6f064fb 100644
@@ -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 = "Standard PC (i440FX + PIIX, 1996)";
     m->default_machine_opts = "firmware=bios-256k.bin";
     m->default_display = "std";
+    machine_class_allow_dynamic_sysbus_dev(m, TYPE_RAMFB_DEVICE);
 }
 
 static void pc_i440fx_3_0_machine_options(MachineClass *m)
hw/i386/pc_q35.c +2 -0
index 087f2630f9..1a73e1848a 100644
@@ -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 = 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 = 288;
 }
 
hw/display/Makefile.objs +1 -0
index 0af04985d2..fb8408c6d0 100644
@@ -1,4 +1,5 @@
 common-obj-y += ramfb.o
+common-obj-y += ramfb-standalone.o
 
 common-obj-$(CONFIG_ADS7846) += ads7846.o
 common-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o
Signature · 1 line
2.9.3
#4 lore raw

[Qemu-devel] [PULL 2/4] hw/display: add ramfb, a simple boot framebuffer living in guest ram

In reply to Gerd Hoffmann

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.

Message-id: [email protected]

---
 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
include/hw/display/ramfb.h new file +9 -0
new file mode 100644
index 0000000000..a3d4c79942
@@ -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 */
hw/display/ramfb.c new file +95 -0

95 lines not on this page · raw message

hw/display/Makefile.objs +2 -0
index b5d97ab26d..0af04985d2 100644
@@ -1,3 +1,5 @@
+common-obj-y += ramfb.o
+
 common-obj-$(CONFIG_ADS7846) += ads7846.o
 common-obj-$(CONFIG_VGA_CIRRUS) += cirrus_vga.o
 common-obj-$(CONFIG_G364FB) += g364fb.o
Signature · 1 line
2.9.3
#5 lore raw
In reply to Gerd Hoffmann
Quoted 8 lines · Gerd Hoffmann

The following changes since commit 2ef2f16781af9dee6ba6517755e9073ba5799fa2:

Merge remote-tracking branch 'remotes/dgilbert/tags/pull-migration-20180615a' into staging (2018-06-15 18:13:35 +0100)

are available in the git repository at:

git://git.kraxel.org/qemu tags/vga-20180618-pull-request

Quoted 9 lines

for you to fetch changes up to 58d632c7ce66c272868b057491cec7ee5a6a1050:

Add ramfb MAINTAINERS entry (2018-06-18 11:24:25 +0200)

----------------------------------------------------------------
vga: add ramfb, print virglrenderer version

----------------------------------------------------------------

Applied, thanks.

-- PMM