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
On 04/27/20 13:11, Gerd Hoffmann wrote:
>>> -size = (hwaddr)linesize * height;
>>> -data = cpu_physical_memory_map(addr, &size, false);
>>> -if (size != (hwaddr)linesize * height) {
>>> -cpu_physical_memory_unmap(data, size, 0, 0);
>>> +mapsize = size = stride * (height - 1)
> > -size = (hwaddr)linesize * height;
> > -data = cpu_physical_memory_map(addr, &size, false);
> > -if (size != (hwaddr)linesize * height) {
> > -cpu_physical_memory_unmap(data, size, 0, 0);
> > +mapsize = size = stride * (height - 1) + linesize;
> > +data = cpu_physica
On 04/23/20 13:41, Gerd Hoffmann wrote:
> Hi,
>
>> - if "linesize" is nonzero, make sure it is a whole multiple of the
>> required word size (?)
>>
>> - if "linesize" is nonzero, make sure it is not bogus with relation to
>> "width". I'm thinking something like:
>
> Yep, the whole linesize is a
Hi,
> - if "linesize" is nonzero, make sure it is a whole multiple of the
> required word size (?)
>
> - if "linesize" is nonzero, make sure it is not bogus with relation to
> "width". I'm thinking something like:
Yep, the whole linesize is a bit bogus, noticed after sending out this
series, I
On 04/22/20 12:02, Gerd Hoffmann wrote:
> Signed-off-by: Gerd Hoffmann
> ---
> hw/display/ramfb.c | 6 ++
> 1 file changed, 6 insertions(+)
>
> diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c
> index fbe959147dc9..d1b1cb9bb294 100644
> --- a/hw/display/ramfb.c
> +++ b/hw/display/ramfb.c
Signed-off-by: Gerd Hoffmann
---
hw/display/ramfb.c | 6 ++
1 file changed, 6 insertions(+)
diff --git a/hw/display/ramfb.c b/hw/display/ramfb.c
index fbe959147dc9..d1b1cb9bb294 100644
--- a/hw/display/ramfb.c
+++ b/hw/display/ramfb.c
@@ -15,6 +15,7 @@
#include "qapi/error.h"
#include "hw/