14 #include <linux/module.h>
15 #include <linux/string.h>
17 #include <asm/types.h>
25 bitfill_aligned(
struct fb_info *
p,
unsigned long *
dst,
int dst_idx,
26 unsigned long pat,
unsigned n,
int bits)
36 if (dst_idx+n <= bits) {
40 *dst = comp(pat, *dst, first);
46 *dst = comp(pat, *dst, first);
68 *dst = comp(pat, *dst, last);
81 bitfill_unaligned(
struct fb_info *p,
unsigned long *dst,
int dst_idx,
82 unsigned long pat,
int left,
int right,
unsigned n,
int bits)
84 unsigned long first, last;
92 if (dst_idx+n <= bits) {
96 *dst = comp(pat, *dst, first);
101 *dst = comp(pat, *dst, first);
127 *dst = comp(pat, *dst, last);
135 bitfill_aligned_rev(
struct fb_info *p,
unsigned long *dst,
int dst_idx,
136 unsigned long pat,
unsigned n,
int bits)
138 unsigned long val = pat;
139 unsigned long first, last;
147 if (dst_idx+n <= bits) {
151 *dst = comp(*dst ^ val, *dst, first);
156 *dst = comp(*dst ^ val, *dst, first);
178 *dst = comp(*dst ^ val, *dst, last);
191 bitfill_unaligned_rev(
struct fb_info *p,
unsigned long *dst,
int dst_idx,
192 unsigned long pat,
int left,
int right,
unsigned n,
195 unsigned long first, last;
203 if (dst_idx+n <= bits) {
207 *dst = comp(*dst ^ pat, *dst, first);
213 *dst = comp(*dst ^ pat, *dst, first);
239 *dst = comp(*dst ^ pat, *dst, last);
245 unsigned long pat, pat2, fg;
261 pat = pixel_to_pat( bpp, fg);
263 dst = (
unsigned long *)((
unsigned long)p->
screen_base & ~(bytes-1));
265 dst_idx += rect->
dy*p->
fix.line_length*8+rect->
dx*
bpp;
268 if (p->
fbops->fb_sync)
269 p->
fbops->fb_sync(p);
272 int dst_idx,
unsigned long pat,
unsigned n,
277 fill_op32 = bitfill_aligned_rev;
280 fill_op32 = bitfill_aligned;
284 "defaulting to ROP_COPY\n");
285 fill_op32 = bitfill_aligned;
289 dst += dst_idx >> (
ffs(bits) - 1);
290 dst_idx &= (bits - 1);
291 fill_op32(p, dst, dst_idx, pat, width*bpp, bits);
292 dst_idx += p->
fix.line_length*8;
297 int dst_idx,
unsigned long pat,
int left,
299 #ifdef __LITTLE_ENDIAN
307 fill_op = bitfill_unaligned_rev;
310 fill_op = bitfill_unaligned;
314 "defaulting to ROP_COPY\n");
315 fill_op = bitfill_unaligned;
319 dst += dst_idx /
bits;
320 dst_idx &= (bits - 1);
324 fill_op(p, dst, dst_idx, pat2, left, right,
326 dst_idx += p->
fix.line_length*8;