X-Git-Url: http://git.onelab.eu/?a=blobdiff_plain;ds=sidebyside;f=drivers%2Fvideo%2Ffbmem.c;h=80d81e398a4ed1ef3da7bddfa15901982c24231a;hb=9213980e6a70d8473e0ffd4b39ab5b6caaba9ff5;hp=5e28466497693037ed8a077dc3561b49fcf0e2e9;hpb=c449269f45c2cdf53af08c8d0af37472f66539d9;p=linux-2.6.git diff --git a/drivers/video/fbmem.c b/drivers/video/fbmem.c index 5e2846649..80d81e398 100644 --- a/drivers/video/fbmem.c +++ b/drivers/video/fbmem.c @@ -114,6 +114,8 @@ extern int valkyriefb_setup(char*); extern int chips_init(void); extern int g364fb_init(void); extern int sa1100fb_init(void); +extern int pxafb_init(void); +extern int pxafb_setup(char*); extern int fm2fb_init(void); extern int fm2fb_setup(char*); extern int q40fb_init(void); @@ -121,6 +123,8 @@ extern int sun3fb_init(void); extern int sun3fb_setup(char *); extern int sgivwfb_init(void); extern int sgivwfb_setup(char*); +extern int gbefb_init(void); +extern int gbefb_setup(char*); extern int rivafb_init(void); extern int rivafb_setup(char*); extern int tdfxfb_init(void); @@ -166,6 +170,8 @@ extern int leo_init(void); extern int leo_setup(char*); extern int kyrofb_init(void); extern int kyrofb_setup(char*); +extern int mc68x328fb_init(void); +extern int mc68x328fb_setup(char *); static struct { const char *name; @@ -307,6 +313,9 @@ static struct { #ifdef CONFIG_FB_SGIVW { "sgivwfb", sgivwfb_init, sgivwfb_setup }, #endif +#ifdef CONFIG_FB_GBE + { "gbefb", gbefb_init, gbefb_setup }, +#endif #ifdef CONFIG_FB_ACORN { "acornfb", acornfb_init, acornfb_setup }, #endif @@ -340,6 +349,9 @@ static struct { #ifdef CONFIG_FB_SA1100 { "sa1100fb", sa1100fb_init, NULL }, #endif +#ifdef CONFIG_FB_PXA + { "pxafb", pxafb_init, pxafb_setup }, +#endif #ifdef CONFIG_FB_SUN3 { "sun3fb", sun3fb_init, sun3fb_setup }, #endif @@ -370,6 +382,9 @@ static struct { #ifdef CONFIG_FB_KYRO { "kyrofb", kyrofb_init, kyrofb_setup }, #endif +#ifdef CONFIG_FB_68328 + { "68328fb", mc68x328fb_init, mc68x328fb_setup }, +#endif /* * Generic drivers that don't use resource management (yet) @@ -411,12 +426,13 @@ static int ofonly __initdata = 0; /* * Drawing helpers. */ -u8 sys_inbuf(struct fb_info *info, u8 *src) -{ +static u8 fb_sys_inbuf(struct fb_info *info, u8 *src) +{ return *src; } -void sys_outbuf(struct fb_info *info, u8 *dst, u8 *src, unsigned int size) +static void fb_sys_outbuf(struct fb_info *info, u8 *dst, + u8 *src, unsigned int size) { memcpy(dst, src, size); } @@ -1013,7 +1029,7 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, struct fb_con2fbmap con2fb; #endif struct fb_cmap cmap; - int i, rc; + int i; if (!fb) return -ENODEV; @@ -1055,9 +1071,9 @@ fb_ioctl(struct inode *inode, struct file *file, unsigned int cmd, return 0; case FBIO_CURSOR: acquire_console_sem(); - rc = fb_cursor(info, (struct fb_cursor *) arg); + i = fb_cursor(info, (struct fb_cursor *) arg); release_console_sem(); - return rc; + return i; #ifdef CONFIG_FRAMEBUFFER_CONSOLE case FBIOGET_CON2FBMAP: if (copy_from_user(&con2fb, (void *)arg, sizeof(con2fb))) @@ -1178,8 +1194,7 @@ fb_mmap(struct file *file, struct vm_area_struct * vma) if (boot_cpu_data.x86 > 3) pgprot_val(vma->vm_page_prot) |= _PAGE_PCD; #elif defined(__mips__) - pgprot_val(vma->vm_page_prot) &= ~_CACHE_MASK; - pgprot_val(vma->vm_page_prot) |= _CACHE_UNCACHED; + vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); #elif defined(__hppa__) pgprot_val(vma->vm_page_prot) |= _PAGE_NO_CACHE; #elif defined(__ia64__) || defined(__arm__) || defined(__sh__) @@ -1286,14 +1301,15 @@ register_framebuffer(struct fb_info *fb_info) fb_info->pixmap.size = FBPIXMAPSIZE; fb_info->pixmap.buf_align = 1; fb_info->pixmap.scan_align = 1; + fb_info->pixmap.access_align = 4; fb_info->pixmap.flags = FB_PIXMAP_DEFAULT; } } fb_info->pixmap.offset = 0; if (fb_info->pixmap.outbuf == NULL) - fb_info->pixmap.outbuf = sys_outbuf; + fb_info->pixmap.outbuf = fb_sys_outbuf; if (fb_info->pixmap.inbuf == NULL) - fb_info->pixmap.inbuf = sys_inbuf; + fb_info->pixmap.inbuf = fb_sys_inbuf; if (fb_info->sprite.addr == NULL) { fb_info->sprite.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL); @@ -1301,14 +1317,15 @@ register_framebuffer(struct fb_info *fb_info) fb_info->sprite.size = FBPIXMAPSIZE; fb_info->sprite.buf_align = 1; fb_info->sprite.scan_align = 1; + fb_info->sprite.access_align = 4; fb_info->sprite.flags = FB_PIXMAP_DEFAULT; } } fb_info->sprite.offset = 0; if (fb_info->sprite.outbuf == NULL) - fb_info->sprite.outbuf = sys_outbuf; + fb_info->sprite.outbuf = fb_sys_outbuf; if (fb_info->sprite.inbuf == NULL) - fb_info->sprite.inbuf = sys_inbuf; + fb_info->sprite.inbuf = fb_sys_inbuf; registered_fb[i] = fb_info;