FB endianness

Thomas Winischhofer thomas at winischhofer.net
Fri Jan 21 10:58:08 PST 2005


-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Keith Packard wrote:
| Around 10 o'clock on Jan 21, Thomas Winischhofer wrote:
|
|
|>Again, how do I disable those? Are we speaking compile-time or run-time?
|
|
| It's all compile time at present.
|
| fb has the following compile-time options:
|
| symbol			effect
| ------------------------------------
| FBNO24BIT		Disable 24bpp support
| BITMAP_BIT_ORDER	Select bit and byte order of pixels within 32-bit units
| FBNOPIXADDR		Disable direct pixel addressing.  This forces all
| 			accesses to be in 32-bit units
| FBNO24_32		Exposes 24bpp drawables with 24bpp image formats,
| 			normally these are exposed using 32bpp image formats
| 			as most applications get the 24bpp case wrong.
| FB_DEBUG		Checks for out of bounds writes to images by padding
| 			images with a guard scanline on each end
|
| Note that the FB options are all designed so that the normal build is
done
| by not defining any of them.
|
| So, in your case, you'd set BITMAP_BIT_ORDER to LSBFirst, and set
| FBNOPIXADDR to disable byte and short access to frame buffer memory.
|
| If you're interested in saving a bit more memory (FBNOPIXADDR saves quite
| a bit), you can also enable FBNO24BIT.

OK, thanks. Compile-time isn't that practical :(

Anyway, I think I solved this a different way:

1) for 16bpp, I simply use two shadowfbs, one to let the fb layer in,
one to which I swap the bytes in RefreshArea (which later is written to
the device in the block handler)

2) for 24bpp (which is 32fbpp), I use different masks and offsets in pScrn.

Both looks "ok" on my le hardware (on which I let this setup run for
testing), but I have no BE hardware so I am not sure.

Next question is the HWCursor. In what format is this in memory? Many
drivers clear/set the "MSB"-flag in the cursor info rec, but I don't
think this is what I would need (since it causes a swap of bits in
bytes, not bytes themselves). Ideally, the cursor image is - like the fb
data - just byte-swapped. Is this the case?

Thanks,

Thomas


- --
Thomas Winischhofer
Vienna/Austria
thomas AT winischhofer DOT net          http://www.winischhofer.net/
twini AT xfree86 DOT org
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.5 (GNU/Linux)
Comment: Using GnuPG with Thunderbird - http://enigmail.mozdev.org

iD8DBQFB8VC/zydIRAktyUcRAkNCAJ9GyZ1y285xUlX3UC/8aoGSqEvEwACdF6Jo
75CiT/6GijR+yWuCi5UmZqI=
=ItMY
-----END PGP SIGNATURE-----



More information about the xorg mailing list