diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-01-09 20:54:04 -0800 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 08:01:56 -0800 |
commit | a0aa7d0639277f375989071fb52a7ce78beeef97 (patch) | |
tree | 5189b4cae286c754f5193f6ac465e3fff31732b6 /drivers/video/i810/i810_main.c | |
parent | 1d64ec153e914cbd60cfaaa47ececed55a9d14d7 (diff) | |
download | linux-a0aa7d0639277f375989071fb52a7ce78beeef97.tar.gz linux-a0aa7d0639277f375989071fb52a7ce78beeef97.tar.bz2 linux-a0aa7d0639277f375989071fb52a7ce78beeef97.zip |
[PATCH] drivers/video/: possible cleanups
This patch contains the possible cleanups including the following:
- every file should #include the headers containing the prototypes for
it's global functions
- make needlessly global functions static
- kyro/STG4000Interface.h: #include video/kyro.h and linux/pci.h
instead of a manual "struct pci_dev"
- i810_main.{c,h}: prototypes for static functions belong to the
C file
Signed-off-by: Adrian Bunk <bunk@stusta.de>
Acked-by: "Antonino A. Daplas" <adaplas@hotpop.com>
Signed-off-by: Andrew Morton <akpm@osdl.org>
Signed-off-by: Linus Torvalds <torvalds@osdl.org>
Diffstat (limited to 'drivers/video/i810/i810_main.c')
-rw-r--r-- | drivers/video/i810/i810_main.c | 51 |
1 files changed, 46 insertions, 5 deletions
diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index d27cd19b7f70..266d0ab92663 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c @@ -46,17 +46,58 @@ #include <asm/io.h> #include <asm/div64.h> - -#ifdef CONFIG_MTRR -#include <asm/mtrr.h> -#endif - #include <asm/page.h> #include "i810_regs.h" #include "i810.h" #include "i810_main.h" +/* + * voffset - framebuffer offset in MiB from aperture start address. In order for + * the driver to work with X, we must try to use memory holes left untouched by X. The + * following table lists where X's different surfaces start at. + * + * --------------------------------------------- + * : : 64 MiB : 32 MiB : + * ---------------------------------------------- + * : FrontBuffer : 0 : 0 : + * : DepthBuffer : 48 : 16 : + * : BackBuffer : 56 : 24 : + * ---------------------------------------------- + * + * So for chipsets with 64 MiB Aperture sizes, 32 MiB for v_offset is okay, allowing up to + * 15 + 1 MiB of Framebuffer memory. For 32 MiB Aperture sizes, a v_offset of 8 MiB should + * work, allowing 7 + 1 MiB of Framebuffer memory. + * Note, the size of the hole may change depending on how much memory you allocate to X, + * and how the memory is split up between these surfaces. + * + * Note: Anytime the DepthBuffer or FrontBuffer is overlapped, X would still run but with + * DRI disabled. But if the Frontbuffer is overlapped, X will fail to load. + * + * Experiment with v_offset to find out which works best for you. + */ +static u32 v_offset_default __initdata; /* For 32 MiB Aper size, 8 should be the default */ +static u32 voffset __initdata = 0; + +static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor); +static int __devinit i810fb_init_pci (struct pci_dev *dev, + const struct pci_device_id *entry); +static void __exit i810fb_remove_pci(struct pci_dev *dev); +static int i810fb_resume(struct pci_dev *dev); +static int i810fb_suspend(struct pci_dev *dev, pm_message_t state); + +/* Chipset Specific Functions */ +static int i810fb_set_par (struct fb_info *info); +static int i810fb_getcolreg (u8 regno, u8 *red, u8 *green, u8 *blue, + u8 *transp, struct fb_info *info); +static int i810fb_setcolreg (unsigned regno, unsigned red, unsigned green, unsigned blue, + unsigned transp, struct fb_info *info); +static int i810fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info); +static int i810fb_blank (int blank_mode, struct fb_info *info); + +/* Initialization */ +static void i810fb_release_resource (struct fb_info *info, struct i810fb_par *par); + /* PCI */ static const char *i810_pci_list[] __devinitdata = { "Intel(R) 810 Framebuffer Device" , |