[prev in list] [next in list] [prev in thread] [next in thread] 

List:       freedesktop-libdlo
Subject:    [Libdlo]  Endian Problem in udlfb
From:       hsk1385 () postech ! ac ! kr (S ! K Han)
Date:       2009-06-12 16:40:03
Message-ID: 28656377.1244824803753.JavaMail.root () mail2 ! postech ! ac ! kr
[Download RAW message or body]


 Hello.

 I tried modifying udlfb.c to prove endian problem in PowerPC (big-endian architecture)
 
 I modified pseudo palette bit definition part in dlfb_setcolreg()  function. but, It don't works, too
 
 Please give some clue :)

 My modified code is

in the header (endian convert function)
----------------------------
+#define SWAP32(l) \
+(((((l) & 0xff000000) >> 24)| \
+(((l) & 0x00ff0000) >> 8)  | \
+(((l) & 0x0000ff00) << 8)  | \
+(((l) & 0x000000ff) << 24)))

in dlfb_setcolreg() function
--------------------------- 
+ u32 endian_temp;
- ((u32 *) (info->pseudo_palette))[regno] =
+ endian_temp =
                            ((red & 0xf800) >> 1) |
                            ((green & 0xf800) >> 6) | ((blue & 0xf800) >> 11);
+                          ((u32 *) (info->pseudo_palette))[regno] = SWAP32(endian_temp);
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.freedesktop.org/archives/libdlo/attachments/20090613/d0af72c8/attachment.html 

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic