On 19 September 2018 at 07:46, BALATON Zoltan <[email protected]> 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 <[email protected]>
>
>
> Reviewed-by: BALATON Zoltan <[email protected]>
>
> 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 <[email protected]>

thanks
-- PMM

Reply via email to