[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [PATCH 4/5] ramfb: add sanity checks to ramfb_create_display_surface
From: |
Gerd Hoffmann |
Subject: |
Re: [PATCH 4/5] ramfb: add sanity checks to ramfb_create_display_surface |
Date: |
Wed, 29 Apr 2020 10:51:25 +0200 |
Hi,
> > Not fully sure we can do that without breaking something, might be a
> > negative stride is used for upside down images (last scanline comes
> > first in memory).
>
> Ugh... Upside down images???... Well, OK, I guess. :)
Well, in the unix world (x11, wayland) x=0,y=0 is the upper left corner.
In the windows world x=0,y=0 is the lower left corner, in opengl too.
If you don't handle this correctly your guest display might show up
upside down ;)
qxl uses negative strides to signal that. Looking at the code I see qxl
handles this locally (grep for qxl_stride in qxl-render.c), it doesn't
propagate into ui/console.c, so it should be safe to change the
qemu_create_displaysurface_from() arguments to unsigned from qxl point
of view.
take care,
Gerd
[PATCH 3/5] ramfb: don't update RAMFBState on errors, Gerd Hoffmann, 2020/04/22
[PATCH 2/5] Revert "hw/display/ramfb: lock guest resolution after it's set", Gerd Hoffmann, 2020/04/22
[PATCH 1/5] Revert "hw/display/ramfb: initialize fw-config space with xres/ yres", Gerd Hoffmann, 2020/04/22
[PATCH 5/5] ramfb: drop leftover debug message, Gerd Hoffmann, 2020/04/22