From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1KxCMq-00031B-PO for qemu-devel@nongnu.org; Mon, 03 Nov 2008 22:14:08 -0500 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1KxCMo-00030z-C2 for qemu-devel@nongnu.org; Mon, 03 Nov 2008 22:14:07 -0500 Received: from [199.232.76.173] (port=47515 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1KxCMo-00030w-63 for qemu-devel@nongnu.org; Mon, 03 Nov 2008 22:14:06 -0500 Received: from hs-out-0708.google.com ([64.233.178.241]:64218) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1KxCMo-0006Q4-Gv for qemu-devel@nongnu.org; Mon, 03 Nov 2008 22:14:06 -0500 Received: by hs-out-0708.google.com with SMTP id k27so1338431hsc.2 for ; Mon, 03 Nov 2008 19:14:01 -0800 (PST) Message-ID: Date: Tue, 4 Nov 2008 06:14:01 +0300 From: Dmitry Subject: Re: [Qemu-devel] [PATCH] tc6393xb: non-accelerated FB support In-Reply-To: MIME-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1 Content-Transfer-Encoding: 7bit Content-Disposition: inline References: <1225631790-15735-1-git-send-email-dbaryshkov@gmail.com> <1225631790-15735-3-git-send-email-dbaryshkov@gmail.com> <1225631790-15735-4-git-send-email-dbaryshkov@gmail.com> <1225631790-15735-5-git-send-email-dbaryshkov@gmail.com> <1225631790-15735-6-git-send-email-dbaryshkov@gmail.com> <1225631790-15735-7-git-send-email-dbaryshkov@gmail.com> <20081102173618.GA13998@doriath.ww600.siemens.net> <20081102194047.GA30249@doriath.ww600.siemens.net> Reply-To: qemu-devel@nongnu.org List-Id: qemu-devel.nongnu.org List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , To: andrzej zaborowski Cc: qemu-devel@nongnu.org 2008/11/4 andrzej zaborowski : > 2008/11/2 Dmitry Baryshkov : > [...] >> 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 >> Date: Thu, 11 Sep 2008 04:39:15 +0400 >> Subject: [PATCH] tc6393xb: non-accelerated FB support >> >> Signed-off-by: Dmitry Baryshkov >> --- >> 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