From: Albert H. <he...@us...> - 2009-02-01 18:30:02
|
Update of /cvsroot/gc-linux/linux/drivers/video In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv17186/drivers/video Modified Files: Kconfig Makefile gcnfb.c Log Message: Merge 2.6.28. Also: - run checkpatch against the non-broken source code - add GPIO driver fixes - implement getgeo for the special block drivers - small fixes Index: gcnfb.c =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/gcnfb.c,v retrieving revision 1.21 retrieving revision 1.22 diff -u -d -r1.21 -r1.22 --- gcnfb.c 25 Nov 2008 19:09:31 -0000 1.21 +++ gcnfb.c 1 Feb 2009 18:29:35 -0000 1.22 @@ -2,10 +2,10 @@ * drivers/video/gcn-vifb.c * * Nintendo GameCube/Wii Video Interface (VI) frame buffer driver - * Copyright (C) 2004-2008 The GameCube Linux Team + * Copyright (C) 2004-2009 The GameCube Linux Team * Copyright (C) 2004 Michael Steil <mi...@c6...> * Copyright (C) 2004,2005 Todd Jeffreys <to...@vo...> - * Copyright (C) 2006,2007,2008 Albert Herranz + * Copyright (C) 2006,2007,2008,2009 Albert Herranz * * Based on vesafb (c) 1998 Gerd Knorr <kr...@go...> * @@ -25,24 +25,21 @@ #include <linux/mm.h> #include <linux/module.h> #include <linux/of_platform.h> -//#include <linux/slab.h> #include <linux/string.h> #include <linux/tty.h> #include <linux/wait.h> -#include <asm/io.h> - -#include "gcngx.h" +#include <linux/io.h> #define DRV_MODULE_NAME "gcn-vifb" #define DRV_DESCRIPTION "Nintendo GameCube/Wii Video Interface (VI) driver" #define DRV_AUTHOR "Michael Steil <mi...@c6...>, " \ - "Todd Jeffreys <to...@vo...>, " \ + "Todd Jeffreys <to...@vo...>, " \ "Albert Herranz" static char vifb_driver_version[] = "1.0i"; #define drv_printk(level, format, arg...) \ - printk(level DRV_MODULE_NAME ": " format , ## arg) + printk(level DRV_MODULE_NAME ": " format , ## arg) /* @@ -206,7 +203,7 @@ /* * setup parameters */ -static struct vi_video_mode *vi_current_video_mode = NULL; +static struct vi_video_mode *vi_current_video_mode; static int ypan = 1; /* 0..nothing, 1..ypan */ /* FIXME: is this really needed? */ @@ -241,17 +238,17 @@ #define RGB2YUV_LUMA 16 #define RGB2YUV_CHROMA 128 -#define Yr ((int)( 0.299*(1<<RGB2YUV_SHIFT))) -#define Yg ((int)( 0.587*(1<<RGB2YUV_SHIFT))) -#define Yb ((int)( 0.114*(1<<RGB2YUV_SHIFT))) +#define Yr ((int)(0.299 * (1<<RGB2YUV_SHIFT))) +#define Yg ((int)(0.587 * (1<<RGB2YUV_SHIFT))) +#define Yb ((int)(0.114 * (1<<RGB2YUV_SHIFT))) -#define Ur ((int)(-0.169*(1<<RGB2YUV_SHIFT))) -#define Ug ((int)(-0.331*(1<<RGB2YUV_SHIFT))) -#define Ub ((int)( 0.500*(1<<RGB2YUV_SHIFT))) +#define Ur ((int)(-0.169 * (1<<RGB2YUV_SHIFT))) +#define Ug ((int)(-0.331 * (1<<RGB2YUV_SHIFT))) +#define Ub ((int)(0.500 * (1<<RGB2YUV_SHIFT))) -#define Vr ((int)( 0.500*(1<<RGB2YUV_SHIFT))) /* same as Ub */ -#define Vg ((int)(-0.419*(1<<RGB2YUV_SHIFT))) -#define Vb ((int)(-0.081*(1<<RGB2YUV_SHIFT))) +#define Vr ((int)(0.500 * (1<<RGB2YUV_SHIFT))) /* same as Ub */ +#define Vg ((int)(-0.419 * (1<<RGB2YUV_SHIFT))) +#define Vb ((int)(-0.081 * (1<<RGB2YUV_SHIFT))) /* * Converts two 16bpp rgb pixels into a dual yuy2 pixel. @@ -264,9 +261,8 @@ register int r, g, b; /* fast path, thanks to bohdy */ - if (!(rgb1 | rgb2)) { + if (!(rgb1 | rgb2)) return 0x00800080; /* black, black */ - } /* RGB565 */ r1 = ((rgb1 >> 11) & 0x1f); @@ -394,9 +390,8 @@ out_be32(io_base + VI_TFBL, 0x10000000 | (addr >> 5)); /* set bottom field */ - if (!vi_is_mode_progressive(info->var.vmode)) { + if (!vi_is_mode_progressive(info->var.vmode)) addr += info->fix.line_length; - } out_be32(io_base + VI_BFBL, 0x10000000 | (addr >> 5)); } @@ -514,7 +509,7 @@ */ unsigned int vifb_writel(unsigned int rgbrgb, void *address) { - uint16_t *rgb = (uint16_t *) & rgbrgb; + uint16_t *rgb = (uint16_t *)&rgbrgb; return fb_writel_real(rgbrgb16toycbycr(rgb[0], rgb[1]), address); } @@ -628,7 +623,7 @@ switch (cmd) { case FBIOWAITRETRACE: interruptible_sleep_on(&ctl->vtrace_waitq); - return (signal_pending(current) ? -EINTR : 0); + return signal_pending(current) ? -EINTR : 0; case FBIOFLIPHACK: /* * If arg == NULL then @@ -667,8 +662,8 @@ ctl->flip_pending = 1; spin_unlock_irqrestore(&ctl->lock, flags); interruptible_sleep_on(&ctl->vtrace_waitq); - return (signal_pending(current) ? - -EINTR : ctl->visible_page); + return signal_pending(current) ? + -EINTR : ctl->visible_page; } } spin_unlock_irqrestore(&ctl->lock, flags); @@ -707,7 +702,8 @@ /* XXX isobel, do not break old sdl */ var->yres_virtual > 2 * vi_current_video_mode->height || var->yres > vi_current_video_mode->height || - (vi_is_mode_progressive(var->vmode) && !vi_can_do_progressive(ctl))) { /* trying to set progressive? */ + (vi_is_mode_progressive(var->vmode) && + !vi_can_do_progressive(ctl))) { /* trying to set progressive? */ return -EINVAL; } return 0; @@ -715,32 +711,32 @@ static int vifb_mmap(struct fb_info *info, struct vm_area_struct *vma) { - unsigned long off; - unsigned long start; - u32 len; + unsigned long off; + unsigned long start; + u32 len; off = vma->vm_pgoff << PAGE_SHIFT; - /* frame buffer memory */ - start = info->fix.smem_start; - len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.smem_len); - start &= PAGE_MASK; - if ((vma->vm_end - vma->vm_start + off) > len) - return -EINVAL; - off += start; - vma->vm_pgoff = off >> PAGE_SHIFT; + /* frame buffer memory */ + start = info->fix.smem_start; + len = PAGE_ALIGN((start & ~PAGE_MASK) + info->fix.smem_len); + start &= PAGE_MASK; + if ((vma->vm_end - vma->vm_start + off) > len) + return -EINVAL; + off += start; + vma->vm_pgoff = off >> PAGE_SHIFT; - /* this is an IO map, tell maydump to skip this VMA */ - vma->vm_flags |= VM_IO | VM_RESERVED; + /* this is an IO map, tell maydump to skip this VMA */ + vma->vm_flags |= VM_IO | VM_RESERVED; /* we share RAM between the cpu and the video hardware */ vma->vm_page_prot = pgprot_noncached(vma->vm_page_prot); - if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, - vma->vm_end - vma->vm_start, - vma->vm_page_prot)) - return -EAGAIN; - return 0; + if (io_remap_pfn_range(vma, vma->vm_start, off >> PAGE_SHIFT, + vma->vm_end - vma->vm_start, + vma->vm_page_prot)) + return -EAGAIN; + return 0; } @@ -1046,11 +1042,11 @@ MODULE_DEVICE_TABLE(of, vifb_of_match); static struct of_platform_driver vifb_of_driver = { - .owner = THIS_MODULE, - .name = DRV_MODULE_NAME, - .match_table = vifb_of_match, - .probe = vifb_of_probe, - .remove = vifb_of_remove, + .owner = THIS_MODULE, + .name = DRV_MODULE_NAME, + .match_table = vifb_of_match, + .probe = vifb_of_probe, + .remove = vifb_of_remove, }; /* @@ -1061,14 +1057,14 @@ static int __init vifb_init_module(void) { #ifndef MODULE - char *option = NULL; + char *option = NULL; - if (fb_get_options(DRV_MODULE_NAME, &option)) { - /* for backwards compatibility */ - if (fb_get_options("gcnfb", &option)) - return -ENODEV; - } - vifb_setup(option); + if (fb_get_options(DRV_MODULE_NAME, &option)) { + /* for backwards compatibility */ + if (fb_get_options("gcnfb", &option)) + return -ENODEV; + } + vifb_setup(option); #endif drv_printk(KERN_INFO, "%s - version %s\n", DRV_DESCRIPTION, Index: Makefile =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/Makefile,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- Makefile 15 Nov 2008 20:10:15 -0000 1.28 +++ Makefile 1 Feb 2009 18:29:35 -0000 1.29 @@ -29,7 +29,6 @@ # Hardware specific drivers go first obj-$(CONFIG_FB_AMIGA) += amifb.o c2p.o -obj-$(CONFIG_FB_AM200EPD) += am200epd.o obj-$(CONFIG_FB_ARC) += arcfb.o obj-$(CONFIG_FB_CLPS711X) += clps711xfb.o obj-$(CONFIG_FB_CYBER2000) += cyber2000fb.o @@ -43,6 +42,7 @@ obj-$(CONFIG_FB_ATY128) += aty/ macmodes.o obj-$(CONFIG_FB_RADEON) += aty/ obj-$(CONFIG_FB_SIS) += sis/ +obj-$(CONFIG_FB_VIA) += via/ obj-$(CONFIG_FB_KYRO) += kyro/ obj-$(CONFIG_FB_SAVAGE) += savage/ obj-$(CONFIG_FB_GEODE) += geode/ @@ -98,6 +98,7 @@ obj-$(CONFIG_FB_ASILIANT) += asiliantfb.o obj-$(CONFIG_FB_PXA) += pxafb.o obj-$(CONFIG_FB_W100) += w100fb.o +obj-$(CONFIG_FB_TMIO) += tmiofb.o obj-$(CONFIG_FB_AU1100) += au1100fb.o obj-$(CONFIG_FB_AU1200) += au1200fb.o obj-$(CONFIG_FB_PMAG_AA) += pmag-aa-fb.o @@ -121,14 +122,13 @@ obj-$(CONFIG_FB_OMAP) += omap/ obj-$(CONFIG_XEN_FBDEV_FRONTEND) += xen-fbfront.o obj-$(CONFIG_FB_CARMINE) += carminefb.o +obj-$(CONFIG_FB_MB862XX) += mb862xx/ obj-$(CONFIG_FB_GAMECUBE) += gcnfb.o obj-$(CONFIG_FB_GAMECUBE_GX) += gcngx.o - # Platform or fallback drivers go here obj-$(CONFIG_FB_UVESA) += uvesafb.o obj-$(CONFIG_FB_VESA) += vesafb.o -obj-$(CONFIG_FB_IMAC) += imacfb.o obj-$(CONFIG_FB_EFI) += efifb.o obj-$(CONFIG_FB_VGA16) += vga16fb.o obj-$(CONFIG_FB_OF) += offb.o Index: Kconfig =================================================================== RCS file: /cvsroot/gc-linux/linux/drivers/video/Kconfig,v retrieving revision 1.30 retrieving revision 1.31 diff -u -d -r1.30 -r1.31 --- Kconfig 15 Nov 2008 20:10:15 -0000 1.30 +++ Kconfig 1 Feb 2009 18:29:35 -0000 1.31 @@ -76,6 +76,14 @@ select I2C default n +config FB_BOOT_VESA_SUPPORT + bool + depends on FB + default n + ---help--- + If true, at least one selected framebuffer driver can take advantage + of VESA video modes set at an early boot stage via the vga= parameter. + config FB_CFB_FILLRECT tristate depends on FB @@ -172,11 +180,6 @@ bool depends on FB -config FB_METRONOME - tristate - depends on FB - depends on FB_DEFERRED_IO - config FB_HECUBA tristate depends on FB @@ -259,16 +262,24 @@ select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT help - This is the frame buffer device driver for the Permedia2 AGP frame - buffer card from ASK, aka `Graphic Blaster Exxtreme'. There is a - product page at - <http://www.ask.com.hk/product/Permedia%202/permedia2.htm>. + This is the frame buffer device driver for cards based on + the 3D Labs Permedia, Permedia 2 and Permedia 2V chips. + The driver was tested on the following cards: + Diamond FireGL 1000 PRO AGP + ELSA Gloria Synergy PCI + Appian Jeronimo PRO (both heads) PCI + 3DLabs Oxygen ACX aka EONtronics Picasso P2 PCI + Techsource Raptor GFX-8P (aka Sun PGX-32) on SPARC + ASK Graphic Blaster Exxtreme AGP + + To compile this driver as a module, choose M here: the + module will be called pm2fb. config FB_PM2_FIFO_DISCONNECT bool "enable FIFO disconnect feature" depends on FB_PM2 && PCI help - Support the Permedia2 FIFO disconnect feature (see CONFIG_FB_PM2). + Support the Permedia2 FIFO disconnect feature. config FB_ARMCLCD tristate "ARM PrimeCell PL110 support" @@ -678,7 +689,7 @@ select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT - select VIDEO_SELECT + select FB_BOOT_VESA_SUPPORT help This is the frame buffer device driver for generic VESA 2.0 compliant graphic cards. The older VESA 1.2 cards are not supported. @@ -687,23 +698,14 @@ config FB_EFI bool "EFI-based Framebuffer Support" - depends on (FB = y) && X86 - select FB_CFB_FILLRECT - select FB_CFB_COPYAREA - select FB_CFB_IMAGEBLIT - help - This is the EFI frame buffer device driver. If the firmware on - your platform is UEFI2.0, select Y to add support for - Graphics Output Protocol for early console messages to appear. - -config FB_IMAC - bool "Intel-based Macintosh Framebuffer Support" depends on (FB = y) && X86 && EFI select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT help - This is the frame buffer device driver for the Intel-based Macintosh + This is the EFI frame buffer device driver. If the firmware on + your platform is EFI 1.10 or UEFI 2.0, select Y to add support for + using the EFI framebuffer as your console. config FB_N411 tristate "N411 Apollo/Hecuba devkit support" @@ -1124,6 +1126,7 @@ select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_BOOT_VESA_SUPPORT help This driver supports the on-board graphics built in to the Intel 830M/845G/852GM/855GM/865G/915G/915GM/945G/945GM/965G/965GM chipsets. @@ -1476,6 +1479,7 @@ select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select FB_BOOT_VESA_SUPPORT help This is the frame buffer device driver for the SiS 300, 315, 330 and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets. @@ -1498,6 +1502,24 @@ (315/H/PRO, 55x, 650, 651, 740, 330, 661, 741, 760, 761) as well as XGI V3XT, V5, V8 and Z7. +config FB_VIA + tristate "VIA UniChrome (Pro) and Chrome9 display support" + depends on FB && PCI + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + select FB_SOFT_CURSOR + select I2C_ALGOBIT + select I2C + help + This is the frame buffer device driver for Graphics chips of VIA + UniChrome (Pro) Family (CLE266,PM800/CN400,P4M800CE/P4M800Pro/ + CN700/VN800,CX700/VX700,P4M890) and Chrome9 Family (K8M890,CN896 + /P4M900,VX800) + Say Y if you have a VIA UniChrome graphics board. + + To compile this driver as a module, choose M here: the + module will be called viafb. config FB_NEOMAGIC tristate "NeoMagic display support" depends on FB && PCI @@ -1527,25 +1549,25 @@ module will be called kyrofb. config FB_3DFX - tristate "3Dfx Banshee/Voodoo3 display support" + tristate "3Dfx Banshee/Voodoo3/Voodoo5 display support" depends on FB && PCI select FB_CFB_IMAGEBLIT select FB_CFB_FILLRECT select FB_CFB_COPYAREA help - This driver supports graphics boards with the 3Dfx Banshee/Voodoo3 - chips. Say Y if you have such a graphics board. + This driver supports graphics boards with the 3Dfx Banshee, + Voodoo3 or VSA-100 (aka Voodoo4/5) chips. Say Y if you have + such a graphics board. To compile this driver as a module, choose M here: the module will be called tdfxfb. config FB_3DFX_ACCEL - bool "3Dfx Banshee/Voodoo3 Acceleration functions (EXPERIMENTAL)" + bool "3Dfx Acceleration functions (EXPERIMENTAL)" depends on FB_3DFX && EXPERIMENTAL ---help--- - This will compile the 3Dfx Banshee/Voodoo3 frame buffer device - with acceleration functions. - + This will compile the 3Dfx Banshee/Voodoo3/VSA-100 frame buffer + device driver with acceleration functions. config FB_VOODOO1 tristate "3Dfx Voodoo Graphics (sst1) support" @@ -1583,7 +1605,6 @@ tristate "Cyberblade/i1 support" depends on FB && PCI && X86_32 && !64BIT select FB_CFB_IMAGEBLIT - select VIDEO_SELECT ---help--- This driver is supposed to support the Trident Cyberblade/i1 graphics core integrated in the VIA VT8601A North Bridge, @@ -1611,17 +1632,16 @@ select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT ---help--- - This driver is supposed to support graphics boards with the - Trident CyberXXXX/Image/CyberBlade chips mostly found in laptops + This is the frame buffer device driver for Trident PCI/AGP chipsets. + Supported chipset families are TGUI 9440/96XX, 3DImage, Blade3D + and Blade XP. + There are also integrated versions of these chips called CyberXXXX, + CyberImage or CyberBlade. These chips are mostly found in laptops but also on some motherboards. For more information, read <file:Documentation/fb/tridentfb.txt> - Cyberblade/i1 support will be removed soon, use the cyblafb driver - instead. - Say Y if you have such a graphics board. - To compile this driver as a module, choose M here: the module will be called tridentfb. @@ -1891,6 +1911,28 @@ ---help--- Frame buffer driver for the on-chip SH-Mobile LCD controller. +config FB_TMIO + tristate "Toshiba Mobile IO FrameBuffer support" + depends on FB && MFD_CORE + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Frame buffer driver for the Toshiba Mobile IO integrated as found + on the Sharp SL-6000 series + + This driver is also available as a module ( = code which can be + inserted and removed from the running kernel whenever you want). The + module will be called tmiofb. If you want to compile it as a module, + say M here and read <file:Documentation/kbuild/modules.txt>. + + If unsure, say N. + +config FB_TMIO_ACCELL + bool "tmiofb acceleration" + depends on FB_TMIO + default y + config FB_S3C2410 tristate "S3C2410 LCD framebuffer support" depends on FB && ARCH_S3C2410 @@ -1989,19 +2031,6 @@ framebuffer. ML300 carries a 640*480 LCD display on the board, ML403 uses a standard DB15 VGA connector. -config FB_AM200EPD - tristate "AM-200 E-Ink EPD devkit support" - depends on FB && ARCH_PXA && MMU - select FB_SYS_FILLRECT - select FB_SYS_COPYAREA - select FB_SYS_IMAGEBLIT - select FB_SYS_FOPS - select FB_DEFERRED_IO - select FB_METRONOME - help - This enables support for the Metronome display controller used on - the E-Ink AM-200 EPD devkit. - config FB_COBALT tristate "Cobalt server LCD frame buffer support" depends on FB && MIPS_COBALT @@ -2056,6 +2085,51 @@ frame buffer driver. It communicates with a back-end in another domain. +config FB_METRONOME + tristate "E-Ink Metronome/8track controller support" + depends on FB + select FB_SYS_FILLRECT + select FB_SYS_COPYAREA + select FB_SYS_IMAGEBLIT + select FB_SYS_FOPS + select FB_DEFERRED_IO + help + This driver implements support for the E-Ink Metronome + controller. The pre-release name for this device was 8track + and could also have been called by some vendors as PVI-nnnn. + +config FB_MB862XX + tristate "Fujitsu MB862xx GDC support" + depends on FB + select FB_CFB_FILLRECT + select FB_CFB_COPYAREA + select FB_CFB_IMAGEBLIT + ---help--- + Frame buffer driver for Fujitsu Carmine/Coral-P(A)/Lime controllers. + +config FB_MB862XX_PCI_GDC + bool "Carmine/Coral-P(A) GDC" + depends on PCI && FB_MB862XX + ---help--- + This enables framebuffer support for Fujitsu Carmine/Coral-P(A) + PCI graphics controller devices. + +config FB_MB862XX_LIME + bool "Lime GDC" + depends on FB_MB862XX + depends on OF && !FB_MB862XX_PCI_GDC + select FB_FOREIGN_ENDIAN + select FB_LITTLE_ENDIAN + ---help--- + Framebuffer support for Fujitsu Lime GDC on host CPU bus. + +config FB_PRE_INIT_FB + bool "Don't reinitialize, use bootloader's GDC/Display configuration" + depends on FB_MB862XX_LIME + ---help--- + Select this option if display contents should be inherited as set by + the bootloader. + source "drivers/video/omap/Kconfig" source "drivers/video/backlight/Kconfig" |