Re: X endianess problem
From: Michel Dänzer <hidden>
Date: 2003-06-13 09:27:42
On Tue, 2003-06-10 at 13:04, Jochen Roth wrote:
I just finished reading through the radeonfb/endianness thread. I am working on an old IBM PReP thin client with an S3 Trio64V2/DX. I started out with 2.4.19 from kernel.org and added startup code and some patches for prep_pci.c etc. I am testing this under XFree86 4.1.0.1 with the fbdev module, current stable ppc off of debian.org. I got the 16bit console stuff working by byte-swapping the packed rgb words in the _setcolreg handler. Same code basically as in the clgenfb.c, for instance. Neither X nor fbi get the byte order right, though.
I think they just assume native byte order.
BTW, based on my debug output X never turns off the accelerator. Is that OK?
fbdevHWMapMMIO() in 4.3.0 seems to disable it.
The hardware documentation for my chip says that there is supposed to be an endian-swapped mapping for the frame buffer, essentially the second 32MB of the 64MB total bar0. As far as I can tell this second mapping does not byte-swap the video buffer.
Well, there's no single byte swapping working for all cases, maybe you need to configure it by writing to some register(s)? If there's indeed no way to have the hardware handle the byte order, you'd probably have to fix each app. Should be relatively easy in the X fbdev driver by using a special shadowUpdate function. -- Earthling Michel Dänzer \ Debian (powerpc), XFree86 and DRI developer Software libre enthusiast \ http://svcs.affero.net/rm.php?r=daenzer ------------------------------------------------------- This SF.NET email is sponsored by: eBay Great deals on office technology -- on eBay now! Click here: http://adfarm.mediaplex.com/ad/ck/711-11697-6916-5