diff --git a/drivers/video/arcfb.c b/drivers/video/arcfb.c index 2784f0a9d693a20144d260468da19c8468003324..89060b2db8e5f1bf5c6aae4d10eb0f8899927a7a 100644 --- a/drivers/video/arcfb.c +++ b/drivers/video/arcfb.c @@ -366,7 +366,8 @@ static void arcfb_lcd_update(struct arcfb_par *par, unsigned int dx, } } -void arcfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) +static void arcfb_fillrect(struct fb_info *info, + const struct fb_fillrect *rect) { struct arcfb_par *par = info->par; @@ -376,7 +377,8 @@ void arcfb_fillrect(struct fb_info *info, const struct fb_fillrect *rect) arcfb_lcd_update(par, rect->dx, rect->dy, rect->width, rect->height); } -void arcfb_copyarea(struct fb_info *info, const struct fb_copyarea *area) +static void arcfb_copyarea(struct fb_info *info, + const struct fb_copyarea *area) { struct arcfb_par *par = info->par; @@ -386,7 +388,7 @@ void arcfb_copyarea(struct fb_info *info, const struct fb_copyarea *area) arcfb_lcd_update(par, area->dx, area->dy, area->width, area->height); } -void arcfb_imageblit(struct fb_info *info, const struct fb_image *image) +static void arcfb_imageblit(struct fb_info *info, const struct fb_image *image) { struct arcfb_par *par = info->par; diff --git a/drivers/video/console/softcursor.c b/drivers/video/console/softcursor.c index 8529bf08db28a92807b4e2f5d404be56917ff412..3957fc7523e2495ab397696e21dc8129eb3e39ff 100644 --- a/drivers/video/console/softcursor.c +++ b/drivers/video/console/softcursor.c @@ -17,6 +17,8 @@ #include #include +#include "fbcon.h" + int soft_cursor(struct fb_info *info, struct fb_cursor *cursor) { unsigned int scan_align = info->pixmap.scan_align - 1; diff --git a/drivers/video/i810/i810-i2c.c b/drivers/video/i810/i810-i2c.c index 13c17438fb8ca7bb4d899290af1d563236bd058e..bd410e06db73f1f267071450eba64d23a605a053 100644 --- a/drivers/video/i810/i810-i2c.c +++ b/drivers/video/i810/i810-i2c.c @@ -17,6 +17,7 @@ #include #include "i810.h" #include "i810_regs.h" +#include "i810_main.h" #include "../edid.h" #define I810_DDC 0x50 diff --git a/drivers/video/i810/i810_accel.c b/drivers/video/i810/i810_accel.c index 84f9cc10636f1ffb63b9863e8f13abaa935bd9cb..76764ea3486a7d31a77e0887548ea17696819672 100644 --- a/drivers/video/i810/i810_accel.c +++ b/drivers/video/i810/i810_accel.c @@ -14,6 +14,7 @@ #include "i810_regs.h" #include "i810.h" +#include "i810_main.h" static u32 i810fb_rop[] = { COLOR_COPY_ROP, /* ROP_COPY */ diff --git a/drivers/video/i810/i810_gtf.c b/drivers/video/i810/i810_gtf.c index 64f087a4466bc31a8dbaf572660b9832f3fed44b..9743d51e7f8ca35cd1325dcc4d5c3503dff1a156 100644 --- a/drivers/video/i810/i810_gtf.c +++ b/drivers/video/i810/i810_gtf.c @@ -14,6 +14,7 @@ #include "i810_regs.h" #include "i810.h" +#include "i810_main.h" /* * FIFO and Watermark tables - based almost wholly on i810_wmark.c in diff --git a/drivers/video/i810/i810_main.c b/drivers/video/i810/i810_main.c index d27cd19b7f70c179c8b16eb9dd5c19e1a81c0f17..266d0ab926635fe760f646b00dbe8fe974d8124b 100644 --- a/drivers/video/i810/i810_main.c +++ b/drivers/video/i810/i810_main.c @@ -46,17 +46,58 @@ #include #include - -#ifdef CONFIG_MTRR -#include -#endif - #include #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" , diff --git a/drivers/video/i810/i810_main.h b/drivers/video/i810/i810_main.h index 06072a6466f2cee0fc46be91e9e11b9fc716bea3..51d4f3d4116dda55e130360b89cc02e06cdfa984 100644 --- a/drivers/video/i810/i810_main.h +++ b/drivers/video/i810/i810_main.h @@ -14,55 +14,6 @@ #ifndef __I810_MAIN_H__ #define __I810_MAIN_H__ -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); - -/* - * 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); - -/* 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); -extern int __init agp_intel_init(void); - - /* Video Timings */ extern void round_off_xres (u32 *xres); extern void round_off_yres (u32 *xres, u32 *yres); @@ -101,7 +52,7 @@ static inline void i810_delete_i2c_busses(struct i810fb_par *par) { } /* Conditionals */ #ifdef CONFIG_X86 -inline void flush_cache(void) +static inline void flush_cache(void) { asm volatile ("wbinvd":::"memory"); } @@ -110,7 +61,9 @@ inline void flush_cache(void) #endif #ifdef CONFIG_MTRR -#define KERNEL_HAS_MTRR 1 + +#include + static inline void __devinit set_mtrr(struct i810fb_par *par) { par->mtrr_reg = mtrr_add((u32) par->aperture.physical, @@ -128,7 +81,6 @@ static inline void unset_mtrr(struct i810fb_par *par) par->aperture.size); } #else -#define KERNEL_HAS_MTRR 0 #define set_mtrr(x) printk("set_mtrr: MTRR is disabled in the kernel\n") #define unset_mtrr(x) do { } while (0) diff --git a/drivers/video/kyro/STG4000InitDevice.c b/drivers/video/kyro/STG4000InitDevice.c index 7e33cd307d47fe03b8315c9f3f105ad31b59cb3d..ab5285a7f1d6b1de4beff23674b8e93981dc28d7 100644 --- a/drivers/video/kyro/STG4000InitDevice.c +++ b/drivers/video/kyro/STG4000InitDevice.c @@ -15,6 +15,7 @@ #include #include "STG4000Reg.h" +#include "STG4000Interface.h" /* SDRAM fixed settings */ #define SDRAM_CFG_0 0x49A1 diff --git a/drivers/video/kyro/STG4000Interface.h b/drivers/video/kyro/STG4000Interface.h index e75b3b4a4aa1adf3c1c525464e37c89e1f70f844..b7c83d5dfb139fb8d80e17703d9a573cbcda33f9 100644 --- a/drivers/video/kyro/STG4000Interface.h +++ b/drivers/video/kyro/STG4000Interface.h @@ -11,7 +11,8 @@ #ifndef _STG4000INTERFACE_H #define _STG4000INTERFACE_H -struct pci_dev; +#include +#include