On Tue, 19 Feb 2008 12:27:54 +0100 Clemens Koller <clemens.koller@xxxxxxxxxxx> wrote:Benjamin Herrenschmidt schrieb:On Tue, 2008-02-19 at 00:35 +0100, Clemens Koller wrote:Most! But not the SM50x. I still hope I would be wrong here. :-(Valdis.Kletnieks@xxxxxx schrieb:Most "sane" gfx chips nowadays provide configurable surfaces that allowOn Mon, 18 Feb 2008 08:18:47 +0100, Krzysztof Helt said:I had troubles with the Silicon Motion SM501/SM502 endianess on PowerPC PCI vs. LocalBus.I know two fb drivers which use endianess information (pm2fb and s3c2410fb).Does anybody know of such a chip that's actually available in the wild? Or are
Both resolve endianess at driver level. Actually, both handle it by setting special
bits so the graphics chip itself reorder bytes to transform foreign endianess. I understand that this patch is for chips which cannot reorder bytes by themselves.
we writing drivers for speculative possible chips?
The chip also has a register to swap endianess, but that seems to only affect some
LocalBus modes.
The current fb and X drivers are working, but when it comes to font
aliasing and hw-acceleration, the problems start to rise again...
to perform the swap when writing/reading from regions of the
framebuffer, with the ability to set a different swapper setting (based
on bit depth) per region.
Then there is also the risk that your PCI<->Localbus has been wiredThat's not an issue in my case. The SM50x can be connected to
improperly :-)
either an PCI or some Local/CPU-whateverbus IF.
I.e. on the MPC85xx PowerPC, PCI and LocalBus are separate bussses.
If the sm501 is attached to the MPC85xx' PCI like any other video card,
the PCI config-space is can be accessed as usual, whereas the framebuffer
memory area is byte-swapped compared to other common video cards.
So, to get back on topic:
I would welcome endianess swapping in SW. Some architectures (PowerPC)
should also be able to do swapped-endian mmapping. I just haven't
had time for a closer look but it looks also interesting way to do it
that way.
Bizarrely, the original author of the patch (Anton) has fallen off the cc. Could whoever did that please thwap himself?
Anyway, my head is now officially spinning. Did anyone actually have a
reason why we shouldn't proceed with Anton's patch?