qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Corrupted display changing screen colour depth in qemu-system-ppc/Ma


From: Mark Cave-Ayland
Subject: Re: Corrupted display changing screen colour depth in qemu-system-ppc/MacOS
Date: Fri, 22 Jul 2022 17:40:32 +0100
User-agent: Mozilla/5.0 (X11; Linux x86_64; rv:91.0) Gecko/20100101 Thunderbird/91.10.0

On 22/07/2022 14:44, Marc-André Lureau wrote:

Hi

On Fri, Jul 22, 2022 at 4:28 PM Howard Spoelstra <hsp.cat7@gmail.com> wrote:



On Fri, Jun 17, 2022 at 2:38 PM Marc-André Lureau <marcandre.lureau@redhat.com> 
wrote:

Hi

On Fri, Jun 17, 2022 at 1:56 PM Gerd Hoffmann <kraxel@redhat.com> wrote:

   Hi,

Can you try ditch the QEMU_ALLOCATED_FLAG check added by the commit?

Commit cb8962c146 drops the QEMU_ALLOCATED_FLAG check: if I add it back in
with the following diff on top then everything works again:

Ah, the other way around.

diff --git a/ui/console.c b/ui/console.c
index 365a2c14b8..decae4287f 100644
--- a/ui/console.c
+++ b/ui/console.c
@@ -2400,11 +2400,12 @@ static void vc_chr_open(Chardev *chr,

  void qemu_console_resize(QemuConsole *s, int width, int height)
  {
-    DisplaySurface *surface;
+    DisplaySurface *surface = qemu_console_surface(s);

      assert(s->console_type == GRAPHIC_CONSOLE);

-    if (qemu_console_get_width(s, -1) == width &&
+    if (surface && (surface->flags & QEMU_ALLOCATED_FLAG) &&
+        qemu_console_get_width(s, -1) == width &&
          qemu_console_get_height(s, -1) == height) {
          return;
      }

Which depth changes triggers this?  Going from direct color to a
paletted mode?

A quick test suggests anything that isn't 32-bit colour is affected.

Hmm, I think the commit should simply be reverted.

Short-cutting the qemu_console_resize() call is only valid in case the
current surface was created by qemu_console_resize() too.  When it is
something else -- typically a surface backed by vga vram -- it's not.
Looking at the QEMU_ALLOCATED_FLAG checks exactly that ...

Oh ok, it might be worth adding a comment to clarify that. By
reverting, we are going back to the situation where
qemu_console_resize() will create a needless surface when rendering
with GL. As I tried to explain in the commit message, it will need
more changes to prevent that. I can take a look later.


Hi Marc-André,

I wondered whether you've had a chance to look at this?


No, it's not clear to me how to reproduce it. Someone that can
actually test it should send a patch with some comments to explain it.

Unfortunately I don't know anything about the host display code, but I think I should be able to come up with some Forth to run from the command line that will reproduce the issue with qemu-system-ppc. Let me see if I can come up with something...


ATB,

Mark.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]