11 #include <linux/module.h>
12 #include <linux/string.h>
14 #include <asm/unaligned.h>
27 static void c2p_16x8(
u32 d[4])
41 static const int perm_c2p_16x8[4] = { 1, 3, 0, 2 };
52 for (i = 0; i < bpp/2; i++, dst += 4)
61 static inline void store_iplan2_masked(
void *dst,
u32 bpp,
u32 d[4],
u32 mask)
65 for (i = 0; i < bpp/2; i++, dst += 4)
96 dst += dy*dst_nextline+(dx & ~15)*bpp;
98 first = 0xffff
U >> dst_idx;
100 last = 0xffff
U ^ (0xffff
U >> ((dst_idx+
width) % 16));
106 if (dst_idx+width <= 16) {
109 memset(d.pixels, 0,
sizeof(d));
110 memcpy(d.pixels+dst_idx, c, width);
113 store_iplan2_masked(p, bpp, d.words, first);
121 memset(d.pixels, 0, dst_idx);
122 memcpy(d.pixels+dst_idx, c, w);
125 store_iplan2_masked(p, bpp, d.words, first);
134 store_iplan2(p, bpp, d.words);
142 memset(d.pixels+w, 0, 16-w);
144 store_iplan2_masked(p, bpp, d.words, last);