/* * Generic function for frame buffer with packed pixels of any depth. * * Copyright (C) 1999-2005 James Simmons <[email protected]> * * This file is subject to the terms and conditions of the GNU General Public * License. See the file COPYING in the main directory of this archive for * more details. * * NOTES: * * This is for cfb packed pixels. Iplan and such are incorporated in the * drivers that need them. * * FIXME * * Also need to add code to deal with cards endians that are different than * the native cpu endians. I also need to deal with MSB position in the word. * * The two functions or copying forward and backward could be split up like * the ones for filling, i.e. in aligned and unaligned versions. This would * help moving some redundant computations and branches out of the loop, too. */ #include <linux/module.h> #include <linux/kernel.h> #include <linux/string.h> #include <linux/fb.h> #include <asm/types.h> #include <asm/io.h> #include "fb_draw.h" #if BITS_PER_LONG == 32 #define FB_WRITEL … #define FB_READL … #else #define FB_WRITEL … #define FB_READL … #endif /* * Generic bitwise copy algorithm */ static void bitcpy(struct fb_info *p, unsigned long __iomem *dst, unsigned dst_idx, const unsigned long __iomem *src, unsigned src_idx, int bits, unsigned n, u32 bswapmask) { … } /* * Generic bitwise copy algorithm, operating backward */ static void bitcpy_rev(struct fb_info *p, unsigned long __iomem *dst, unsigned dst_idx, const unsigned long __iomem *src, unsigned src_idx, int bits, unsigned n, u32 bswapmask) { … } void cfb_copyarea(struct fb_info *p, const struct fb_copyarea *area) { … } EXPORT_SYMBOL(…); MODULE_AUTHOR(…) …; MODULE_DESCRIPTION(…) …; MODULE_LICENSE(…) …;