aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/video/syscopyarea.c
diff options
context:
space:
mode:
Diffstat (limited to 'drivers/video/syscopyarea.c')
-rw-r--r--drivers/video/syscopyarea.c20
1 files changed, 10 insertions, 10 deletions
diff --git a/drivers/video/syscopyarea.c b/drivers/video/syscopyarea.c
index 37af10ab8f52..a352d5f46bbf 100644
--- a/drivers/video/syscopyarea.c
+++ b/drivers/video/syscopyarea.c
@@ -26,15 +26,15 @@
26 */ 26 */
27 27
28static void 28static void
29bitcpy(unsigned long *dst, int dst_idx, const unsigned long *src, 29bitcpy(struct fb_info *p, unsigned long *dst, int dst_idx,
30 int src_idx, int bits, unsigned n) 30 const unsigned long *src, int src_idx, int bits, unsigned n)
31{ 31{
32 unsigned long first, last; 32 unsigned long first, last;
33 int const shift = dst_idx-src_idx; 33 int const shift = dst_idx-src_idx;
34 int left, right; 34 int left, right;
35 35
36 first = FB_SHIFT_HIGH(~0UL, dst_idx); 36 first = FB_SHIFT_HIGH(p, ~0UL, dst_idx);
37 last = ~(FB_SHIFT_HIGH(~0UL, (dst_idx+n) % bits)); 37 last = ~(FB_SHIFT_HIGH(p, ~0UL, (dst_idx+n) % bits));
38 38
39 if (!shift) { 39 if (!shift) {
40 /* Same alignment for source and dest */ 40 /* Same alignment for source and dest */
@@ -167,8 +167,8 @@ bitcpy(unsigned long *dst, int dst_idx, const unsigned long *src,
167 */ 167 */
168 168
169static void 169static void
170bitcpy_rev(unsigned long *dst, int dst_idx, const unsigned long *src, 170bitcpy_rev(struct fb_info *p, unsigned long *dst, int dst_idx,
171 int src_idx, int bits, unsigned n) 171 const unsigned long *src, int src_idx, int bits, unsigned n)
172{ 172{
173 unsigned long first, last; 173 unsigned long first, last;
174 int shift; 174 int shift;
@@ -186,8 +186,8 @@ bitcpy_rev(unsigned long *dst, int dst_idx, const unsigned long *src,
186 186
187 shift = dst_idx-src_idx; 187 shift = dst_idx-src_idx;
188 188
189 first = FB_SHIFT_LOW(~0UL, bits - 1 - dst_idx); 189 first = FB_SHIFT_LOW(p, ~0UL, bits - 1 - dst_idx);
190 last = ~(FB_SHIFT_LOW(~0UL, bits - 1 - ((dst_idx-n) % bits))); 190 last = ~(FB_SHIFT_LOW(p, ~0UL, bits - 1 - ((dst_idx-n) % bits)));
191 191
192 if (!shift) { 192 if (!shift) {
193 /* Same alignment for source and dest */ 193 /* Same alignment for source and dest */
@@ -353,7 +353,7 @@ void sys_copyarea(struct fb_info *p, const struct fb_copyarea *area)
353 dst_idx &= (bytes - 1); 353 dst_idx &= (bytes - 1);
354 src += src_idx >> (ffs(bits) - 1); 354 src += src_idx >> (ffs(bits) - 1);
355 src_idx &= (bytes - 1); 355 src_idx &= (bytes - 1);
356 bitcpy_rev(dst, dst_idx, src, src_idx, bits, 356 bitcpy_rev(p, dst, dst_idx, src, src_idx, bits,
357 width*p->var.bits_per_pixel); 357 width*p->var.bits_per_pixel);
358 } 358 }
359 } else { 359 } else {
@@ -362,7 +362,7 @@ void sys_copyarea(struct fb_info *p, const struct fb_copyarea *area)
362 dst_idx &= (bytes - 1); 362 dst_idx &= (bytes - 1);
363 src += src_idx >> (ffs(bits) - 1); 363 src += src_idx >> (ffs(bits) - 1);
364 src_idx &= (bytes - 1); 364 src_idx &= (bytes - 1);
365 bitcpy(dst, dst_idx, src, src_idx, bits, 365 bitcpy(p, dst, dst_idx, src, src_idx, bits,
366 width*p->var.bits_per_pixel); 366 width*p->var.bits_per_pixel);
367 dst_idx += bits_per_line; 367 dst_idx += bits_per_line;
368 src_idx += bits_per_line; 368 src_idx += bits_per_line;