Home
last modified time | relevance | path

Searched hist:"3 fcf15df" (Results 1 – 1 of 1) sorted by relevance

/openbmc/qemu/hw/display/
H A Dramfb.c3fcf15df Wed Apr 29 06:52:36 CDT 2020 Gerd Hoffmann <kraxel@redhat.com> ramfb: fix size calculation

size calculation isn't correct with guest-supplied stride, the last
display line isn't accounted for correctly.

For the typical case of stride > linesize (add padding) we error on the
safe side (calculated size is larger than actual size).

With stride < linesize (scanlines overlap) the calculated size is
smaller than the actual size though so our guest memory mapping might
end up being too small.

While being at it also fix ramfb_create_display_surface to use hwaddr
for the parameters. That way all calculation are done with hwaddr type
and we can't get funny effects from type castings.

Signed-off-by: Gerd Hoffmann <kraxel@redhat.com>
Acked-by: Laszlo Ersek <lersek@redhat.com>
Message-id: 20200429115236.28709-7-kraxel@redhat.com