qemu-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Qemu-devel] [PATCH] tc6393xb: non-accelerated FB support


From: Dmitry
Subject: Re: [Qemu-devel] [PATCH] tc6393xb: non-accelerated FB support
Date: Tue, 4 Nov 2008 06:14:01 +0300

2008/11/4 andrzej zaborowski <address@hidden>:
> 2008/11/2 Dmitry Baryshkov <address@hidden>:
> [...]
>> As a second thought I've implemented blanking, implemented your
>> suggestions. Please take a look at the following patch.
>
> Thanks, this looks better.

Good!

>
>>
>> From 57cd66fefc31ac18f1f896a8ca53441b01f0d345 Mon Sep 17 00:00:00 2001
>> From: Dmitry Baryshkov <address@hidden>
>> Date: Thu, 11 Sep 2008 04:39:15 +0400
>> Subject: [PATCH] tc6393xb: non-accelerated FB support
>>
>> Signed-off-by: Dmitry Baryshkov <address@hidden>
>> ---
>>  hw/devices.h           |    4 +-
>>  hw/tc6393xb.c          |  120 
>> +++++++++++++++++++++++++++++++++++++++++++++++-
>>  hw/tc6393xb_template.h |   72 +++++++++++++++++++++++++++++
>>  hw/tosa.c              |   17 +++++--
>>  4 files changed, 205 insertions(+), 8 deletions(-)
>>  create mode 100644 hw/tc6393xb_template.h

>> +
>> +#if BITS == 8
>> +# define SET_PIXEL(addr, color)        *(uint8_t*)addr = color;
>> +#elif BITS == 15 || BITS == 16
>> +# define SET_PIXEL(addr, color)        *(uint16_t*)addr = color;
>> +#elif BITS == 24
>> +# define SET_PIXEL(addr, color)        \
>> +    addr[0] = color; addr[1] = (color) >> 8; addr[2] = (color) >> 16;
>> +#elif BITS == 32
>> +# define SET_PIXEL(addr, color)        *(uint32_t*)addr = color;
>> +#else
>> +# error unknown bit depth
>> +#endif
>
> Hmm.. now when I look at this it triggers an alert because
>  *(uint16_t *) addr = color;
> and
>  addr[0] = coor; addr[1] = (color) >> 8;
> do different things on a bigendian host.  But I can't tell offhand
> which one we want here...
>
> pxa2xx_template.h and pl110_template.h might have the same problem.

>From a quick glance most other video emulators will suffer from this problem.
IMO we can merge this as is and later fix this if the problem really exists
on BE hosts.

-- 
With best wishes
Dmitry




reply via email to

[Prev in Thread] Current Thread [Next in Thread]