diff options
author | Adrian Bunk <bunk@stusta.de> | 2006-01-09 23:54:04 -0500 |
---|---|---|
committer | Linus Torvalds <torvalds@g5.osdl.org> | 2006-01-10 11:01:56 -0500 |
commit | a0aa7d0639277f375989071fb52a7ce78beeef97 (patch) | |
tree | 5189b4cae286c754f5193f6ac465e3fff31732b6 /drivers/video/i810/i810_main.h | |
parent | 1d64ec153e914cbd60cfaaa47ececed55a9d14d7 (diff) |
[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.h')
-rw-r--r-- | drivers/video/i810/i810_main.h | 56 |
1 files changed, 4 insertions, 52 deletions
diff --git a/drivers/video/i810/i810_main.h b/drivers/video/i810/i810_main.h index 06072a6466f2..51d4f3d4116d 100644 --- a/drivers/video/i810/i810_main.h +++ b/drivers/video/i810/i810_main.h | |||
@@ -14,55 +14,6 @@ | |||
14 | #ifndef __I810_MAIN_H__ | 14 | #ifndef __I810_MAIN_H__ |
15 | #define __I810_MAIN_H__ | 15 | #define __I810_MAIN_H__ |
16 | 16 | ||
17 | static int __devinit i810fb_init_pci (struct pci_dev *dev, | ||
18 | const struct pci_device_id *entry); | ||
19 | static void __exit i810fb_remove_pci(struct pci_dev *dev); | ||
20 | static int i810fb_resume(struct pci_dev *dev); | ||
21 | static int i810fb_suspend(struct pci_dev *dev, pm_message_t state); | ||
22 | |||
23 | /* | ||
24 | * voffset - framebuffer offset in MiB from aperture start address. In order for | ||
25 | * the driver to work with X, we must try to use memory holes left untouched by X. The | ||
26 | * following table lists where X's different surfaces start at. | ||
27 | * | ||
28 | * --------------------------------------------- | ||
29 | * : : 64 MiB : 32 MiB : | ||
30 | * ---------------------------------------------- | ||
31 | * : FrontBuffer : 0 : 0 : | ||
32 | * : DepthBuffer : 48 : 16 : | ||
33 | * : BackBuffer : 56 : 24 : | ||
34 | * ---------------------------------------------- | ||
35 | * | ||
36 | * So for chipsets with 64 MiB Aperture sizes, 32 MiB for v_offset is okay, allowing up to | ||
37 | * 15 + 1 MiB of Framebuffer memory. For 32 MiB Aperture sizes, a v_offset of 8 MiB should | ||
38 | * work, allowing 7 + 1 MiB of Framebuffer memory. | ||
39 | * Note, the size of the hole may change depending on how much memory you allocate to X, | ||
40 | * and how the memory is split up between these surfaces. | ||
41 | * | ||
42 | * Note: Anytime the DepthBuffer or FrontBuffer is overlapped, X would still run but with | ||
43 | * DRI disabled. But if the Frontbuffer is overlapped, X will fail to load. | ||
44 | * | ||
45 | * Experiment with v_offset to find out which works best for you. | ||
46 | */ | ||
47 | static u32 v_offset_default __initdata; /* For 32 MiB Aper size, 8 should be the default */ | ||
48 | static u32 voffset __initdata = 0; | ||
49 | |||
50 | static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor); | ||
51 | |||
52 | /* Chipset Specific Functions */ | ||
53 | static int i810fb_set_par (struct fb_info *info); | ||
54 | static int i810fb_getcolreg (u8 regno, u8 *red, u8 *green, u8 *blue, | ||
55 | u8 *transp, struct fb_info *info); | ||
56 | static int i810fb_setcolreg (unsigned regno, unsigned red, unsigned green, unsigned blue, | ||
57 | unsigned transp, struct fb_info *info); | ||
58 | static int i810fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info); | ||
59 | static int i810fb_blank (int blank_mode, struct fb_info *info); | ||
60 | |||
61 | /* Initialization */ | ||
62 | static void i810fb_release_resource (struct fb_info *info, struct i810fb_par *par); | ||
63 | extern int __init agp_intel_init(void); | ||
64 | |||
65 | |||
66 | /* Video Timings */ | 17 | /* Video Timings */ |
67 | extern void round_off_xres (u32 *xres); | 18 | extern void round_off_xres (u32 *xres); |
68 | extern void round_off_yres (u32 *xres, u32 *yres); | 19 | extern void round_off_yres (u32 *xres, u32 *yres); |
@@ -101,7 +52,7 @@ static inline void i810_delete_i2c_busses(struct i810fb_par *par) { } | |||
101 | 52 | ||
102 | /* Conditionals */ | 53 | /* Conditionals */ |
103 | #ifdef CONFIG_X86 | 54 | #ifdef CONFIG_X86 |
104 | inline void flush_cache(void) | 55 | static inline void flush_cache(void) |
105 | { | 56 | { |
106 | asm volatile ("wbinvd":::"memory"); | 57 | asm volatile ("wbinvd":::"memory"); |
107 | } | 58 | } |
@@ -110,7 +61,9 @@ inline void flush_cache(void) | |||
110 | #endif | 61 | #endif |
111 | 62 | ||
112 | #ifdef CONFIG_MTRR | 63 | #ifdef CONFIG_MTRR |
113 | #define KERNEL_HAS_MTRR 1 | 64 | |
65 | #include <asm/mtrr.h> | ||
66 | |||
114 | static inline void __devinit set_mtrr(struct i810fb_par *par) | 67 | static inline void __devinit set_mtrr(struct i810fb_par *par) |
115 | { | 68 | { |
116 | par->mtrr_reg = mtrr_add((u32) par->aperture.physical, | 69 | par->mtrr_reg = mtrr_add((u32) par->aperture.physical, |
@@ -128,7 +81,6 @@ static inline void unset_mtrr(struct i810fb_par *par) | |||
128 | par->aperture.size); | 81 | par->aperture.size); |
129 | } | 82 | } |
130 | #else | 83 | #else |
131 | #define KERNEL_HAS_MTRR 0 | ||
132 | #define set_mtrr(x) printk("set_mtrr: MTRR is disabled in the kernel\n") | 84 | #define set_mtrr(x) printk("set_mtrr: MTRR is disabled in the kernel\n") |
133 | 85 | ||
134 | #define unset_mtrr(x) do { } while (0) | 86 | #define unset_mtrr(x) do { } while (0) |