[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Qemu-devel] [PATCH] sm501: Adjust endianness of pixel value in rect
From: |
David Gibson |
Subject: |
Re: [Qemu-devel] [PATCH] sm501: Adjust endianness of pixel value in rectangle fill |
Date: |
Thu, 20 Sep 2018 12:49:04 +1000 |
User-agent: |
Mutt/1.10.1 (2018-07-13) |
On Wed, Sep 19, 2018 at 09:29:31AM -0700, Peter Maydell wrote:
> On 19 September 2018 at 07:46, BALATON Zoltan <address@hidden> wrote:
> > On Wed, 19 Sep 2018, Marcus Comstedt wrote:
> >>
> >> The value from twoD_foreground (which is in host endian format) must
> >> be converted to the endianness of the framebuffer (currently always
> >> little endian) before it can be used to perform the fill operation.
> >>
> >> Signed-off-by: Marcus Comstedt <address@hidden>
> >
> >
> > Reviewed-by: BALATON Zoltan <address@hidden>
> >
> > But also cc-ing Peter Maydell who reviewed endianness fixes before for this
> > device model in case he has something to add.
>
> There are probably other ways to fix that, but this looks OK to me.
> We have a pixel value in a host-endianness register field, and we're
> trying to write it into a little-endian framebuffer with a plain
> host store of a 32/16/8 bit type. So cpu-to-le is the right thing.
> (The other approach would be to use the stl_le_p()/stw_le_p()/stb_p()
> functions to do the store directly in the correct endianness. But
> I don't think that ends up with significantly cleaner code.)
>
> Reviewed-by: Peter Maydell <address@hidden>
Applied to ppc-for-3.1, thanks.
--
David Gibson | I'll have my music baroque, and my code
david AT gibson.dropbear.id.au | minimalist, thank you. NOT _the_ _other_
| _way_ _around_!
http://www.ozlabs.org/~dgibson
signature.asc
Description: PGP signature