patch-2.4.0-test6 linux/drivers/video/fbmem.c
Next file: linux/drivers/video/hitfb.c
Previous file: linux/drivers/video/dnfb.c
Back to the patch index
Back to the overall index
- Lines: 306
- Date:
Sun Aug 6 11:25:46 2000
- Orig file:
v2.4.0-test5/linux/drivers/video/fbmem.c
- Orig date:
Thu Jul 27 17:38:01 2000
diff -u --recursive --new-file v2.4.0-test5/linux/drivers/video/fbmem.c linux/drivers/video/fbmem.c
@@ -57,17 +57,14 @@
extern int pm2fb_init(void);
extern int pm2fb_setup(char*);
extern int cyber2000fb_init(void);
-extern int cyber2000fb_setup(char*);
extern int retz3fb_init(void);
extern int retz3fb_setup(char*);
extern int clgenfb_init(void);
extern int clgenfb_setup(char*);
extern int hitfb_init(void);
-extern int hitfb_setup(char*);
extern int vfb_init(void);
extern int vfb_setup(char*);
extern int offb_init(void);
-extern int offb_setup(char*);
extern int atyfb_init(void);
extern int atyfb_setup(char*);
extern int aty128fb_init(void);
@@ -83,7 +80,6 @@
extern int virgefb_setup(char*);
extern int resolver_video_setup(char*);
extern int s3triofb_init(void);
-extern int s3triofb_setup(char*);
extern int vesafb_init(void);
extern int vesafb_setup(char*);
extern int vga16fb_init(void);
@@ -93,16 +89,17 @@
extern int matroxfb_init(void);
extern int matroxfb_setup(char*);
extern int hpfb_init(void);
-extern int hpfb_setup(char*);
extern int sbusfb_init(void);
extern int sbusfb_setup(char*);
-extern int valkyriefb_init(void);
-extern int valkyriefb_setup(char*);
extern int control_init(void);
extern int control_setup(char*);
+extern int platinum_init(void);
+extern int platinum_setup(char*);
+extern int valkyriefb_init(void);
+extern int valkyriefb_setup(char*);
+extern int chips_init(void);
extern int g364fb_init(void);
extern int sa1100fb_init(void);
-extern int sa1100fb_setup(char*);
extern int fm2fb_init(void);
extern int fm2fb_setup(char*);
extern int q40fb_init(void);
@@ -122,6 +119,7 @@
int (*init)(void);
int (*setup)(char*);
} fb_drivers[] __initdata = {
+
#ifdef CONFIG_FB_SBUS
/*
* Sbusfb must be initialized _before_ other frame buffer devices that
@@ -129,32 +127,22 @@
*/
{ "sbus", sbusfb_init, sbusfb_setup },
#endif
-#ifdef CONFIG_FB_3DFX
- { "tdfx", tdfxfb_init, tdfxfb_setup },
-#endif
-#ifdef CONFIG_FB_SGIVW
- { "sgivw", sgivwfb_init, sgivwfb_setup },
-#endif
+
+ /*
+ * Chipset specific drivers that use resource management
+ */
+
#ifdef CONFIG_FB_RETINAZ3
{ "retz3", retz3fb_init, retz3fb_setup },
#endif
-#ifdef CONFIG_FB_ACORN
- { "acorn", acornfb_init, acornfb_setup },
-#endif
#ifdef CONFIG_FB_AMIGA
{ "amifb", amifb_init, amifb_setup },
#endif
-#ifdef CONFIG_FB_ATARI
- { "atafb", atafb_init, atafb_setup },
-#endif
-#ifdef CONFIG_FB_MAC
- { "macfb", macfb_init, macfb_setup },
-#endif
#ifdef CONFIG_FB_CYBER
{ "cyber", cyberfb_init, cyberfb_setup },
#endif
#ifdef CONFIG_FB_CYBER2000
- { "cyber2000", cyber2000fb_init, cyber2000fb_setup },
+ { "cyber2000", cyber2000fb_init, NULL },
#endif
#ifdef CONFIG_FB_PM2
{ "pm2fb", pm2fb_init, pm2fb_setup },
@@ -171,79 +159,120 @@
#ifdef CONFIG_FB_ATY128
{ "aty128fb", aty128fb_init, aty128fb_setup },
#endif
-#ifdef CONFIG_FB_OF
- /*
- * Offb must be initialized _after_ all other frame buffer devices
- * that use PCI probing and PCI resources! [ Geert ]
- */
- { "offb", offb_init, offb_setup },
+#ifdef CONFIG_FB_VIRGE
+ { "virge", virgefb_init, virgefb_setup },
#endif
-#ifdef CONFIG_FB_IGA
- { "igafb", igafb_init, igafb_setup },
+#ifdef CONFIG_FB_RIVA
+ { "riva", rivafb_init, rivafb_setup },
#endif
-#ifdef CONFIG_FB_IMSTT
- { "imsttfb", imsttfb_init, imsttfb_setup },
+#ifdef CONFIG_FB_CONTROL
+ { "controlfb", control_init, control_setup },
#endif
-#ifdef CONFIG_APOLLO
- { "apollo", dnfb_init, NULL },
+#ifdef CONFIG_FB_PLATINUM
+ { "platinumfb", platinum_init, platinum_setup },
#endif
-#ifdef CONFIG_FB_Q40
- { "q40fb", q40fb_init, NULL },
+#ifdef CONFIG_FB_VALKYRIE
+ { "valkyriefb", valkyriefb_init, valkyriefb_setup },
+#endif
+#ifdef CONFIG_FB_CT65550
+ { "chipsfb", chips_init, NULL },
+#endif
+#ifdef CONFIG_FB_IMSTT
+ { "imsttfb", imsttfb_init, imsttfb_setup },
#endif
#ifdef CONFIG_FB_S3TRIO
- { "s3trio", s3triofb_init, s3triofb_setup },
+ { "s3trio", s3triofb_init, NULL },
#endif
-#ifdef CONFIG_FB_TGA
- { "tga", tgafb_init, tgafb_setup },
-#endif
-#ifdef CONFIG_FB_VIRGE
- { "virge", virgefb_init, virgefb_setup },
+#ifdef CONFIG_FB_FM2
+ { "fm2fb", fm2fb_init, fm2fb_setup },
+#endif
+#ifdef CONFIG_FB_SIS
+ { "sisfb", sisfb_init, sisfb_setup },
#endif
-#ifdef CONFIG_FB_RIVA
- { "riva", rivafb_init, rivafb_setup },
+
+ /*
+ * Generic drivers that are used as fallbacks
+ *
+ * These depend on resource management and must be initialized
+ * _after_ all other frame buffer devices that use resource
+ * management!
+ */
+
+#ifdef CONFIG_FB_OF
+ { "offb", offb_init, NULL },
#endif
#ifdef CONFIG_FB_VESA
{ "vesa", vesafb_init, vesafb_setup },
#endif
-#ifdef CONFIG_FB_VGA16
- { "vga16", vga16fb_init, vga16fb_setup },
-#endif
+
+ /*
+ * Chipset specific drivers that don't use resource management (yet)
+ */
+
+#ifdef CONFIG_FB_3DFX
+ { "tdfx", tdfxfb_init, tdfxfb_setup },
+#endif
+#ifdef CONFIG_FB_SGIVW
+ { "sgivw", sgivwfb_init, sgivwfb_setup },
+#endif
+#ifdef CONFIG_FB_ACORN
+ { "acorn", acornfb_init, acornfb_setup },
+#endif
+#ifdef CONFIG_FB_ATARI
+ { "atafb", atafb_init, atafb_setup },
+#endif
+#ifdef CONFIG_FB_MAC
+ { "macfb", macfb_init, macfb_setup },
+#endif
#ifdef CONFIG_FB_HGA
{ "hga", hgafb_init, hgafb_setup },
#endif
-#ifdef CONFIG_FB_HP300
- { "hpfb", hpfb_init, hpfb_setup },
-#endif
-#ifdef CONFIG_FB_CONTROL
- { "controlfb", control_init, control_setup },
+#ifdef CONFIG_FB_IGA
+ { "igafb", igafb_init, igafb_setup },
#endif
-#ifdef CONFIG_FB_VALKYRIE
- { "valkyriefb", valkyriefb_init, valkyriefb_setup },
+#ifdef CONFIG_APOLLO
+ { "apollo", dnfb_init, NULL },
+#endif
+#ifdef CONFIG_FB_Q40
+ { "q40fb", q40fb_init, NULL },
#endif
+#ifdef CONFIG_FB_TGA
+ { "tga", tgafb_init, tgafb_setup },
+#endif
+#ifdef CONFIG_FB_HP300
+ { "hpfb", hpfb_init, NULL },
+#endif
#ifdef CONFIG_FB_G364
{ "g364", g364fb_init, NULL },
#endif
#ifdef CONFIG_FB_SA1100
- { "sa1100", sa1100fb_init, sa1100fb_setup },
+ { "sa1100", sa1100fb_init, NULL },
#endif
-#ifdef CONFIG_FB_FM2
- { "fm2fb", fm2fb_init, fm2fb_setup },
-#endif
#ifdef CONFIG_FB_SUN3
- { "sun3", sun3fb_init, sun3fb_setup },
+ { "sun3", sun3fb_init, sun3fb_setup },
#endif
#ifdef CONFIG_FB_HIT
- { "hitfb", hitfb_init, hitfb_setup },
+ { "hitfb", hitfb_init, NULL },
#endif
+
+ /*
+ * Generic drivers that don't use resource management (yet)
+ */
+
+#ifdef CONFIG_FB_VGA16
+ { "vga16", vga16fb_init, vga16fb_setup },
+#endif
+
#ifdef CONFIG_GSP_RESOLVER
/* Not a real frame buffer device... */
{ "resolver", NULL, resolver_video_setup },
#endif
-#ifdef CONFIG_FB_SIS
- { "sisfb", sisfb_init, sisfb_setup },
-#endif
+
#ifdef CONFIG_FB_VIRTUAL
- /* Must be last to avoid that vfb becomes your primary display */
+ /*
+ * Vfb must be last to avoid that it becomes your primary display if
+ * other display devices are present
+ */
{ "vfb", vfb_init, vfb_setup },
#endif
};
@@ -264,6 +293,10 @@
static int last_fb_vc = MAX_NR_CONSOLES-1;
static int fbcon_is_default = 1;
+#ifdef CONFIG_FB_OF
+static int ofonly __initdata = 0;
+#endif
+
static int fbmem_read_proc(char *buf, char **start, off_t offset,
int len, int *eof, void *private)
{
@@ -567,7 +600,7 @@
pgprot_val(vma->vm_page_prot) &= ~(PTE_CACHEABLE | PTE_BUFFERABLE);
#endif
#elif defined(__sh__)
- pgprot_val(vma->vm_page_prot) &= ~_PAGE_CACHABLE;
+ pgprot_val(vma->vm_page_prot) &= ~_PAGE_CACHABLE;
#else
#warning What do we have to do here??
#endif
@@ -728,6 +761,13 @@
if (devfs_register_chrdev(FB_MAJOR,"fb",&fb_fops))
printk("unable to get major %d for fb devs\n", FB_MAJOR);
+#ifdef CONFIG_FB_OF
+ if (ofonly) {
+ offb_init();
+ return;
+ }
+#endif
+
/*
* Probe for all builtin frame buffer devices
*/
@@ -786,6 +826,13 @@
last_fb_vc = simple_strtoul(options, &options, 10) - 1;
fbcon_is_default = 0;
}
+
+#ifdef CONFIG_FB_OF
+ if (!strcmp(options, "ofonly")) {
+ ofonly = 1;
+ return 0;
+ }
+#endif
if (num_pref_init_funcs == FB_MAX)
return 0;
FUNET's LINUX-ADM group, linux-adm@nic.funet.fi
TCL-scripts by Sam Shen (who was at: slshen@lbl.gov)