Hi, I found a quick way to fix it by substituting in utils.h your load/store_32 functions:
inline static u32 load_carmine32(const u32 *addr) { u32 tmp; u32 ret; __asm__ __volatile__("lwbrx %0,0,%1;\n" : "=r" (tmp) : "r" (addr), "m" (*addr)); __asm__ __volatile__("rotrwi %0,%1,8;\n" : "=r" (ret): "r" (tmp)); return ret; } inline static void store_carmine32( u32 *addr, u32 argb) { u32 tmp; __asm__ __volatile__("rotlwi %0,%1,8;\n" : "=r" (tmp): "r" (argb)); __asm__ __volatile__("stwbrx %1,0,%2;\n" : "=m" (*addr) : "r" (tmp), "r" (addr)); } Maybe it could be optimized a little more in terms of used registers, but it works well. I had to fix also JPEG/PNG image loading, since I'm basically working ARGB. Thanks a lot! Matteo Nikita Egorov ha scritto: > Did you set the flag in config.h ? > #define REVERSE_BYTES 1 > > > 2008/6/26, Matteo Fortini <[EMAIL PROTECTED]>: > >> Hi, >> I'm trying to use the Fujitsu Carmine with DirectFB on a MPC512x board >> (Freescale LSP) >> The driver I'm currently using is the carmine_fb from the recent 2.6.26 >> patches. >> >> The driver sets the carmine as ABGR, which is ok, and Linux shows the >> tux logo with the right colors. >> >> However, directFB is not happy with the [EMAIL PROTECTED] [EMAIL PROTECTED] >> [EMAIL PROTECTED] [EMAIL PROTECTED] format, so >> to make it start I had to pretend it was a standard ARGB: >> >> if (dfb_fbdev_compatible_format( var, 8, 8, 8, 8, 24, 0, 8, 16 )) >> return DSPF_ARGB; >> >> Of course this way the colors are all scrambled. >> >> I found a patch on the mailing list, but it doesn't apply to DirectFB >> 1.1.0, so I'm wondering which version I should have applied it to. >> >> I did fix the rejected hunks by myself, but the resulting library is >> still working with wrong colors. >> >> Is anyone doing similar things? >> >> Do you have any advice? >> >> Thank you in advance, >> Matteo >> >> _______________________________________________ >> directfb-dev mailing list >> directfb-dev@directfb.org >> http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev >> >> > > > -- Ing. Matteo Fortini, PhD Digitek spa Video Surveillance & Special Applications Group V. Romagnoli, 24 41033 Concordia (MO) Italy Tel : (+39) 0535-56942 Fax : (+39) 0535-54550 Skype: callto://matteofortini eMail: [EMAIL PROTECTED] _______________________________________________ directfb-dev mailing list directfb-dev@directfb.org http://mail.directfb.org/cgi-bin/mailman/listinfo/directfb-dev