diff options
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 @@ | |||
46 | 46 | ||
47 | #include <asm/io.h> | 47 | #include <asm/io.h> |
48 | #include <asm/div64.h> | 48 | #include <asm/div64.h> |
49 | |||
50 | #ifdef CONFIG_MTRR | ||
51 | #include <asm/mtrr.h> | ||
52 | #endif | ||
53 | |||
54 | #include <asm/page.h> | 49 | #include <asm/page.h> |
55 | 50 | ||
56 | #include "i810_regs.h" | 51 | #include "i810_regs.h" |
57 | #include "i810.h" | 52 | #include "i810.h" |
58 | #include "i810_main.h" | 53 | #include "i810_main.h" |
59 | 54 | ||
55 | /* | ||
56 | * voffset - framebuffer offset in MiB from aperture start address. In order for | ||
57 | * the driver to work with X, we must try to use memory holes left untouched by X. The | ||
58 | * following table lists where X's different surfaces start at. | ||
59 | * | ||
60 | * --------------------------------------------- | ||
61 | * : : 64 MiB : 32 MiB : | ||
62 | * ---------------------------------------------- | ||
63 | * : FrontBuffer : 0 : 0 : | ||
64 | * : DepthBuffer : 48 : 16 : | ||
65 | * : BackBuffer : 56 : 24 : | ||
66 | * ---------------------------------------------- | ||
67 | * | ||
68 | * So for chipsets with 64 MiB Aperture sizes, 32 MiB for v_offset is okay, allowing up to | ||
69 | * 15 + 1 MiB of Framebuffer memory. For 32 MiB Aperture sizes, a v_offset of 8 MiB should | ||
70 | * work, allowing 7 + 1 MiB of Framebuffer memory. | ||
71 | * Note, the size of the hole may change depending on how much memory you allocate to X, | ||
72 | * and how the memory is split up between these surfaces. | ||
73 | * | ||
74 | * Note: Anytime the DepthBuffer or FrontBuffer is overlapped, X would still run but with | ||
75 | * DRI disabled. But if the Frontbuffer is overlapped, X will fail to load. | ||
76 | * | ||
77 | * Experiment with v_offset to find out which works best for you. | ||
78 | */ | ||
79 | static u32 v_offset_default __initdata; /* For 32 MiB Aper size, 8 should be the default */ | ||
80 | static u32 voffset __initdata = 0; | ||
81 | |||
82 | static int i810fb_cursor(struct fb_info *info, struct fb_cursor *cursor); | ||
83 | static int __devinit i810fb_init_pci (struct pci_dev *dev, | ||
84 | const struct pci_device_id *entry); | ||
85 | static void __exit i810fb_remove_pci(struct pci_dev *dev); | ||
86 | static int i810fb_resume(struct pci_dev *dev); | ||
87 | static int i810fb_suspend(struct pci_dev *dev, pm_message_t state); | ||
88 | |||
89 | /* Chipset Specific Functions */ | ||
90 | static int i810fb_set_par (struct fb_info *info); | ||
91 | static int i810fb_getcolreg (u8 regno, u8 *red, u8 *green, u8 *blue, | ||
92 | u8 *transp, struct fb_info *info); | ||
93 | static int i810fb_setcolreg (unsigned regno, unsigned red, unsigned green, unsigned blue, | ||
94 | unsigned transp, struct fb_info *info); | ||
95 | static int i810fb_pan_display(struct fb_var_screeninfo *var, struct fb_info *info); | ||
96 | static int i810fb_blank (int blank_mode, struct fb_info *info); | ||
97 | |||
98 | /* Initialization */ | ||
99 | static void i810fb_release_resource (struct fb_info *info, struct i810fb_par *par); | ||
100 | |||
60 | /* PCI */ | 101 | /* PCI */ |
61 | static const char *i810_pci_list[] __devinitdata = { | 102 | static const char *i810_pci_list[] __devinitdata = { |
62 | "Intel(R) 810 Framebuffer Device" , | 103 | "Intel(R) 810 Framebuffer Device" , |