|
From: Benjamin H. <be...@ke...> - 2001-11-23 13:08:56
|
While working on radeonfb, I figured out there is something we probably don't handle properly in it nor in aty128fb, and I'm actually not sure how we should handle it API-wise with 565. For 8 bits, 5:5:5 and 24 bits, there is no problem, each color component has the same size. 8 and 24 bits takes regno values ranging from 0 to 255, while 5:5:5 takes regno values ranging from 0 to 31 (internally expanded to 0..255). For 5:6:5 things are slightly different since R and B have a 0..31 range while G ranges from 0..63. In the DAC, the ATI chip right-align these, so a given regno is actually split into regno<<3 for R and B values and regno<<2 for G. However, that means we should expose to userland a 64 entries cmap instead of 32, am I wrong ? In this case however, when setting cmap for regno 32..63, we should ignore R and B and only use G, or did I miss something ? Ben. |