qemu-devel.nongnu.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 0/2] virtio-vga: fix blue boot console @ ppc
@ 2020-09-28  8:53 Gerd Hoffmann
  2020-09-28  8:53 ` [PATCH 1/2] virtio-vga: implement big-endian-framebuffer property Gerd Hoffmann
  2020-09-28  8:53 ` [PATCH 2/2] ppc/pseries: enable big-endian-framebuffer quirk for bochs-display and virtio-vga Gerd Hoffmann
  0 siblings, 2 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2020-09-28  8:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: David Gibson, qemu-ppc, Gerd Hoffmann, Michael S. Tsirkin



Gerd Hoffmann (2):
  virtio-vga: implement big-endian-framebuffer property
  ppc/pseries: enable big-endian-framebuffer quirk for bochs-display and
    virtio-vga

 hw/display/virtio-vga.c | 19 +++++++++++++++++++
 hw/ppc/spapr_pci.c      |  4 +++-
 2 files changed, 22 insertions(+), 1 deletion(-)

-- 
2.27.0




^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] virtio-vga: implement big-endian-framebuffer property
  2020-09-28  8:53 [PATCH 0/2] virtio-vga: fix blue boot console @ ppc Gerd Hoffmann
@ 2020-09-28  8:53 ` Gerd Hoffmann
  2020-09-28  8:53 ` [PATCH 2/2] ppc/pseries: enable big-endian-framebuffer quirk for bochs-display and virtio-vga Gerd Hoffmann
  1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2020-09-28  8:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: David Gibson, qemu-ppc, Gerd Hoffmann, Michael S. Tsirkin

Allows to switch the (vga mode) framebuffer into bigendian mode
by setting the property, simliar to stdvga.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/display/virtio-vga.c | 19 +++++++++++++++++++
 1 file changed, 19 insertions(+)

diff --git a/hw/display/virtio-vga.c b/hw/display/virtio-vga.c
index f9410a0c2e61..81f776ee36e7 100644
--- a/hw/display/virtio-vga.c
+++ b/hw/display/virtio-vga.c
@@ -168,6 +168,20 @@ static void virtio_vga_base_reset(DeviceState *dev)
     vga_dirty_log_start(&vvga->vga);
 }
 
+static bool virtio_vga_get_big_endian_fb(Object *obj, Error **errp)
+{
+    VirtIOVGABase *d = VIRTIO_VGA_BASE(obj);
+
+    return d->vga.big_endian_fb;
+}
+
+static void virtio_vga_set_big_endian_fb(Object *obj, bool value, Error **errp)
+{
+    VirtIOVGABase *d = VIRTIO_VGA_BASE(obj);
+
+    d->vga.big_endian_fb = value;
+}
+
 static Property virtio_vga_base_properties[] = {
     DEFINE_VIRTIO_GPU_PCI_PROPERTIES(VirtIOPCIProxy),
     DEFINE_PROP_END_OF_LIST(),
@@ -190,6 +204,11 @@ static void virtio_vga_base_class_init(ObjectClass *klass, void *data)
     k->realize = virtio_vga_base_realize;
     pcidev_k->romfile = "vgabios-virtio.bin";
     pcidev_k->class_id = PCI_CLASS_DISPLAY_VGA;
+
+    /* Expose framebuffer byteorder via QOM */
+    object_class_property_add_bool(klass, "big-endian-framebuffer",
+                                   virtio_vga_get_big_endian_fb,
+                                   virtio_vga_set_big_endian_fb);
 }
 
 static TypeInfo virtio_vga_base_info = {
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

* [PATCH 2/2] ppc/pseries: enable big-endian-framebuffer quirk for bochs-display and virtio-vga
  2020-09-28  8:53 [PATCH 0/2] virtio-vga: fix blue boot console @ ppc Gerd Hoffmann
  2020-09-28  8:53 ` [PATCH 1/2] virtio-vga: implement big-endian-framebuffer property Gerd Hoffmann
@ 2020-09-28  8:53 ` Gerd Hoffmann
  1 sibling, 0 replies; 3+ messages in thread
From: Gerd Hoffmann @ 2020-09-28  8:53 UTC (permalink / raw)
  To: qemu-devel; +Cc: David Gibson, qemu-ppc, Gerd Hoffmann, Michael S. Tsirkin

Already done for stdvga and secondary-vga, bochs-display and virtio-vga
support the big-endian-framebuffer property too.  Fixes blue console
background at boot (offb firmware console).

Buglink: https://bugzilla.redhat.com/show_bug.cgi?id=1881912
Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
---
 hw/ppc/spapr_pci.c | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/hw/ppc/spapr_pci.c b/hw/ppc/spapr_pci.c
index 4d97ff6c70f2..5db912b48c41 100644
--- a/hw/ppc/spapr_pci.c
+++ b/hw/ppc/spapr_pci.c
@@ -2464,7 +2464,9 @@ static int spapr_switch_one_vga(DeviceState *dev, void *opaque)
     bool be = *(bool *)opaque;
 
     if (object_dynamic_cast(OBJECT(dev), "VGA")
-        || object_dynamic_cast(OBJECT(dev), "secondary-vga")) {
+        || object_dynamic_cast(OBJECT(dev), "secondary-vga")
+        || object_dynamic_cast(OBJECT(dev), "bochs-display")
+        || object_dynamic_cast(OBJECT(dev), "virtio-vga")) {
         object_property_set_bool(OBJECT(dev), "big-endian-framebuffer", be,
                                  &error_abort);
     }
-- 
2.27.0



^ permalink raw reply related	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2020-09-28  8:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-09-28  8:53 [PATCH 0/2] virtio-vga: fix blue boot console @ ppc Gerd Hoffmann
2020-09-28  8:53 ` [PATCH 1/2] virtio-vga: implement big-endian-framebuffer property Gerd Hoffmann
2020-09-28  8:53 ` [PATCH 2/2] ppc/pseries: enable big-endian-framebuffer quirk for bochs-display and virtio-vga 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).