Endianess problem in fbcon and cfbimgblt when using monochrome fb
Hi,
I have written a framebuffer driver for an Epson SED1335 based LCD for the ARM platform. The LCD is monochrome, so the driver currently only supports 1 bpp. The ARM is little-endian.
Everything works fine except when using the fbcon. All text printed to that console appears with having each character mirrored on the y axis. So it looks like an endian problem.
I found a message from April ("[patch 19/26] fbcon: Fix big-endian bogosity in slow_imageblit()") which fixes a problem for big-endian machines. After reverting that patch and changing
#define FB_BIT_NR(b) (b)
to
#define FB_BIT_NR(b) (7 - (b))
the text appears as expected. So my question is if the patch might be wrong and should only change the defines for FB_BIT_NR? Or could the problem be somewhere else?
Regards,
Mike Wolfram
Signature · 10 lines
MicroDatec GmbH Zeulenrodaer Str. 17, 99091 Erfurt, Germany fon +49-361-77821-0, fax +49-361-77821-30 mobile +49-179-4902190 ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV
Quoted 8 lines · Mike Wolfram
I have written a framebuffer driver for an Epson SED1335 based LCD for the ARM platform. The LCD is monochrome, so the driver currently only supports 1 bpp. The ARM is little-endian.
Everything works fine except when using the fbcon. All text printed to that console appears with having each character mirrored on the y axis. So it looks like an endian problem.
No, endianness is only about byte order, not bit order.
Signature · 13 lines
Earthling Michel Dänzer | http://tungstengraphics.com Libre software enthusiast | Debian, X and DRI developer ------------------------------------------------------------------------- Take Surveys. Earn Cash. Influence the Future of IT Join SourceForge.net's Techsay panel and you'll get the chance to share your opinions on IT & business topics through brief surveys -- and earn cash http://www.techsay.com/default.php?page=join.php&p=sourceforge&CID=DEVDEV _______________________________________________ Linux-fbdev-devel mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/linux-fbdev-devel