aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/c2p_core.h
diff options
context:
space:
mode:
authorGeert Uytterhoeven <geert@linux-m68k.org>2008-12-21 09:48:12 -0500
committerGeert Uytterhoeven <geert@linux-m68k.org>2009-01-12 14:56:31 -0500
commit96f47d6105203ab06c2004e26979dea153bce073 (patch)
tree39dce6e593746e55084a4b1c65cf66f66932a07c /drivers/video/c2p_core.h
parent2cd1de0a0ff1d3da08ff1f1437cf4a44deae6a00 (diff)
fbdev: c2p/atafb - Add support for Atari interleaved bitplanes
The c2p() for normal bitplanes is not suitable for interleaved bitplanes with 2 bytes of interleave, causing a garbled penguin logo. Add c2p_iplan2(). Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
Diffstat (limited to 'drivers/video/c2p_core.h')
-rw-r--r--drivers/video/c2p_core.h47
1 files changed, 47 insertions, 0 deletions
diff --git a/drivers/video/c2p_core.h b/drivers/video/c2p_core.h
index 3573cf723e4..e1035a865fb 100644
--- a/drivers/video/c2p_core.h
+++ b/drivers/video/c2p_core.h
@@ -96,6 +96,53 @@ static inline void transp8(u32 d[], unsigned int n, unsigned int m)
96 96
97 97
98 /* 98 /*
99 * Transpose operations on 4 32-bit words
100 */
101
102static inline void transp4(u32 d[], unsigned int n, unsigned int m)
103{
104 u32 mask = get_mask(n);
105
106 switch (m) {
107 case 1:
108 /* First n x 1 block */
109 _transp(d, 0, 1, n, mask);
110 /* Second n x 1 block */
111 _transp(d, 2, 3, n, mask);
112 return;
113
114 case 2:
115 /* Single n x 2 block */
116 _transp(d, 0, 2, n, mask);
117 _transp(d, 1, 3, n, mask);
118 return;
119 }
120
121 c2p_unsupported();
122}
123
124
125 /*
126 * Transpose operations on 4 32-bit words (reverse order)
127 */
128
129static inline void transp4x(u32 d[], unsigned int n, unsigned int m)
130{
131 u32 mask = get_mask(n);
132
133 switch (m) {
134 case 2:
135 /* Single n x 2 block */
136 _transp(d, 2, 0, n, mask);
137 _transp(d, 3, 1, n, mask);
138 return;
139 }
140
141 c2p_unsupported();
142}
143
144
145 /*
99 * Compose two values, using a bitmask as decision value 146 * Compose two values, using a bitmask as decision value
100 * This is equivalent to (a & mask) | (b & ~mask) 147 * This is equivalent to (a & mask) | (b & ~mask)
101 */ 148 */