Lines Matching +full:32 +full:- +full:bits
4 * Copyright (C) 2000 James Simmons (jsimmons@linux-fbdev.org)
22 #if BITS_PER_LONG == 32
31 * Aligned pattern fill using 32/64-bit memory accesses
36 unsigned long pat, unsigned n, int bits, u32 bswapmask) in bitfill_aligned() argument
44 last = ~fb_shifted_pixels_mask_long(p, (dst_idx+n) % bits, bswapmask); in bitfill_aligned()
46 if (dst_idx+n <= bits) { in bitfill_aligned()
54 // Leading bits in bitfill_aligned()
58 n -= bits - dst_idx; in bitfill_aligned()
62 n /= bits; in bitfill_aligned()
72 n -= 8; in bitfill_aligned()
74 while (n--) in bitfill_aligned()
77 // Trailing bits in bitfill_aligned()
85 * Unaligned generic pattern fill using 32/64-bit memory accesses
86 * The pattern must have been expanded to a full 32/64-bit value
88 * used for the next 32/64-bit word
93 unsigned long pat, int left, int right, unsigned n, int bits) in bitfill_unaligned() argument
101 last = ~(FB_SHIFT_HIGH(p, ~0UL, (dst_idx+n) % bits)); in bitfill_unaligned()
103 if (dst_idx+n <= bits) { in bitfill_unaligned()
110 // Leading bits in bitfill_unaligned()
115 n -= bits - dst_idx; in bitfill_unaligned()
119 n /= bits; in bitfill_unaligned()
129 n -= 4; in bitfill_unaligned()
131 while (n--) { in bitfill_unaligned()
136 // Trailing bits in bitfill_unaligned()
143 * Aligned pattern invert using 32/64-bit memory accesses
147 int dst_idx, unsigned long pat, unsigned n, int bits, in bitfill_aligned_rev() argument
157 last = ~fb_shifted_pixels_mask_long(p, (dst_idx+n) % bits, bswapmask); in bitfill_aligned_rev()
159 if (dst_idx+n <= bits) { in bitfill_aligned_rev()
167 // Leading bits in bitfill_aligned_rev()
172 n -= bits - dst_idx; in bitfill_aligned_rev()
176 n /= bits; in bitfill_aligned_rev()
194 n -= 8; in bitfill_aligned_rev()
196 while (n--) { in bitfill_aligned_rev()
200 // Trailing bits in bitfill_aligned_rev()
210 * Unaligned generic pattern invert using 32/64-bit memory accesses
211 * The pattern must have been expanded to a full 32/64-bit value
213 * used for the next 32/64-bit word
219 unsigned n, int bits) in bitfill_unaligned_rev() argument
227 last = ~(FB_SHIFT_HIGH(p, ~0UL, (dst_idx+n) % bits)); in bitfill_unaligned_rev()
229 if (dst_idx+n <= bits) { in bitfill_unaligned_rev()
238 // Leading bits in bitfill_unaligned_rev()
244 n -= bits - dst_idx; in bitfill_unaligned_rev()
248 n /= bits; in bitfill_unaligned_rev()
262 n -= 4; in bitfill_unaligned_rev()
264 while (n--) { in bitfill_unaligned_rev()
270 // Trailing bits in bitfill_unaligned_rev()
281 unsigned long width = rect->width, height = rect->height; in cfb_fillrect()
282 int bits = BITS_PER_LONG, bytes = bits >> 3; in cfb_fillrect() local
283 u32 bpp = p->var.bits_per_pixel; in cfb_fillrect()
287 if (p->state != FBINFO_STATE_RUNNING) in cfb_fillrect()
290 if (p->flags & FBINFO_VIRTFB) in cfb_fillrect()
293 if (p->fix.visual == FB_VISUAL_TRUECOLOR || in cfb_fillrect()
294 p->fix.visual == FB_VISUAL_DIRECTCOLOR ) in cfb_fillrect()
295 fg = ((u32 *) (p->pseudo_palette))[rect->color]; in cfb_fillrect()
297 fg = rect->color; in cfb_fillrect()
301 dst = (unsigned long __iomem *)((unsigned long)p->screen_base & ~(bytes-1)); in cfb_fillrect()
302 dst_idx = ((unsigned long)p->screen_base & (bytes - 1))*8; in cfb_fillrect()
303 dst_idx += rect->dy*p->fix.line_length*8+rect->dx*bpp; in cfb_fillrect()
304 /* FIXME For now we support 1-32 bpp only */ in cfb_fillrect()
305 left = bits % bpp; in cfb_fillrect()
306 if (p->fbops->fb_sync) in cfb_fillrect()
307 p->fbops->fb_sync(p); in cfb_fillrect()
312 unsigned long pat, unsigned n, int bits, in cfb_fillrect()
315 switch (rect->rop) { in cfb_fillrect()
327 while (height--) { in cfb_fillrect()
328 dst += dst_idx >> (ffs(bits) - 1); in cfb_fillrect()
329 dst_idx &= (bits - 1); in cfb_fillrect()
330 fill_op32(p, dst, dst_idx, pat, width*bpp, bits, in cfb_fillrect()
332 dst_idx += p->fix.line_length*8; in cfb_fillrect()
338 int right, unsigned n, int bits) = NULL; in cfb_fillrect()
341 left = bpp - right; in cfb_fillrect()
343 right = bpp - left; in cfb_fillrect()
345 switch (rect->rop) { in cfb_fillrect()
357 while (height--) { in cfb_fillrect()
358 dst += dst_idx / bits; in cfb_fillrect()
359 dst_idx &= (bits - 1); in cfb_fillrect()
364 width*bpp, bits); in cfb_fillrect()
365 dst_idx += p->fix.line_length*8; in cfb_fillrect()