From: Kenn H. <ke...@us...> - 2005-03-21 23:45:08
|
Update of /cvsroot/linux-vax/kernel-2.5/drivers/video In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24924/drivers/video Modified Files: Kconfig Makefile fbmem.c Log Message: Merge with 2.6.10 Index: fbmem.c =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/video/fbmem.c,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- fbmem.c 17 Nov 2004 00:23:31 -0000 1.9 +++ fbmem.c 21 Mar 2005 23:44:11 -0000 1.10 @@ -51,7 +51,7 @@ * Frame buffer device initialization and setup routines */ -#define FBPIXMAPSIZE 16384 +#define FBPIXMAPSIZE (1024 * 8) static struct notifier_block *fb_notifier_list; struct fb_info *registered_fb[FB_MAX]; @@ -368,6 +368,9 @@ memset(&fb_logo, 0, sizeof(struct logo_data)); + if (info->flags & FBINFO_MISC_TILEBLITTING) + return 0; + if (info->fix.visual == FB_VISUAL_DIRECTCOLOR) { depth = info->var.blue.length; if (info->var.red.length < depth) @@ -505,7 +508,8 @@ struct inode *inode = file->f_dentry->d_inode; int fbidx = iminor(inode); struct fb_info *info = registered_fb[fbidx]; - u32 *buffer, *dst, *src; + u32 *buffer, *dst; + u32 __iomem *src; int c, i, cnt = 0, err = 0; unsigned long total_size; @@ -535,7 +539,7 @@ if (!buffer) return -ENOMEM; - src = (u32 *) (info->screen_base + p); + src = (u32 __iomem *) (info->screen_base + p); if (info->fbops->fb_sync) info->fbops->fb_sync(info); @@ -547,12 +551,12 @@ *dst++ = fb_readl(src++); if (c & 3) { u8 *dst8 = (u8 *) dst; - u8 *src8 = (u8 *) src; + u8 __iomem *src8 = (u8 __iomem *) src; for (i = c & 3; i--;) *dst8++ = fb_readb(src8++); - src = (u32 *) src8; + src = (u32 __iomem *) src8; } if (copy_to_user(buf, buffer, c)) { @@ -576,7 +580,8 @@ struct inode *inode = file->f_dentry->d_inode; int fbidx = iminor(inode); struct fb_info *info = registered_fb[fbidx]; - u32 *buffer, *dst, *src; + u32 *buffer, *src; + u32 __iomem *dst; int c, i, cnt = 0, err; unsigned long total_size; @@ -608,7 +613,7 @@ if (!buffer) return -ENOMEM; - dst = (u32 *) (info->screen_base + p); + dst = (u32 __iomem *) (info->screen_base + p); if (info->fbops->fb_sync) info->fbops->fb_sync(info); @@ -624,12 +629,12 @@ fb_writel(*src++, dst++); if (c & 3) { u8 *src8 = (u8 *) src; - u8 *dst8 = (u8 *) dst; + u8 __iomem *dst8 = (u8 __iomem *) dst; for (i = c & 3; i--; ) fb_writeb(*src8++, dst8++); - dst = (u32 *) dst8; + dst = (u32 __iomem *) dst8; } *ppos += c; buf += c; @@ -648,114 +653,6 @@ } #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; - - if (info->sprite.outbuf) - info->sprite.outbuf(info, info->sprite.addr, data, width); - else - memcpy(info->sprite.addr, data, width); -} - -int -fb_cursor(struct fb_info *info, struct fb_cursor_user __user *sprite) -{ - struct fb_cursor_user cursor_user; - struct fb_cursor cursor; - char *data = NULL, *mask = NULL, *info_mask = NULL; - u16 *red = NULL, *green = NULL, *blue = NULL, *transp = NULL; - int err = -EINVAL; - - if (copy_from_user(&cursor_user, sprite, sizeof(struct fb_cursor_user))) - return -EFAULT; - - memcpy(&cursor, &cursor_user, sizeof(cursor_user)); - cursor.mask = info->cursor.mask; - cursor.image.data = info->cursor.image.data; - cursor.image.cmap.red = info->cursor.image.cmap.red; - cursor.image.cmap.green = info->cursor.image.cmap.green; - cursor.image.cmap.blue = info->cursor.image.cmap.blue; - cursor.image.cmap.transp = info->cursor.image.cmap.transp; - cursor.data = NULL; - - if (cursor.set & FB_CUR_SETCUR) - info->cursor.enable = 1; - - if (cursor.set & FB_CUR_SETCMAP) { - unsigned len = cursor.image.cmap.len; - if ((int)len <= 0) - goto out; - len *= 2; - err = -ENOMEM; - red = kmalloc(len, GFP_USER); - green = kmalloc(len, GFP_USER); - blue = kmalloc(len, GFP_USER); - if (!red || !green || !blue) - goto out; - if (cursor_user.image.cmap.transp) { - transp = kmalloc(len, GFP_USER); - if (!transp) - goto out; - } - err = -EFAULT; - if (copy_from_user(red, cursor_user.image.cmap.red, len)) - goto out; - if (copy_from_user(green, cursor_user.image.cmap.green, len)) - goto out; - if (copy_from_user(blue, cursor_user.image.cmap.blue, len)) - goto out; - if (transp) { - if (copy_from_user(transp, - cursor_user.image.cmap.transp, len)) - goto out; - } - cursor.image.cmap.red = red; - cursor.image.cmap.green = green; - cursor.image.cmap.blue = blue; - cursor.image.cmap.transp = transp; - } - - if (cursor.set & FB_CUR_SETSHAPE) { - int size = ((cursor.image.width + 7) >> 3) * cursor.image.height; - - if ((cursor.image.height != info->cursor.image.height) || - (cursor.image.width != info->cursor.image.width)) - cursor.set |= FB_CUR_SETSIZE; - - err = -ENOMEM; - data = kmalloc(size, GFP_USER); - mask = kmalloc(size, GFP_USER); - if (!mask || !data) - goto out; - - err = -EFAULT; - if (copy_from_user(data, cursor_user.image.data, size) || - copy_from_user(mask, cursor_user.mask, size)) - goto out; - - cursor.image.data = data; - cursor.mask = mask; - info_mask = (char *) info->cursor.mask; - info->cursor.mask = mask; - } - info->cursor.set = cursor.set; - info->cursor.rop = cursor.rop; - err = info->fbops->fb_cursor(info, &cursor); -out: - kfree(data); - kfree(mask); - kfree(red); - kfree(green); - kfree(blue); - kfree(transp); - if (info_mask) - info->cursor.mask = info_mask; - return err; -} - int fb_pan_display(struct fb_info *info, struct fb_var_screeninfo *var) { @@ -829,7 +726,10 @@ fb_set_cmap(&info->cmap, info); fb_var_to_videomode(&mode, &info->var); - fb_add_videomode(&mode, &info->modelist); + + if (info->modelist.prev && info->modelist.next && + !list_empty(&info->modelist)) + fb_add_videomode(&mode, &info->modelist); if (info->flags & FBINFO_MISC_MODECHANGEUSER) { struct fb_event event; @@ -847,21 +747,15 @@ int fb_blank(struct fb_info *info, int blank) { - /* ??? Variable sized stack allocation. */ - u16 black[info->cmap.len]; - struct fb_cmap cmap; + int err = -EINVAL; - if (info->fbops->fb_blank && !info->fbops->fb_blank(blank, info)) - return 0; - if (blank) { - memset(black, 0, info->cmap.len * sizeof(u16)); - cmap.red = cmap.green = cmap.blue = black; - cmap.transp = info->cmap.transp ? black : NULL; - cmap.start = info->cmap.start; - cmap.len = info->cmap.len; - } else - cmap = info->cmap; - return fb_set_cmap(&cmap, info); + if (blank > FB_BLANK_POWERDOWN) + blank = FB_BLANK_POWERDOWN; + + if (info->fbops->fb_blank) + err = info->fbops->fb_blank(blank, info); + + return err; } static int @@ -920,10 +814,7 @@ return -EFAULT; return 0; case FBIO_CURSOR: - acquire_console_sem(); - i = fb_cursor(info, argp); - release_console_sem(); - return i; + return -EINVAL; case FBIOGET_CON2FBMAP: if (copy_from_user(&con2fb, argp, sizeof(con2fb))) return -EFAULT; @@ -949,14 +840,11 @@ #endif /* CONFIG_KMOD */ if (!registered_fb[con2fb.framebuffer]) return -EINVAL; - if (con2fb.console > 0 && con2fb.console < MAX_NR_CONSOLES) { - event.info = info; - event.data = &con2fb; - return notifier_call_chain(&fb_notifier_list, - FB_EVENT_SET_CONSOLE_MAP, - &event); - } - return -EINVAL; + event.info = info; + event.data = &con2fb; + return notifier_call_chain(&fb_notifier_list, + FB_EVENT_SET_CONSOLE_MAP, + &event); case FBIOBLANK: acquire_console_sem(); i = fb_blank(info, arg); @@ -1022,9 +910,8 @@ off += start; vma->vm_pgoff = off >> PAGE_SHIFT; /* This is an IO map - tell maydump to skip this VMA */ - vma->vm_flags |= VM_IO; + vma->vm_flags |= VM_IO | VM_RESERVED; #if defined(__sparc_v9__) - vma->vm_flags |= (VM_SHM | VM_LOCKED); if (io_remap_page_range(vma, vma->vm_start, off, vma->vm_end - vma->vm_start, vma->vm_page_prot, 0)) return -EAGAIN; @@ -1145,7 +1032,8 @@ break; fb_info->node = i; - c = class_simple_device_add(fb_class, MKDEV(FB_MAJOR, i), NULL, "fb%d", i); + c = class_simple_device_add(fb_class, MKDEV(FB_MAJOR, i), + fb_info->device, "fb%d", i); if (IS_ERR(c)) { /* Not fatal */ printk(KERN_WARNING "Unable to create class_device for framebuffer %d; errno = %ld\n", i, PTR_ERR(c)); @@ -1163,18 +1051,6 @@ } fb_info->pixmap.offset = 0; - 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.access_align = 4; - fb_info->sprite.flags = FB_PIXMAP_DEFAULT; - } - } - fb_info->sprite.offset = 0; - if (!fb_info->modelist.prev || !fb_info->modelist.next || list_empty(&fb_info->modelist)) { @@ -1218,8 +1094,6 @@ 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); fb_destroy_modelist(&fb_info->modelist); registered_fb[i]=NULL; num_registered_fb--; @@ -1295,8 +1169,7 @@ } module_init(fbmem_init); -#define NR_FB_DRIVERS 64 -static char *video_options[NR_FB_DRIVERS]; +static char *video_options[FB_MAX]; static int ofonly; /** @@ -1317,7 +1190,7 @@ retval = 1; if (name_len && !retval) { - for (i = 0; i < NR_FB_DRIVERS; i++) { + for (i = 0; i < FB_MAX; i++) { if (video_options[i] == NULL) continue; opt_len = strlen(video_options[i]); @@ -1359,7 +1232,7 @@ if (!options || !*options) return 0; - for (i = 0; i < NR_FB_DRIVERS; i++) { + for (i = 0; i < FB_MAX; i++) { if (!strncmp(options, "ofonly", 6)) ofonly = 1; if (video_options[i] == NULL) { @@ -1390,7 +1263,6 @@ EXPORT_SYMBOL(fb_iomove_buf_aligned); EXPORT_SYMBOL(fb_sysmove_buf_unaligned); EXPORT_SYMBOL(fb_sysmove_buf_aligned); -EXPORT_SYMBOL(fb_load_cursor_image); EXPORT_SYMBOL(fb_set_suspend); EXPORT_SYMBOL(fb_register_client); EXPORT_SYMBOL(fb_unregister_client); Index: Makefile =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/video/Makefile,v retrieving revision 1.9 retrieving revision 1.10 diff -u -d -r1.9 -r1.10 --- Makefile 17 Nov 2004 00:23:31 -0000 1.9 +++ Makefile 21 Mar 2005 23:44:10 -0000 1.10 @@ -23,15 +23,20 @@ obj-$(CONFIG_FB_PM3) += pm3fb.o obj-$(CONFIG_FB_MATROX) += matrox/ cfbfillrect.o cfbcopyarea.o cfbimgblt.o -obj-$(CONFIG_FB_RIVA) += riva/ cfbimgblt.o vgastate.o +obj-$(CONFIG_FB_RIVA) += riva/ cfbimgblt.o cfbfillrect.o \ + cfbcopyarea.o vgastate.o obj-$(CONFIG_FB_ATY) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_ATY128) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_RADEON) += aty/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_SIS) += sis/ cfbcopyarea.o cfbfillrect.o cfbimgblt.o obj-$(CONFIG_FB_KYRO) += kyro/ cfbfillrect.o cfbcopyarea.o cfbimgblt.o - +obj-$(CONFIG_FB_SAVAGE) += savage/ cfbfillrect.o cfbcopyarea.o \ + cfbimgblt.o obj-$(CONFIG_FB_I810) += cfbcopyarea.o cfbfillrect.o cfbimgblt.o \ vgastate.o +obj-$(CONFIG_FB_INTEL) += cfbfillrect.o cfbcopyarea.o \ + cfbimgblt.o + obj-$(CONFIG_FB_RADEON_OLD) += radeonfb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o obj-$(CONFIG_FB_NEOMAGIC) += neofb.o cfbfillrect.o cfbcopyarea.o cfbimgblt.o vgastate.o obj-$(CONFIG_FB_VIRGE) += virgefb.o Index: Kconfig =================================================================== RCS file: /cvsroot/linux-vax/kernel-2.5/drivers/video/Kconfig,v retrieving revision 1.12 retrieving revision 1.13 diff -u -d -r1.12 -r1.13 --- Kconfig 17 Nov 2004 00:23:31 -0000 1.12 +++ Kconfig 21 Mar 2005 23:44:09 -0000 1.13 @@ -41,7 +41,7 @@ config FB_MODE_HELPERS bool "Enable Video Mode Handling Helpers" depends on FB - default y + default n ---help--- This enables functions for handling video modes using the Generalized Timing Formula and the EDID parser. A few drivers rely @@ -49,6 +49,24 @@ your driver does not take advantage of this feature, choosing Y will just increase the kernel size by about 5K. +config FB_TILEBLITTING + bool "Enable Tile Blitting Support" + depends on FB + default n + ---help--- + This enables tile blitting. Tile blitting is a drawing technique + where the screen is divided into rectangular sections (tiles), whereas + the standard blitting divides the screen into pixels. Because the + default drawing element is a tile, drawing functions will be passed + parameters in terms of number of tiles instead of number of pixels. + For example, to draw a single character, instead of using bitmaps, + an index to an array of bitmaps will be used. To clear or move a + rectangular section of a screen, the rectangle will be described in + terms of number of tiles in the x- and y-axis. + + This is particularly important to one driver, matroxfb. If + unsure, say N. + config FB_CIRRUS tristate "Cirrus Logic support" depends on FB && (ZORRO || PCI) @@ -506,6 +524,27 @@ If unsure, say N. +config FB_INTEL + tristate "Intel 830M/845G/852GM/855GM/865G support (EXPERIMENTAL)" + depends on FB && EXPERIMENTAL && PCI && X86 && !X86_64 + select AGP + select AGP_INTEL + help + This driver supports the on-board graphics built in to the Intel + 830M/845G/852GM/855GM/865G chipsets. + Say Y if you have and plan to use such a board. + + To compile this driver as a module, choose M here: the + module will be called intelfb. + +config FB_INTEL_DEBUG + bool "Intel driver Debug Messages" + depends on FB_INTEL + ---help--- + Say Y here if you want the Intel driver to output all sorts + of debugging informations to provide to the maintainer when + something goes wrong. + config FB_MATROX tristate "Matrox acceleration" depends on FB && PCI @@ -739,6 +778,19 @@ framebuffer device. The ATI product support page for these boards is at <http://support.ati.com/products/pc/mach64/>. +config FB_ATY_GENERIC_LCD + bool "Mach64 generic LCD support (EXPERIMENTAL)" + depends on FB_ATY_CT + help + Say Y if you have a laptop with an ATI Rage LT PRO, Rage Mobility, + Rage XC, or Rage XL chipset. + +config FB_ATY_XL_INIT + bool "Rage XL No-BIOS Init support" + depends on FB_ATY_CT + help + Say Y here to support booting a Rage XL without BIOS support. + config FB_ATY_GX bool "Mach64 GX support" if PCI depends on FB_ATY @@ -750,11 +802,41 @@ is at <http://support.ati.com/products/pc/mach64/graphics_xpression.html>. -config FB_ATY_XL_INIT - bool " Rage XL No-BIOS Init support" if FB_ATY_CT - depends on FB_ATY +config FB_SAVAGE + tristate "S3 Savage support" + depends on FB && PCI && EXPERIMENTAL + select I2C_ALGOBIT if FB_SAVAGE_I2C + select I2C if FB_SAVAGE_I2C + select FB_MODE_HELPERS help - Say Y here to support booting a Rage XL without BIOS support. + This driver supports notebooks and computers with S3 Savage PCI/AGP + chips. + + Say Y if you have such a graphics card. + + To compile this driver as a module, choose M here; the module + will be called savagefb. + +config FB_SAVAGE_I2C + tristate "Enable DDC2 Support" + depends on FB_SAVAGE + help + This enables I2C support for S3 Savage Chipsets. This is used + only for getting EDID information from the attached display + allowing for robust video mode handling and switching. + + Because fbdev-2.6 requires that drivers must be able to + independently validate video mode parameters, you should say Y + here. + +config FB_SAVAGE_ACCEL + tristate "Enable Console Acceleration" + depends on FB_SAVAGE + default n + help + This option will compile in console acceleration support. If + the resulting framebuffer console has bothersome glitches, then + choose N here. config FB_SIS tristate "SiS acceleration" |