On Wed, 2002-04-24 at 10:52, José Fonseca wrote:
> On 2002.04.24 09:34 Michel Dänzer wrote:
> > ...
> > 
> > Anyway, MACH64_{READ,WRITE} will likely have to be changed to use
> > {in,out}_le32 (in mach64_drv.h) for it to work on PPC.
> > 
> 
> As Peter managed to get everything to compile, yesterday I was looking 
> into this but when looking at r128_drv.h but it only used the 
> le32_to_cpu/cpu_to_le32 macros for Alpha.

Look again. :)

While r128 currently has only cpu_to_le32 and le32_to_cpu, I think
{in,out}_le32 would be better because they are designed for MMIO and
preserve the order of memory/bus access. In fact, I propose to use them
for MMIO in all drivers on all architectures.

> I guesses that for MMIO  operation this wouldn't be necessary in PowerPC
> after all, as is the case of Mach64. Is this so? If so in which
> situations is it necessary to account for endian machines?

PCI is little endian so normally all access to a PCI device is little
endian. While most current graphics chip offer big endian apertures for
the framebuffer and registers, it's usually better and cleaner to use
the little endian aperture for the latter, in particular if not all
registers are 32 bit wide. At least PPC can load and store in little
endian so performance is not an issue.


-- 
Earthling Michel Dänzer (MrCooper)/ Debian GNU/Linux (powerpc) developer
XFree86 and DRI project member   /  CS student, Free Software enthusiast

_______________________________________________
Dri-devel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/dri-devel

Reply via email to