From: <aot...@us...> - 2004-03-14 23:54:47
|
Update of /cvsroot/gc-linux/linux/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19469/drivers/video Modified Files: Kconfig Makefile fbmem.c Log Message: Merged 2.6.4 Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/Kconfig,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Kconfig 18 Feb 2004 20:01:58 -0000 1.3 +++ Kconfig 14 Mar 2004 23:45:45 -0000 1.4 @@ -55,7 +55,7 @@ config FB_PM2 tristate "Permedia2 support" - depends on FB && (AMIGA || PCI) && BROKEN + depends on FB && (AMIGA || PCI) help This is the frame buffer device driver for the Permedia2 AGP frame buffer card from ASK, aka `Graphic Blaster Exxtreme'. There is a @@ -66,21 +66,7 @@ bool "enable FIFO disconnect feature" depends on FB_PM2 && PCI help - Support the Permedia2 FIFOI disconnect feature (see CONFIG_FB_PM2). - -config FB_PM2_PCI - bool "generic Permedia2 PCI board support" - depends on FB_PM2 && PCI - help - Say Y to enable support for Permedia2 AGP frame buffer card from - 3Dlabs (aka `Graphic Blaster Exxtreme') on the PCI bus. - -config FB_PM2_CVPPC - bool "Phase5 CVisionPPC/BVisionPPC support" - depends on FB_PM2 && AMIGA - help - Say Y to enable support for the Amiga Phase 5 CVisionPPC BVisionPPC - framebuffer cards. Phase 5 is no longer with us, alas. + Support the Permedia2 FIFO disconnect feature (see CONFIG_FB_PM2). config FB_ACORN bool "Acorn VIDC support" @@ -462,7 +448,6 @@ config FB_MATROX tristate "Matrox acceleration" depends on FB && PCI - select I2C_ALGOBIT if FB_MATROX_I2C ---help--- Say Y here if you have a Matrox Millennium, Matrox Millennium II, Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox @@ -550,6 +535,7 @@ config FB_MATROX_I2C tristate "Matrox I2C support" depends on FB_MATROX && I2C + select I2C_ALGOBIT ---help--- This drivers creates I2C buses which are needed for accessing the DDC (I2C) bus present on all Matroxes, an I2C bus which @@ -628,6 +614,7 @@ tristate "ATI Radeon display support" depends on FB && PCI select I2C_ALGOBIT if FB_RADEON_I2C + select I2C if FB_RADEON_I2C help Choose this option if you want to use an ATI Radeon graphics card as a framebuffer device. There are both PCI and AGP versions. You @@ -645,7 +632,7 @@ config FB_RADEON_I2C bool "DDC/I2C for ATI Radeon support" - depends on FB_RADEON && I2C + depends on FB_RADEON default y help Say Y here if you want DDC/I2C support for your Radeon board. Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/Makefile,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- Makefile 18 Feb 2004 20:01:58 -0000 1.3 +++ Makefile 14 Mar 2004 23:45:45 -0000 1.4 @@ -15,7 +15,7 @@ obj-$(CONFIG_FB_ACORN) += acornfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_AMIGA) += amifb.o c2p.o -obj-$(CONFIG_FB_PM2) += pm2fb.o +obj-$(CONFIG_FB_PM2) += pm2fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_PM3) += pm3fb.o obj-$(CONFIG_FB_APOLLO) += dnfb.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_Q40) += q40fb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o Index: fbmem.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/fbmem.c,v retrieving revision 1.3 retrieving revision 1.4 diff -u -d -r1.3 -r1.4 --- fbmem.c 18 Feb 2004 20:01:58 -0000 1.3 +++ fbmem.c 14 Mar 2004 23:45:45 -0000 1.4 @@ -398,7 +398,7 @@ }; #define NUM_FB_DRIVERS (sizeof(fb_drivers)/sizeof(*fb_drivers)) -#define FBPIXMAPSIZE 8192 +#define FBPIXMAPSIZE 16384 extern const char *global_mode_option; @@ -415,52 +415,54 @@ /* * Drawing helpers. */ -u8 sys_inbuf(u8 *src) +u8 sys_inbuf(struct fb_info *info, u8 *src) { return *src; } -void sys_outbuf(u8 *src, u8 *dst, unsigned int size) +void sys_outbuf(struct fb_info *info, u8 *dst, u8 *src, unsigned int size) { memcpy(dst, src, size); } -void move_buf_aligned(struct fb_info *info, u8 *dst, u8 *src, u32 d_pitch, - u32 s_pitch, u32 height) +void fb_move_buf_aligned(struct fb_info *info, struct fb_pixmap *buf, + u8 *dst, u32 d_pitch, u8 *src, u32 s_pitch, + u32 height) { int i; for (i = height; i--; ) { - info->pixmap.outbuf(src, dst, s_pitch); + buf->outbuf(info, dst, src, s_pitch); src += s_pitch; dst += d_pitch; } } -void move_buf_unaligned(struct fb_info *info, u8 *dst, u8 *src, u32 d_pitch, - u32 height, u32 mask, u32 shift_high, u32 shift_low, - u32 mod, u32 idx) +void fb_move_buf_unaligned(struct fb_info *info, struct fb_pixmap *buf, + u8 *dst, u32 d_pitch, u8 *src, u32 idx, + u32 height, u32 shift_high, u32 shift_low, + u32 mod) { + u8 mask = (u8) (0xfff << shift_high), tmp; int i, j; - u8 tmp; for (i = height; i--; ) { for (j = 0; j < idx; j++) { - tmp = info->pixmap.inbuf(dst+j); + tmp = buf->inbuf(info, dst+j); tmp &= mask; tmp |= *src >> shift_low; - info->pixmap.outbuf(&tmp, dst+j, 1); + buf->outbuf(info, dst+j, &tmp, 1); tmp = *src << shift_high; - info->pixmap.outbuf(&tmp, dst+j+1, 1); + buf->outbuf(info, dst+j+1, &tmp, 1); src++; } - tmp = info->pixmap.inbuf(dst+idx); + tmp = buf->inbuf(info, dst+idx); tmp &= mask; tmp |= *src >> shift_low; - info->pixmap.outbuf(&tmp, dst+idx, 1); + buf->outbuf(info, dst+idx, &tmp, 1); if (shift_high < mod) { tmp = *src << shift_high; - info->pixmap.outbuf(&tmp, dst+idx+1, 1); + buf->outbuf(info, dst+idx+1, &tmp, 1); } src++; dst += d_pitch; @@ -471,10 +473,10 @@ * we need to lock this section since fb_cursor * may use fb_imageblit() */ -u32 fb_get_buffer_offset(struct fb_info *info, u32 size) +char* fb_get_buffer_offset(struct fb_info *info, struct fb_pixmap *buf, u32 size) { - struct fb_pixmap *buf = &info->pixmap; u32 align = buf->buf_align - 1, offset; + char *addr = buf->addr; /* If IO mapped, we need to sync before access, no sharing of * the pixmap is done @@ -482,7 +484,7 @@ if (buf->flags & FB_PIXMAP_IO) { if (info->fbops->fb_sync && (buf->flags & FB_PIXMAP_SYNC)) info->fbops->fb_sync(info); - return 0; + return addr; } /* See if we fit in the remaining pixmap space */ @@ -498,8 +500,9 @@ offset = 0; } buf->offset = offset + size; + addr += offset; - return offset; + return addr; } #ifdef CONFIG_LOGO @@ -872,6 +875,15 @@ } #endif /* CONFIG_KMOD */ +void +fb_load_cursor_image(struct fb_info *info) +{ + unsigned int width = (info->cursor.image.width + 7) >> 3; + u8 *data = (u8 *) info->cursor.image.data; + + info->sprite.outbuf(info, info->sprite.addr, data, width); +} + int fb_cursor(struct fb_info *info, struct fb_cursor *sprite) { @@ -946,7 +958,8 @@ { int err; - if (memcmp(&info->var, var, sizeof(struct fb_var_screeninfo))) { + if ((var->activate & FB_ACTIVATE_FORCE) || + memcmp(&info->var, var, sizeof(struct fb_var_screeninfo))) { if (!info->fbops->fb_check_var) { *var = info->var; return 0; @@ -1279,6 +1292,21 @@ if (fb_info->pixmap.inbuf == NULL) fb_info->pixmap.inbuf = sys_inbuf; + if (fb_info->sprite.addr == NULL) { + fb_info->sprite.addr = kmalloc(FBPIXMAPSIZE, GFP_KERNEL); + if (fb_info->sprite.addr) { + fb_info->sprite.size = FBPIXMAPSIZE; + fb_info->sprite.buf_align = 1; + fb_info->sprite.scan_align = 1; + fb_info->sprite.flags = FB_PIXMAP_DEFAULT; + } + } + fb_info->sprite.offset = 0; + if (fb_info->sprite.outbuf == NULL) + fb_info->sprite.outbuf = sys_outbuf; + if (fb_info->sprite.inbuf == NULL) + fb_info->sprite.inbuf = sys_inbuf; + registered_fb[i] = fb_info; devfs_mk_cdev(MKDEV(FB_MAJOR, i), @@ -1307,8 +1335,10 @@ return -EINVAL; devfs_remove("fb/%d", i); - if (fb_info->pixmap.addr) + if (fb_info->pixmap.addr && (fb_info->pixmap.flags & FB_PIXMAP_DEFAULT)) kfree(fb_info->pixmap.addr); + if (fb_info->sprite.addr && (fb_info->sprite.flags & FB_PIXMAP_DEFAULT)) + kfree(fb_info->sprite.addr); registered_fb[i]=NULL; num_registered_fb--; return 0; @@ -1463,8 +1493,9 @@ EXPORT_SYMBOL(fb_blank); EXPORT_SYMBOL(fb_pan_display); EXPORT_SYMBOL(fb_get_buffer_offset); -EXPORT_SYMBOL(move_buf_unaligned); -EXPORT_SYMBOL(move_buf_aligned); +EXPORT_SYMBOL(fb_move_buf_unaligned); +EXPORT_SYMBOL(fb_move_buf_aligned); +EXPORT_SYMBOL(fb_load_cursor_image); EXPORT_SYMBOL(fb_set_suspend); EXPORT_SYMBOL(fb_register_client); EXPORT_SYMBOL(fb_unregister_client); |