Skip to contentSkip to conversation

Linux Framebuffer endian issues

DISCUSSION Andrey Volkov 1 participant 1 message Oct 24, 2005 1 message not in the archive Framebuffer layer

lore
Share & tools
lore

A message that is not in the archive (sent off-list or not yet received): [email protected]

#1 lore raw

Hi Rolf,

Quoted 7 lines · Rolf Offermanns

Hi Andrey,
I have seen your thread about endian issues with the linux framebuffer system and your SMI501 driver.

I am currently writing a driver for a SMI712 on a PCI card in a big endian system (PPC440EP).

Quoted 6 lines

While 8bpp modes works quite well, I have wrong color in 16bpp truecolor visual.

I guess this could be the same thing, you saw.

Did you solve the problem?

No I defer solution of this problem :(, since 16 bpp doesn't critical for me in nearest 2 months.

Quoted 3 lines

If yes, would you be so kind to share your findings
with me? I tried lots of things like changing the offsets of the length fields, but I was not successfull.

For me, was helpful offsets changing (I get right colors), but in this case pixels are shifted :(.

Try something like this dirty hack:

fb.h renamed from fb.h.old +0 -1
@@ -778,7 +778,7 @@
 #define fb_writeq sbus_writeq
 #define fb_memset sbus_memset_io
 
-#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) ||

defined(__hppa__) || (defined(__sh__) && !defined(__SH5__)) || defined(__powerpc__)
+#elif defined(__i386__) || defined(__alpha__) || defined(__x86_64__) || defined(__hppa__) || (defined(__sh__) && !defined(__SH5__))

#define fb_readb __raw_readb
#define fb_readw __raw_readw
@@ -790,6 +790,16 @@
#define fb_writeq __raw_writeq
#define fb_memset memset_io

+#else if defined(__powerpc__)
+#define fb_readb readb
+#define fb_readw readw
+#define fb_readl readl
+#define fb_readq readq
+#define fb_writeb writeb
+#define fb_writew writew
+#define fb_writel writel
+#define fb_writeq writeq
+#define fb_memset memset_io
#else

#define fb_readb(addr) (*(volatile u8 *) (addr))

Quoted 5 lines

Thanks,
Rolf

Signature · 9 lines
Regards
Andrey Volkov


-------------------------------------------------------
This SF.Net email is sponsored by the JBoss Inc.
Get Certified Today * Register for a JBoss Training Course
Free Certification Exam for All Training Attendees Through End of 2005
Visit http://www.jboss.com/services/certification for more information