From: "Marc-André Lureau" <marcandre.lureau@redhat.com>
To: Howard Spoelstra <hsp.cat7@gmail.com>
Cc: Gerd Hoffmann <kraxel@redhat.com>,
Mark Cave-Ayland <mark.cave-ayland@ilande.co.uk>,
qemu-devel <qemu-devel@nongnu.org>
Subject: Re: Corrupted display changing screen colour depth in qemu-system-ppc/MacOS
Date: Fri, 22 Jul 2022 17:44:42 +0400 [thread overview]
Message-ID: <CAMxuvayg9S3Z8UL8gGLF+6p=j2sFi58RZpTFNB8NcQbzmx_u9Q@mail.gmail.com> (raw)
In-Reply-To: <CABLmASGnjbqwueo9T-Ed7x3srS9BME+C18vSfOP955cZtf=i6w@mail.gmail.com>
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.
thanks
next prev parent reply other threads:[~2022-07-22 13:51 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2022-06-16 8:54 Corrupted display changing screen colour depth in qemu-system-ppc/MacOS Mark Cave-Ayland
2022-06-16 12:07 ` Gerd Hoffmann
2022-06-16 12:37 ` Mark Cave-Ayland
2022-06-17 9:55 ` Gerd Hoffmann
2022-06-17 12:37 ` Marc-André Lureau
2022-07-22 12:28 ` Howard Spoelstra
2022-07-22 13:44 ` Marc-André Lureau [this message]
2022-07-22 16:40 ` Mark Cave-Ayland
2022-07-23 8:59 ` Mark Cave-Ayland
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CAMxuvayg9S3Z8UL8gGLF+6p=j2sFi58RZpTFNB8NcQbzmx_u9Q@mail.gmail.com' \
--to=marcandre.lureau@redhat.com \
--cc=hsp.cat7@gmail.com \
--cc=kraxel@redhat.com \
--cc=mark.cave-ayland@ilande.co.uk \
--cc=qemu-devel@nongnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
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).