Recent changes upstream are breaking fbdev on pmacs.
I haven't had time to go deep into that (but I suspect Linus sees it
too on his own g5 unless he removed offb from his .config).
>From what I see, it seems that offb is kicking in by default, reserves
the mmio regions, and then whatever chip driver loads can't access them.
offb is supposed to be a "fallback" driver in case no fbdev is taking
over, it should also be "forced" in with video=ofonly kernel command
line. This logic has been broken.
Ben.
On Friday 10 September 2004 10:23, Benjamin Herrenschmidt wrote:
> Recent changes upstream are breaking fbdev on pmacs.
>
> I haven't had time to go deep into that (but I suspect Linus sees it
> too on his own g5 unless he removed offb from his .config).
>
> From what I see, it seems that offb is kicking in by default, reserves
> the mmio regions, and then whatever chip driver loads can't access them.
>
> offb is supposed to be a "fallback" driver in case no fbdev is taking
> over, it should also be "forced" in with video=ofonly kernel command
> line. This logic has been broken.
>
Hi Ben,
Actually, I was thinking about this problem with offb. I was planning on
adding video=offb:off support for offb, and then place offb at the very top
drivers Makefile (the reason why I placed it there, but forgot to add the
setup support for offb). So, without the 'off' option, offb becomes the
first driver that gets initialized by reason that it's at the top, and with
the 'off' option, it just exits initialization immediately, giving the other
drivers a chance to get through.
This first method is easy to add.
The second method is not harder but will involve, again, changes to all
drivers. The only sane method I can think of is to change fb_get_options so
it returns an error if:
a. "off" option is enabled
b. "ofonly" is enabled but only if name != "offb"
If fb_get_options returns an error, drivers will not proceed with their
initialization. The second method is more compatible with the
previous setup semantics.
I told Geert that if the changes did bite us, then I have no choice
but to add support for the second method.
So, if you think that the first method is not enough, then I will add the
second method. Let me know.
Tony
On Fri, 2004-09-10 at 15:28, Antonino A. Daplas wrote:
> If fb_get_options returns an error, drivers will not proceed with their
> initialization. The second method is more compatible with the
> previous setup semantics.
>
> I told Geert that if the changes did bite us, then I have no choice
> but to add support for the second method.
>
> So, if you think that the first method is not enough, then I will add the
> second method. Let me know.
I submited a patch moving offb to the bottom of the Makefile to at
least restore normal drivers. For ofonly, a bit more hackish, but
what about failing register_framebuffer for anything but offb ?
Ben.
On Fri, 10 Sep 2004, Benjamin Herrenschmidt wrote:
> I submited a patch moving offb to the bottom of the Makefile to at
> least restore normal drivers. For ofonly, a bit more hackish, but
Just in case they aren't, vesafb and vga16fb should also be at the bottom, cfr.
the old order in fbmem.c.
> what about failing register_framebuffer for anything but offb ?
Humm, indeed hackerish...
But the advantage of this is that we can finally exercise the failure path of
many frame buffer device drivers in the wild ;-)
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On Friday 10 September 2004 14:00, Benjamin Herrenschmidt wrote:
> On Fri, 2004-09-10 at 15:28, Antonino A. Daplas wrote:
> > If fb_get_options returns an error, drivers will not proceed with their
> > initialization. The second method is more compatible with the
> > previous setup semantics.
> >
> > I told Geert that if the changes did bite us, then I have no choice
> > but to add support for the second method.
> >
> > So, if you think that the first method is not enough, then I will add the
> > second method. Let me know.
>
> I submited a patch moving offb to the bottom of the Makefile to at
> least restore normal drivers. For ofonly, a bit more hackish, but
> what about failing register_framebuffer for anything but offb ?
Yes, that should solve the ofonly problem, with the offb in the very last of
the Makefile, though as you said, it's a little hackish, but very simple to
implement. This will work for ofonly though, since
info->fix.name is not necessarily equal to "xxxfb". For instance, offb set
"OFfb" in info->fix.name, but the boot option is "offb".
After giving it some thought, I think method 2 might be the best since it
provides compatibility with the old syntax. Especially if users expect
video=xxxfb:off to work. Also, this brings more flexibility in the offchance
we decide to add more options to "video=".
I'm willing to work on this, but if you don't like it, then I'll do the 'fail
at register_framebuffer".
Tony
On Friday 10 September 2004 16:07, Geert Uytterhoeven wrote:
> On Fri, 10 Sep 2004, Benjamin Herrenschmidt wrote:
> > I submited a patch moving offb to the bottom of the Makefile to at
> > least restore normal drivers. For ofonly, a bit more hackish, but
>
> Just in case they aren't, vesafb and vga16fb should also be at the bottom,
> cfr. the old order in fbmem.c.
>
They are, with vfb at the very last.
> > what about failing register_framebuffer for anything but offb ?
>
> Humm, indeed hackerish...
>
> But the advantage of this is that we can finally exercise the failure path
> of many frame buffer device drivers in the wild ;-)
>
Assuming, as I've mentioned in another thread, that info->fix.name ==
to video=xxxfb.
Tony
> Yes, that should solve the ofonly problem, with the offb in the very last of
> the Makefile, though as you said, it's a little hackish, but very simple to
> implement. This will work for ofonly though, since
> info->fix.name is not necessarily equal to "xxxfb". For instance, offb set
> "OFfb" in info->fix.name, but the boot option is "offb".
FYI Im seeing this on my POWER5 box:
Using unsupported 640x480 MTRX,G450 at e0000000, depth=8, pitch=640
cpu 0x1: Vector: 300 (Data Access) at [c000000074f37230]
pc: c0000000001e20a4: .cfb_imageblit+0x5c0/0x610
lr: c0000000001d358c: .accel_putcs+0x1f0/0x720
sp: c000000074f374b0
msr: 8000000000009032
dar: e000000080000000
dsisr: 42000000
current = 0xc000000074f310e0
paca = 0xc00000000052fa80
pid = 1, comm = swapper
enter ? for help
1:mon> t
[c000000074f375a0] c0000000001d358c .accel_putcs+0x1f0/0x720
[c000000074f37740] c000000000218600 .do_update_region+0x238/0x2ac
[c000000074f37810] c0000000002197c8 .redraw_screen+0x138/0x2b8
[c000000074f378b0] c0000000001d4724 .fbcon_init+0x5a0/0x73c
[c000000074f379a0] c000000000219b74 .visual_init+0x22c/0x2dc
[c000000074f37a50] c00000000021c0c4 .take_over_console+0x43c/0x6dc
[c000000074f37b20] c0000000001d31b4 .fbcon_takeover+0x88/0xf0
[c000000074f37bb0] c0000000001d968c .fbcon_event_notify+0x514/0xc00
[c000000074f37c70] c00000000006284c .notifier_call_chain+0x64/0x98
[c000000074f37d00] c0000000001dc87c .register_framebuffer+0x144/0x20c
[c000000074f37df0] c00000000049dcd0 .offb_init+0x528/0x838
[c000000074f37f00] c00000000000c698 .init+0x23c/0x44c
[c000000074f37f90] c000000000017f14 .kernel_thread+0x4c/0x68
We took a data miss trying to access an ioremapped area (e000000080000000).
Offb might have always been buggy but was hidden by the fact that matroxfb
used to init first.
Anton
On Fri, Sep 10, 2004 at 01:28:57PM +0800, Antonino A. Daplas wrote:
> On Friday 10 September 2004 10:23, Benjamin Herrenschmidt wrote:
> > Recent changes upstream are breaking fbdev on pmacs.
> >
> > I haven't had time to go deep into that (but I suspect Linus sees it
> > too on his own g5 unless he removed offb from his .config).
> >
> > From what I see, it seems that offb is kicking in by default, reserves
> > the mmio regions, and then whatever chip driver loads can't access them.
> >
> > offb is supposed to be a "fallback" driver in case no fbdev is taking
> > over, it should also be "forced" in with video=ofonly kernel command
> > line. This logic has been broken.
I dearly *hope* this is what I'm seeing with recent kernels, though I
have my doubts.... What I *do* know is that with recent bk snapshots
(post bk-1.2115) I have the following: radeonfb seems to load, but when I
try to load X, my y-resolution seems to be half of what it ought to be...
The only code I see poking around at fb is yours... *shrug*
-Happy to try new patches David
On Friday 10 September 2004 10:23, Benjamin Herrenschmidt wrote:
> Recent changes upstream are breaking fbdev on pmacs.
>
> I haven't had time to go deep into that (but I suspect Linus sees it
> too on his own g5 unless he removed offb from his .config).
>
> From what I see, it seems that offb is kicking in by default, reserves
> the mmio regions, and then whatever chip driver loads can't access them.
>
> offb is supposed to be a "fallback" driver in case no fbdev is taking
> over, it should also be "forced" in with video=ofonly kernel command
> line. This logic has been broken.
>
Hi Ben,
How about this patch? This brings back the old way of setting up the
drivers, supports:
video=xxxfb:off
video=ofonly
Your patch that brings offb to the very last of the Makefile is needed.
Signed-off-by: Antonino Daplas <[email protected]>
---
drivers/video/68328fb.c | 6 +++-
drivers/video/acornfb.c | 6 +++-
drivers/video/amba-clcd.c | 2 +
drivers/video/amifb.c | 6 +++-
drivers/video/asiliantfb.c | 3 ++
drivers/video/aty/aty128fb.c | 11 +++++++-
drivers/video/aty/atyfb_base.c | 19 ++++++++++----
drivers/video/aty/radeon_base.c | 6 +++-
drivers/video/bw2.c | 3 ++
drivers/video/cg14.c | 3 ++
drivers/video/cg3.c | 3 ++
drivers/video/cg6.c | 3 ++
drivers/video/chipsfb.c | 3 ++
drivers/video/cirrusfb.c | 6 +++-
drivers/video/clps711xfb.c | 3 ++
drivers/video/controlfb.c | 5 +++
drivers/video/cyber2000fb.c | 6 +++-
drivers/video/dnfb.c | 3 ++
drivers/video/epson1355fb.c | 3 ++
drivers/video/fbmem.c | 44 ++++++++++++++++++++--------------
drivers/video/ffb.c | 3 ++
drivers/video/fm2fb.c | 6 +++-
drivers/video/g364fb.c | 3 ++
drivers/video/gbefb.c | 6 +++-
drivers/video/hgafb.c | 3 ++
drivers/video/hitfb.c | 3 ++
drivers/video/hpfb.c | 3 ++
drivers/video/i810/i810_main.c | 6 +++-
drivers/video/igafb.c | 3 ++
drivers/video/imsttfb.c | 7 ++++-
drivers/video/kyro/fbdev.c | 6 +++-
drivers/video/leo.c | 3 ++
drivers/video/macfb.c | 5 +++
drivers/video/matrox/matroxfb_base.c | 6 +++-
drivers/video/matrox/matroxfb_crtc2.c | 3 ++
drivers/video/maxinefb.c | 3 ++
drivers/video/neofb.c | 6 +++-
drivers/video/offb.c | 5 +++
drivers/video/p9100.c | 3 ++
drivers/video/platinumfb.c | 6 +++-
drivers/video/pm2fb.c | 6 +++-
drivers/video/pmag-ba-fb.c | 3 ++
drivers/video/pmagb-b-fb.c | 3 ++
drivers/video/pvr2fb.c | 6 +++-
drivers/video/pxafb.c | 6 +++-
drivers/video/q40fb.c | 3 ++
drivers/video/radeonfb.c | 6 +++-
drivers/video/riva/fbdev.c | 6 +++-
drivers/video/sa1100fb.c | 3 ++
drivers/video/sgivwfb.c | 6 +++-
drivers/video/sis/sis_main.c | 6 +++-
drivers/video/skeletonfb.c | 6 +++-
drivers/video/sstfb.c | 6 +++-
drivers/video/stifb.c | 6 +++-
drivers/video/tcx.c | 3 ++
drivers/video/tdfxfb.c | 7 ++++-
drivers/video/tgafb.c | 6 +++-
drivers/video/tridentfb.c | 6 +++-
drivers/video/tx3912fb.c | 5 +++
drivers/video/valkyriefb.c | 5 +++
drivers/video/vesafb.c | 5 +++
drivers/video/vfb.c | 6 +++-
drivers/video/vga16fb.c | 8 ++++--
include/linux/fb.h | 2 -
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/68328fb.c linux-2.6.9-rc1-mm4/drivers/video/68328fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/68328fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/68328fb.c 2004-09-10 21:32:01.665230560 +0800
@@ -440,7 +440,11 @@ int __init mc68x328fb_setup(char *option
int __init mc68x328fb_init(void)
{
#ifndef MODULE
- mc68x328fb_setup(fb_get_options("68328fb"));
+ char *option = NULL;
+
+ if (fb_get_options("68328fb", &option))
+ return -ENODEV;
+ mc68x328fb_setup(option);
#endif
/*
* initialize the default mode from the LCD controller registers
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/acornfb.c linux-2.6.9-rc1-mm4/drivers/video/acornfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/acornfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/acornfb.c 2004-09-10 21:32:01.671229648 +0800
@@ -1291,8 +1291,12 @@ acornfb_init(void)
unsigned long size;
u_int h_sync, v_sync;
int rc, i;
+ char *option = NULL;
+
+ if (fb_get_options("acornfb", &option))
+ return -ENODEV;
+ acornfb_setup(option);
- acornfb_setup(fb_get_options("acornfb"));
acornfb_init_fbinfo();
current_par.dev = &acornfb_device;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/amba-clcd.c linux-2.6.9-rc1-mm4/drivers/video/amba-clcd.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/amba-clcd.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/amba-clcd.c 2004-09-10 21:32:01.676228888 +0800
@@ -496,6 +496,8 @@ static struct amba_driver clcd_driver =
int __init amba_clcdfb_init(void)
{
+ if (fb_get_options("ambafb", NULL))
+ return -ENODEV;
return amba_driver_register(&clcd_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/amifb.c linux-2.6.9-rc1-mm4/drivers/video/amifb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/amifb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/amifb.c 2004-09-10 21:32:01.683227824 +0800
@@ -2258,7 +2258,11 @@ int __init amifb_init(void)
u_int defmode;
#ifndef MODULE
- amifb_setup(fb_get_options("amifb"));
+ char *option = NULL;
+
+ if (fb_get_options("amifb", &option))
+ return -ENODEV;
+ amifb_setup(option);
#endif
if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_VIDEO))
return -ENXIO;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/asiliantfb.c linux-2.6.9-rc1-mm4/drivers/video/asiliantfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/asiliantfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/asiliantfb.c 2004-09-10 21:32:01.689226912 +0800
@@ -609,6 +609,9 @@ static struct pci_driver asiliantfb_driv
int __init asiliantfb_init(void)
{
+ if (fb_get_options("asiliantfb", NULL))
+ return -ENODEV;
+
return pci_module_init(&asiliantfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/aty/aty128fb.c linux-2.6.9-rc1-mm4/drivers/video/aty/aty128fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/aty/aty128fb.c 2004-09-08 12:44:12.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/aty/aty128fb.c 2004-09-10 21:32:01.695226000 +0800
@@ -2439,6 +2439,14 @@ static int aty128_pci_resume(struct pci_
int __init aty128fb_init(void)
{
+#ifndef MODULE
+ char *option = NULL;
+
+ if (fb_get_options("aty128fb", &option))
+ return -ENODEV;
+ aty128fb_setup(option);
+#endif
+
return pci_module_init(&aty128fb_driver);
}
@@ -2447,8 +2455,9 @@ static void __exit aty128fb_exit(void)
pci_unregister_driver(&aty128fb_driver);
}
-#ifdef MODULE
module_init(aty128fb_init);
+
+#ifdef MODULE
module_exit(aty128fb_exit);
MODULE_AUTHOR("(c)1999-2003 Brad Douglas <[email protected]>");
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/aty/atyfb_base.c linux-2.6.9-rc1-mm4/drivers/video/aty/atyfb_base.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/aty/atyfb_base.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/aty/atyfb_base.c 2004-09-10 21:32:01.702224936 +0800
@@ -1902,12 +1902,8 @@ static int __init aty_init(struct fb_inf
return 1;
}
-int __init atyfb_init(void)
+static int __init atyfb_do_init(void)
{
-#ifndef MODULE
- atyfb_setup(fb_get_options("atyfb"));
-#endif
-
#if defined(CONFIG_PCI)
unsigned long addr, res_start, res_size;
struct atyfb_par *default_par;
@@ -2381,6 +2377,19 @@ int __init atyfb_init(void)
return 0;
}
+int __init atyfb_init(void)
+{
+#ifndef MODULE
+ char *option = NULL;
+
+ if (fb_get_options("atyfb", &option))
+ return -ENODEV;
+ atyfb_setup(option);
+#endif
+ return atyfb_do_init();
+}
+
+
#ifndef MODULE
int __init atyfb_setup(char *options)
{
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/aty/radeon_base.c linux-2.6.9-rc1-mm4/drivers/video/aty/radeon_base.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/aty/radeon_base.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/aty/radeon_base.c 2004-09-10 21:32:01.708224024 +0800
@@ -2443,7 +2443,11 @@ int __init radeonfb_setup (char *options
int __init radeonfb_init (void)
{
#ifndef MODULE
- radeonfb_setup(fb_get_options("radeonfb"));
+ char *option = NULL;
+
+ if (fb_get_options("radeonfb", &option))
+ return -ENODEV;
+ radeonfb_setup(option);
#endif
return pci_module_init (&radeonfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/bw2.c linux-2.6.9-rc1-mm4/drivers/video/bw2.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/bw2.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/bw2.c 2004-09-10 21:32:01.714223112 +0800
@@ -386,6 +386,9 @@ int __init bw2_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("bw2fb", &option))
+ return -ENODEV;
+
#ifdef CONFIG_SUN4
bw2_init_one(NULL);
#endif
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/cg14.c linux-2.6.9-rc1-mm4/drivers/video/cg14.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/cg14.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/cg14.c 2004-09-10 21:32:01.719222352 +0800
@@ -584,6 +584,9 @@ int __init cg14_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("cg14fb", NULL))
+ return -ENODEV;
+
#ifdef CONFIG_SPARC32
{
int root, node;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/cg3.c linux-2.6.9-rc1-mm4/drivers/video/cg3.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/cg3.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/cg3.c 2004-09-10 21:32:01.724221592 +0800
@@ -444,6 +444,9 @@ int __init cg3_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("cg3fb", NULL))
+ return -ENODEV;
+
for_all_sbusdev(sdev, sbus) {
if (!strcmp(sdev->prom_name, "cgthree") ||
!strcmp(sdev->prom_name, "cgRDI"))
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/cg6.c linux-2.6.9-rc1-mm4/drivers/video/cg6.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/cg6.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/cg6.c 2004-09-10 21:32:01.729220832 +0800
@@ -760,6 +760,9 @@ int __init cg6_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("cg6fb", NULL))
+ return -ENODEV;
+
for_all_sbusdev(sdev, sbus) {
if (!strcmp(sdev->prom_name, "cgsix") ||
!strcmp(sdev->prom_name, "cgthree+"))
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/chipsfb.c linux-2.6.9-rc1-mm4/drivers/video/chipsfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/chipsfb.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/chipsfb.c 2004-09-10 21:32:01.734220072 +0800
@@ -462,6 +462,9 @@ static struct pci_driver chipsfb_driver
int __init chips_init(void)
{
+ if (fb_get_options("chipsfb", NULL))
+ return -ENODEV;
+
return pci_module_init(&chipsfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/cirrusfb.c linux-2.6.9-rc1-mm4/drivers/video/cirrusfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/cirrusfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/cirrusfb.c 2004-09-10 21:32:01.741219008 +0800
@@ -2607,7 +2607,11 @@ int __init cirrusfb_init(void)
int error = 0;
#ifndef MODULE
- cirrusfb_setup(fb_get_options("cirrusfb"));
+ char *option = NULL;
+
+ if (fb_get_options("cirrusfb", &option))
+ return -ENODEV;
+ cirrusfb_setup(option);
#endif
#ifdef CONFIG_ZORRO
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/clps711xfb.c linux-2.6.9-rc1-mm4/drivers/video/clps711xfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/clps711xfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/clps711xfb.c 2004-09-10 21:32:01.747218096 +0800
@@ -364,6 +364,9 @@ int __init clps711xfb_init(void)
{
int err = -ENOMEM;
+ if (fb_get_options("clps711xfb", NULL))
+ return -ENODEV;
+
cfb = kmalloc(sizeof(*cfb), GFP_KERNEL);
if (!cfb)
goto out;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/controlfb.c linux-2.6.9-rc1-mm4/drivers/video/controlfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/controlfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/controlfb.c 2004-09-10 21:32:01.752217336 +0800
@@ -556,8 +556,11 @@ static void control_set_hardware(struct
int __init control_init(void)
{
struct device_node *dp;
+ char *option = NULL;
- control_setup(fb_get_options("controlfb"));
+ if (fb_get_options("controlfb", &option))
+ return -ENODEV;
+ control_setup(option);
dp = find_devices("control");
if (dp != 0 && !control_of_init(dp))
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/cyber2000fb.c linux-2.6.9-rc1-mm4/drivers/video/cyber2000fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/cyber2000fb.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/cyber2000fb.c 2004-09-10 21:32:01.758216424 +0800
@@ -1722,7 +1722,11 @@ int __init cyber2000fb_init(void)
int ret = -1, err;
#ifndef MODULE
- cyber2000fb_setup(fb_get_options("cyber200fb"));
+ char *option = NULL;
+
+ if (fb_get_options("cyber2000fb", NULL))
+ return -ENODEV;
+ cyber2000fb_setup(option);
#endif
#ifdef CONFIG_ARCH_SHARK
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/dnfb.c linux-2.6.9-rc1-mm4/drivers/video/dnfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/dnfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/dnfb.c 2004-09-10 21:32:01.763215664 +0800
@@ -284,6 +284,9 @@ int __init dnfb_init(void)
{
int ret;
+ if (fb_get_options("dnfb", NULL))
+ return -ENODEV;
+
ret = driver_register(&dnfb_driver);
if (!ret) {
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/epson1355fb.c linux-2.6.9-rc1-mm4/drivers/video/epson1355fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/epson1355fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/epson1355fb.c 2004-09-10 21:32:01.768214904 +0800
@@ -740,6 +740,9 @@ int __init epson1355fb_init(void)
{
int ret = 0;
+ if (fb_get_options("epson1355fb", NULL))
+ return -ENODEV;
+
ret = driver_register(&epson1355fb_driver);
if (!ret) {
ret = platform_device_register(&epson1355fb_device);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/fbmem.c linux-2.6.9-rc1-mm4/drivers/video/fbmem.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/fbmem.c 2004-09-10 05:29:28.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/fbmem.c 2004-09-10 21:32:01.774213992 +0800
@@ -1288,6 +1288,7 @@ module_init(fbmem_init);
#define NR_FB_DRIVERS 64
static char *video_options[NR_FB_DRIVERS];
+static int ofonly;
/**
* fb_get_options - get kernel boot parameters
@@ -1297,30 +1298,35 @@ static char *video_options[NR_FB_DRIVERS
*
* NOTE: Needed to maintain backwards compatibility
*/
-char* fb_get_options(char *name)
+int fb_get_options(char *name, char **option)
{
- char *option = NULL;
- char *opt;
- int opt_len;
+ char *opt, *options = NULL;
+ int opt_len, retval = 0;
int name_len = strlen(name), i;
- if (!name_len)
- return option;
+ if (name_len && ofonly && strncmp(name, "offb", 4))
+ retval = 1;
- for (i = 0; i < NR_FB_DRIVERS; i++) {
- if (video_options[i] == NULL)
- continue;
- opt_len = strlen(video_options[i]);
- if (!opt_len)
- continue;
- opt = video_options[i];
- if (!strncmp(name, opt, name_len) &&
- opt[name_len] == ':') {
- option = opt + name_len + 1;
- break;
+ if (name_len && !retval) {
+ for (i = 0; i < NR_FB_DRIVERS; i++) {
+ if (video_options[i] == NULL)
+ continue;
+ opt_len = strlen(video_options[i]);
+ if (!opt_len)
+ continue;
+ opt = video_options[i];
+ if (!strncmp(name, opt, name_len) &&
+ opt[name_len] == ':')
+ options = opt + name_len + 1;
}
}
- return option;
+ if (options && !strncmp(options, "off", 3))
+ retval = 1;
+
+ if (option)
+ *option = options;
+
+ return retval;
}
/**
@@ -1345,6 +1351,8 @@ int __init video_setup(char *options)
return 0;
for (i = 0; i < NR_FB_DRIVERS; i++) {
+ if (!strncmp(options, "ofonly", 6))
+ ofonly = 1;
if (video_options[i] == NULL) {
video_options[i] = options;
break;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/ffb.c linux-2.6.9-rc1-mm4/drivers/video/ffb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/ffb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/ffb.c 2004-09-10 21:32:01.779213232 +0800
@@ -1049,6 +1049,9 @@ int __init ffb_init(void)
{
int root;
+ if (fb_get_options("ffb", NULL))
+ return -ENODEV;
+
ffb_scan_siblings(prom_root_node);
root = prom_getchild(prom_root_node);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/fm2fb.c linux-2.6.9-rc1-mm4/drivers/video/fm2fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/fm2fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/fm2fb.c 2004-09-10 21:32:01.784212472 +0800
@@ -296,7 +296,11 @@ int __init fm2fb_setup(char *options);
int __init fm2fb_init(void)
{
- fm2fb_setup(fb_get_options("fb2fb"));
+ char *option = NULL;
+
+ if (fb_get_options("fm2fb", &option))
+ return -ENODEV;
+ fm2fb_setup(option);
return zorro_register_driver(&fm2fb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/g364fb.c linux-2.6.9-rc1-mm4/drivers/video/g364fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/g364fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/g364fb.c 2004-09-10 21:32:01.788211864 +0800
@@ -202,6 +202,9 @@ int __init g364fb_init(void)
(volatile unsigned int *) CURS_PAL_REG;
int mem, i, j;
+ if (fb_get_options("g364fb", NULL))
+ return -ENODEV;
+
/* TBD: G364 detection */
/* get the resolution set by ARC console */
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/gbefb.c linux-2.6.9-rc1-mm4/drivers/video/gbefb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/gbefb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/gbefb.c 2004-09-10 21:32:01.792211256 +0800
@@ -1084,7 +1084,11 @@ int __init gbefb_init(void)
int i, ret = 0;
#ifndef MODULE
- gbefb_setup(fb_get_options("gbefb"));
+ char *option = NULL;
+
+ if (fb_get_options("gbefb", &option))
+ return -ENODEV;
+ gbefb_setup(options);
#endif
if (!request_mem_region(GBE_BASE, sizeof(struct sgi_gbe), "GBE")) {
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/hgafb.c linux-2.6.9-rc1-mm4/drivers/video/hgafb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/hgafb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/hgafb.c 2004-09-10 21:32:01.797210496 +0800
@@ -547,6 +547,9 @@ static struct fb_ops hgafb_ops = {
int __init hgafb_init(void)
{
+ if (fb_get_options("hgafb", NULL))
+ return -ENODEV;
+
if (! hga_card_detect()) {
printk(KERN_INFO "hgafb: HGA card not detected.\n");
return -EINVAL;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/hitfb.c linux-2.6.9-rc1-mm4/drivers/video/hitfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/hitfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/hitfb.c 2004-09-10 21:32:01.801209888 +0800
@@ -270,6 +270,9 @@ int __init hitfb_init(void)
unsigned short lcdclor, ldr3, ldvndr;
int size;
+ if (fb_get_options("hitfb", NULL))
+ return -ENODEV;
+
hitfb_fix.smem_start = CONFIG_HD64461_IOBASE + 0x02000000;
hitfb_fix.smem_len = (MACH_HP690) ? 1024 * 1024 : 512 * 1024;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/hpfb.c linux-2.6.9-rc1-mm4/drivers/video/hpfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/hpfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/hpfb.c 2004-09-10 21:32:01.804209432 +0800
@@ -115,6 +115,9 @@ int __init hpfb_init_one(unsigned long b
{
unsigned long fboff;
+ if (fb_get_options("hpfb", NULL))
+ return -ENODEV;
+
fboff = (in_8(base + TOPCAT_FBOMSB) << 8) | in_8(base + TOPCAT_FBOLSB);
hpfb_fix.smem_start = 0xf0000000 | (in_8(base + fboff) << 16);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/i810/i810_main.c linux-2.6.9-rc1-mm4/drivers/video/i810/i810_main.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/i810/i810_main.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/i810/i810_main.c 2004-09-10 21:32:01.808208824 +0800
@@ -1980,7 +1980,11 @@ static void __exit i810fb_remove_pci(str
#ifndef MODULE
int __init i810fb_init(void)
{
- i810fb_setup(fb_get_options("i810fb"));
+ char *option = NULL;
+
+ if (fb_get_options("i810fb", &option))
+ return -ENODEV;
+ i810fb_setup(option);
if (pci_register_driver(&i810fb_driver) > 0)
return 0;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/igafb.c linux-2.6.9-rc1-mm4/drivers/video/igafb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/igafb.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/igafb.c 2004-09-10 21:32:01.812208216 +0800
@@ -381,6 +381,9 @@ int __init igafb_init(void)
unsigned long addr;
int size, iga2000 = 0;
+ if (fb_get_options("igafb", NULL))
+ return -ENODEV;
+
/* Do not attach when we have a serial console. */
if (!con_is_present())
return -ENXIO;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/imsttfb.c linux-2.6.9-rc1-mm4/drivers/video/imsttfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/imsttfb.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/imsttfb.c 2004-09-10 21:32:01.816207608 +0800
@@ -1604,7 +1604,12 @@ imsttfb_setup(char *options)
int __init imsttfb_init(void)
{
#ifndef MODULE
- imsttfb_setup(fb_get_options("imsttfb"));
+ char *option = NULL;
+
+ if (fb_get_options("imsttfb", &option))
+ return -ENODEV;
+
+ imsttfb_setup(option);
#endif
return pci_module_init(&imsttfb_pci_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/kyro/fbdev.c linux-2.6.9-rc1-mm4/drivers/video/kyro/fbdev.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/kyro/fbdev.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/kyro/fbdev.c 2004-09-10 21:32:01.820207000 +0800
@@ -789,7 +789,11 @@ static void __devexit kyrofb_remove(stru
int __init kyrofb_init(void)
{
#ifndef MODULE
- kyrofb_setup(fb_get_options("kyrofb"));
+ char *option = NULL;
+
+ if (fb_get_options("kyrofb", &option))
+ return -ENODEV;
+ kyrofb_setup(option);
#endif
return pci_module_init(&kyrofb_pci_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/leo.c linux-2.6.9-rc1-mm4/drivers/video/leo.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/leo.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/leo.c 2004-09-10 21:32:01.823206544 +0800
@@ -626,6 +626,9 @@ int __init leo_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("leofb", NULL))
+ return -ENODEV;
+
for_all_sbusdev(sdev, sbus) {
if (!strcmp(sdev->prom_name, "leo"))
leo_init_one(sdev);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/macfb.c linux-2.6.9-rc1-mm4/drivers/video/macfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/macfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/macfb.c 2004-09-10 21:32:01.827205936 +0800
@@ -614,8 +614,11 @@ void __init macfb_init(void)
{
int video_cmap_len, video_is_nubus = 0;
struct nubus_dev* ndev = NULL;
+ char *option = NULL;
- macfb_setup(fb_get_options("macfb"));
+ if (fb_get_options("macfb", &option))
+ return -ENODEV;
+ macfb_setup(option);
if (!MACH_IS_MAC)
return;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/matrox/matroxfb_base.c linux-2.6.9-rc1-mm4/drivers/video/matrox/matroxfb_base.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/matrox/matroxfb_base.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/matrox/matroxfb_base.c 2004-09-10 21:32:01.831205328 +0800
@@ -2416,9 +2416,13 @@ static int __initdata initialized = 0;
int __init matroxfb_init(void)
{
+ char *option = NULL;
+
DBG(__FUNCTION__)
- matroxfb_setup(fb_get_options("matroxfb"));
+ if (fb_get_options("matroxfb", &option))
+ return -ENODEV;
+ matroxfb_setup(option);
if (disabled)
return -ENXIO;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/matrox/matroxfb_crtc2.c linux-2.6.9-rc1-mm4/drivers/video/matrox/matroxfb_crtc2.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/matrox/matroxfb_crtc2.c 2004-09-08 12:44:12.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/matrox/matroxfb_crtc2.c 2004-09-10 21:32:01.835204720 +0800
@@ -721,6 +721,9 @@ static struct matroxfb_driver crtc2 = {
.remove = matroxfb_crtc2_remove };
static int matroxfb_crtc2_init(void) {
+ if (fb_get_options("matrox_crtc2fb", NULL))
+ return -ENODEV;
+
matroxfb_register_driver(&crtc2);
return 0;
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/maxinefb.c linux-2.6.9-rc1-mm4/drivers/video/maxinefb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/maxinefb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/maxinefb.c 2004-09-10 21:32:01.838204264 +0800
@@ -126,6 +126,9 @@ int __init maxinefb_init(void)
unsigned long fb_start;
int i;
+ if (fb_get_options("maxinefb", NULL))
+ return -ENODEV;
+
/* Validate we're on the proper machine type */
if (mips_machtype != MACH_DS5000_XX) {
return -EINVAL;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/neofb.c linux-2.6.9-rc1-mm4/drivers/video/neofb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/neofb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/neofb.c 2004-09-10 21:32:01.842203656 +0800
@@ -2268,7 +2268,11 @@ int __init neofb_setup(char *options)
int __init neofb_init(void)
{
#ifndef MODULE
- neofb_setup(fb_get_options("neofb"));
+ char *option = NULL;
+
+ if (fb_get_options("neofb", &option))
+ return -ENODEV;
+ neofb_setup(option);
#endif
return pci_register_driver(&neofb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/offb.c linux-2.6.9-rc1-mm4/drivers/video/offb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/offb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/offb.c 2004-09-10 21:32:01.846203048 +0800
@@ -247,10 +247,15 @@ int __init offb_init(void)
{
struct device_node *dp;
unsigned int dpy;
+ char *option = NULL;
#if defined(CONFIG_BOOTX_TEXT) && defined(CONFIG_PPC32)
struct device_node *displays = find_type_devices("display");
struct device_node *macos_display = NULL;
+#endif
+ if (fb_get_options("offb", NULL))
+ return -ENODEV;
+#if defined(CONFIG_BOOTX_TEXT) && defined(CONFIG_PPC32)
/* If we're booted from BootX... */
if (prom_num_displays == 0 && boot_infos != 0) {
unsigned long addr =
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/p9100.c linux-2.6.9-rc1-mm4/drivers/video/p9100.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/p9100.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/p9100.c 2004-09-10 21:32:01.849202592 +0800
@@ -340,6 +340,9 @@ int __init p9100_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("p9100fb", NULL))
+ return -ENODEV;
+
for_all_sbusdev(sdev, sbus) {
if (!strcmp(sdev->prom_name, "p9100"))
p9100_init_one(sdev);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/platinumfb.c linux-2.6.9-rc1-mm4/drivers/video/platinumfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/platinumfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/platinumfb.c 2004-09-10 21:32:01.852202136 +0800
@@ -668,7 +668,11 @@ static struct of_platform_driver platinu
int __init platinumfb_init(void)
{
#ifndef MODULE
- platinumfb_setup(fb_get_options("platinumfb"));
+ char *option = NULL;
+
+ if (fb_get_options("platinumfb", &option))
+ return -ENODEV;
+ platinumfb_setup(option);
#endif
of_register_driver(&platinum_driver);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/pm2fb.c linux-2.6.9-rc1-mm4/drivers/video/pm2fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/pm2fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/pm2fb.c 2004-09-10 21:32:01.856201528 +0800
@@ -1220,7 +1220,11 @@ int __init pm2fb_setup(char *options);
int __init pm2fb_init(void)
{
#ifndef MODULE
- pm2fb_setup(fb_get_options("pm2fb"));
+ char *option = NULL;
+
+ if (fb_get_options("pm2fb", &option))
+ return -ENODEV;
+ pm2fb_setup(option);
#endif
return pci_module_init(&pm2fb_driver);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/pmag-ba-fb.c linux-2.6.9-rc1-mm4/drivers/video/pmag-ba-fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/pmag-ba-fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/pmag-ba-fb.c 2004-09-10 21:32:01.859201072 +0800
@@ -160,6 +160,9 @@ int __init pmagbafb_init(void)
int sid;
int found = 0;
+ if (fb_get_options("pmagbafb", NULL))
+ return -ENODEV;
+
if (TURBOCHANNEL) {
while ((sid = search_tc_card("PMAG-BA")) >= 0) {
found = 1;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/pmagb-b-fb.c linux-2.6.9-rc1-mm4/drivers/video/pmagb-b-fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/pmagb-b-fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/pmagb-b-fb.c 2004-09-10 21:32:01.862200616 +0800
@@ -163,6 +163,9 @@ int __init pmagbbfb_init(void)
int sid;
int found = 0;
+ if (fb_get_options("pmagbbfb", NULL))
+ return -ENODEV;
+
if (TURBOCHANNEL) {
while ((sid = search_tc_card("PMAGB-BA")) >= 0) {
found = 1;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/pvr2fb.c linux-2.6.9-rc1-mm4/drivers/video/pvr2fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/pvr2fb.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/pvr2fb.c 2004-09-10 21:32:01.866200008 +0800
@@ -1059,7 +1059,11 @@ int __init pvr2fb_init(void)
int size;
#ifndef MODULE
- pvr2fb_setup(fb_get_options("pvr2fb"));
+ char *option = NULL;
+
+ if (fb_get_options("pvr2fb", &option))
+ return -ENODEV;
+ pvr2fb_setup(option);
#endif
size = sizeof(struct fb_info) + sizeof(struct pvr2fb_par) + 16 * sizeof(u32);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/pxafb.c linux-2.6.9-rc1-mm4/drivers/video/pxafb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/pxafb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/pxafb.c 2004-09-10 21:32:01.869199552 +0800
@@ -1377,7 +1377,11 @@ MODULE_PARM_DESC(options, "LCD parameter
int __devinit pxafb_init(void)
{
#ifndef MODULE
- pxafb_setup(fb_get_options("pxafb"));
+ char *option = NULL;
+
+ if (fb_get_options("pxafb", &option))
+ return -ENODEV;
+ pxafb_setup(option);
#endif
return driver_register(&pxafb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/q40fb.c linux-2.6.9-rc1-mm4/drivers/video/q40fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/q40fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/q40fb.c 2004-09-10 21:32:01.873198944 +0800
@@ -143,6 +143,9 @@ int __init q40fb_init(void)
{
int ret = 0;
+ if (fb_get_options("q40fb", NULL))
+ return -ENODEV;
+
ret = driver_register(&q40fb_driver);
if (!ret) {
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/radeonfb.c linux-2.6.9-rc1-mm4/drivers/video/radeonfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/radeonfb.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/radeonfb.c 2004-09-10 21:32:01.877198336 +0800
@@ -3137,7 +3137,11 @@ int __init radeonfb_old_setup (char *opt
int __init radeonfb_old_init (void)
{
#ifndef MODULE
- radeonfb_old_setup(fb_get_options("radeonfb_old"));
+ char *option = NULL;
+
+ if (fb_get_options("radeonfb_old", &option))
+ return -ENODEV;
+ radeonfb_old_setup(option);
#endif
return pci_module_init (&radeonfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/riva/fbdev.c linux-2.6.9-rc1-mm4/drivers/video/riva/fbdev.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/riva/fbdev.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/riva/fbdev.c 2004-09-10 21:32:01.882197576 +0800
@@ -2133,7 +2133,11 @@ static struct pci_driver rivafb_driver =
int __devinit rivafb_init(void)
{
#ifndef MODULE
- rivafb_setup(fb_get_options("rivafb"));
+ char *option = NULL;
+
+ if (fb_get_options("rivafb", &option))
+ return -ENODEV;
+ rivafb_setup(option);
#endif
if (pci_register_driver(&rivafb_driver) > 0)
return 0;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/sa1100fb.c linux-2.6.9-rc1-mm4/drivers/video/sa1100fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/sa1100fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/sa1100fb.c 2004-09-10 21:32:01.886196968 +0800
@@ -1804,6 +1804,9 @@ static struct device_driver sa1100fb_dri
int __init sa1100fb_init(void)
{
+ if (fb_get_options("sa1100fb", NULL))
+ return -ENODEV;
+
return driver_register(&sa1100fb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/sgivwfb.c linux-2.6.9-rc1-mm4/drivers/video/sgivwfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/sgivwfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/sgivwfb.c 2004-09-10 21:32:01.890196360 +0800
@@ -870,7 +870,11 @@ int __init sgivwfb_init(void)
int ret;
#ifndef MODULE
- sgivwfb_setup(fb_get_options("sgivwfb"));
+ char *option = NULL;
+
+ if (fb_get_options("sgivwfb", &option))
+ return -ENODEV;
+ sgivwfb_setup(option);
#endif
ret = driver_register(&sgivwfb_driver);
if (!ret) {
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/sis/sis_main.c linux-2.6.9-rc1-mm4/drivers/video/sis/sis_main.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/sis/sis_main.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/sis/sis_main.c 2004-09-10 21:32:01.897195296 +0800
@@ -5720,7 +5720,11 @@ int __init sisfb_init(void)
{
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
#ifndef MODULE
- sisfb_setup(fb_get_options("sisfb"));
+ char *option = NULL;
+
+ if (fb_get_options("sisfb", &option))
+ return -ENODEV;
+ sisfb_setup(option);
#endif
#endif
return(pci_module_init(&sisfb_driver));
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/skeletonfb.c linux-2.6.9-rc1-mm4/drivers/video/skeletonfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/skeletonfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/skeletonfb.c 2004-09-10 21:32:01.901194688 +0800
@@ -586,7 +586,11 @@ static void __exit xxxfb_cleanup(void)
* For kernel boot options (in 'video=xxxfb:<options>' format)
*/
#ifndef MODULE
- xxxfb_setup(fb_get_options("xxxfb"));
+ char *option = NULL;
+
+ if (fb_get_options("xxxfb", &option))
+ return -ENODEV;
+ xxxfb_setup(option);
#endif
/*
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/sstfb.c linux-2.6.9-rc1-mm4/drivers/video/sstfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/sstfb.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/sstfb.c 2004-09-10 21:32:01.905194080 +0800
@@ -1573,7 +1573,11 @@ static struct pci_driver sstfb_driver =
int __devinit sstfb_init(void)
{
#ifndef MODULE
- sstfb_setup(fb_get_options("sstfb"));
+ char *option = NULL;
+
+ if (fb_get_options("sstfb", &option))
+ return -ENODEV;
+ sstfb_setup(option);
#endif
return pci_module_init(&sstfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/stifb.c linux-2.6.9-rc1-mm4/drivers/video/stifb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/stifb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/stifb.c 2004-09-10 21:32:01.909193472 +0800
@@ -1386,7 +1386,11 @@ stifb_init(void)
int i;
#ifndef MODULE
- stifb_setup(fb_get_options("stifb"));
+ char *option = NULL;
+
+ if (fb_get_options("stifb", &option))
+ return -ENODEV;
+ stifb_setup(option);
#endif
if (stifb_disabled) {
printk(KERN_INFO "stifb: disabled by \"stifb=off\" kernel parameter\n");
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/tcx.c linux-2.6.9-rc1-mm4/drivers/video/tcx.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/tcx.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/tcx.c 2004-09-10 21:32:01.913192864 +0800
@@ -468,6 +468,9 @@ int __init tcx_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("tcxfb", NULL))
+ return -ENODEV;
+
for_all_sbusdev(sdev, sbus) {
if (!strcmp(sdev->prom_name, "tcx"))
tcx_init_one(sdev);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/tdfxfb.c linux-2.6.9-rc1-mm4/drivers/video/tdfxfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/tdfxfb.c 2004-09-10 05:28:42.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/tdfxfb.c 2004-09-10 21:32:01.916192408 +0800
@@ -1359,7 +1359,12 @@ static void __devexit tdfxfb_remove(stru
int __init tdfxfb_init(void)
{
#ifndef MODULE
- tdfxfb_setup(fb_get_options("tdfxfb"));
+ char *option = NULL;
+
+ if (fb_get_options("tdfxfb", &option))
+ return -ENODEV;
+
+ tdfxfb_setup(option);
#endif
return pci_module_init(&tdfxfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/tgafb.c linux-2.6.9-rc1-mm4/drivers/video/tgafb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/tgafb.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/tgafb.c 2004-09-10 21:32:01.920191800 +0800
@@ -1528,7 +1528,11 @@ int __init
tgafb_init(void)
{
#ifndef MODULE
- tgafb_setup(fb_get_options("tgafb"));
+ char *option = NULL;
+
+ if (fb_get_options("tgafb", &option))
+ return -ENODEV;
+ tgafb_setup(option);
#endif
return pci_module_init(&tgafb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/tridentfb.c linux-2.6.9-rc1-mm4/drivers/video/tridentfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/tridentfb.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/tridentfb.c 2004-09-10 21:32:01.924191192 +0800
@@ -1224,7 +1224,11 @@ int tridentfb_setup(char *options);
int __init tridentfb_init(void)
{
#ifndef MODULE
- tridentfb_setup(fb_get_options("tridentfb"));
+ char *option = NULL;
+
+ if (fb_get_options("tridentfb", &option))
+ return -ENODEV;
+ tridentfb_setup(option);
#endif
output("Trident framebuffer %s initializing\n", VERSION);
return pci_module_init(&tridentfb_pci_driver);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/tx3912fb.c linux-2.6.9-rc1-mm4/drivers/video/tx3912fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/tx3912fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/tx3912fb.c 2004-09-10 21:32:01.927190736 +0800
@@ -217,8 +217,11 @@ int __init tx3912fb_init(void)
{
u_long tx3912fb_paddr = 0;
int size = (info->var.bits_per_pixel == 8) ? 256 : 16;
+ char *option = NULL;
- tx3912fb_setup(fb_get_options("tx3912fb"));
+ if (fb_get_options("tx3912fb", &option))
+ return -ENODEV;
+ tx3912fb_setup(option);
/* Disable the video logic */
outl(inl(TX3912_VIDEO_CTRL1) &
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/valkyriefb.c linux-2.6.9-rc1-mm4/drivers/video/valkyriefb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/valkyriefb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/valkyriefb.c 2004-09-10 21:32:01.930190280 +0800
@@ -322,8 +322,11 @@ int __init valkyriefb_init(void)
struct fb_info_valkyrie *p;
unsigned long frame_buffer_phys, cmap_regs_phys, flags;
int err;
+ char *option = NULL;
- valkyriefb_setup(fb_get_options("valkyriefb"));
+ if (fb_get_options("valkyriefb", &option))
+ return -ENODEV;
+ valkyriefb_setup(option);
#ifdef CONFIG_MAC
if (!MACH_IS_MAC)
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/vesafb.c linux-2.6.9-rc1-mm4/drivers/video/vesafb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/vesafb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/vesafb.c 2004-09-10 21:32:01.934189672 +0800
@@ -410,8 +410,11 @@ static struct platform_device vesafb_dev
int __init vesafb_init(void)
{
int ret;
+ char *option = NULL;
- vesafb_setup(fb_get_options("vesafb"));
+ /* ignore error return of fb_get_options */
+ fb_get_options("vesafb", &option);
+ vesafb_setup(option);
ret = driver_register(&vesafb_driver);
if (!ret) {
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/vfb.c linux-2.6.9-rc1-mm4/drivers/video/vfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/vfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/vfb.c 2004-09-10 21:32:01.937189216 +0800
@@ -497,7 +497,11 @@ int __init vfb_init(void)
int ret = 0;
#ifndef MODULE
- vfb_setup(fb_get_options("vfb"));
+ char *option = NULL;
+
+ if (fb_get_options("vfb", &option))
+ return -ENODEV;
+ vfb_setup(option);
#endif
if (!vfb_enable)
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/vga16fb.c linux-2.6.9-rc1-mm4/drivers/video/vga16fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/vga16fb.c 2004-09-10 05:28:48.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/vga16fb.c 2004-09-10 21:32:01.940188760 +0800
@@ -1342,9 +1342,13 @@ int __init vga16fb_init(void)
{
int i;
int ret;
-
#ifndef MODULE
- vga16fb_setup(fb_get_options("vga16fb"));
+ char *option = NULL;
+
+ if (fb_get_options("vga16fb", &option))
+ return -ENODEV;
+
+ vga16fb_setup(option);
#endif
printk(KERN_DEBUG "vga16fb: initializing\n");
diff -uprN linux-2.6.9-rc1-mm4-orig/include/linux/fb.h linux-2.6.9-rc1-mm4/include/linux/fb.h
--- linux-2.6.9-rc1-mm4-orig/include/linux/fb.h 2004-09-10 05:29:28.000000000 +0800
+++ linux-2.6.9-rc1-mm4/include/linux/fb.h 2004-09-10 21:36:55.522557456 +0800
@@ -789,7 +789,7 @@ extern void fb_sysmove_buf_aligned(struc
extern void fb_load_cursor_image(struct fb_info *);
extern void fb_set_suspend(struct fb_info *info, int state);
extern int fb_get_color_depth(struct fb_info *info);
-extern char* fb_get_options(char *name);
+extern int fb_get_options(char *name, char **option);
extern struct fb_info *registered_fb[FB_MAX];
extern int num_registered_fb;
On Saturday 11 September 2004 01:52, David Eger wrote:
> On Fri, Sep 10, 2004 at 01:28:57PM +0800, Antonino A. Daplas wrote:
> > On Friday 10 September 2004 10:23, Benjamin Herrenschmidt wrote:
> > > Recent changes upstream are breaking fbdev on pmacs.
> > >
> > > I haven't had time to go deep into that (but I suspect Linus sees it
> > > too on his own g5 unless he removed offb from his .config).
> > >
> > > From what I see, it seems that offb is kicking in by default, reserves
> > > the mmio regions, and then whatever chip driver loads can't access
> > > them.
> > >
> > > offb is supposed to be a "fallback" driver in case no fbdev is taking
> > > over, it should also be "forced" in with video=ofonly kernel command
> > > line. This logic has been broken.
>
> I dearly *hope* this is what I'm seeing with recent kernels, though I
> have my doubts.... What I *do* know is that with recent bk snapshots
> (post bk-1.2115) I have the following: radeonfb seems to load, but when I
> try to load X, my y-resolution seems to be half of what it ought to be...
X-fbdev, or X + native radeon driver? Do still get a framebuffer console?
Any other fb apps you have that's also broken?
Not sure why that happens. Note that the fbdev changes in the latest bk are
mostly driver specific changes and the initialization code cleanup which I'm
addressing at the moment.
Tony
On Sat, Sep 11, 2004 at 05:27:05AM +0800, Antonino A. Daplas wrote:
> On Saturday 11 September 2004 01:52, David Eger wrote:
> > On Fri, Sep 10, 2004 at 01:28:57PM +0800, Antonino A. Daplas wrote:
> > > On Friday 10 September 2004 10:23, Benjamin Herrenschmidt wrote:
> > > > Recent changes upstream are breaking fbdev on pmacs.
> > > >
> > > > From what I see, it seems that offb is kicking in by default, reserves
> > > > the mmio regions, and then whatever chip driver loads can't access
> > > > them.
> > > >
> > > > offb is supposed to be a "fallback" driver in case no fbdev is taking
> > > > over, it should also be "forced" in with video=ofonly kernel command
> > > > line. This logic has been broken.
> >
> > I *hope* this is what I'm seeing with recent kernels, though I
> > have my doubts.... What I *do* know is that with recent bk snapshots
> > (post bk-1.2115) I have the following: radeonfb seems to load, but when I
> > try to load X, my y-resolution seems to be half of what it ought to be...
>
> X-fbdev, or X + native radeon driver? Do still get a framebuffer console?
> Any other fb apps you have that's also broken?
Hold my tongue: BenH's latest patch (already in mainline) fixes it for me.
-David
On Sat, 2004-09-11 at 07:04, Antonino A. Daplas wrote:
> Hi Ben,
>
> How about this patch? This brings back the old way of setting up the
> drivers, supports:
>
> video=xxxfb:off
> video=ofonly
>
> Your patch that brings offb to the very last of the Makefile is needed.
Looks good !
Ben.
On Friday 10 September 2004 16:35, Antonino A. Daplas wrote:
>
> > > what about failing register_framebuffer for anything but offb ?
> >
> > Humm, indeed hackerish...
> >
> > But the advantage of this is that we can finally exercise the failure
> > path of many frame buffer device drivers in the wild ;-)
>
> Assuming, as I've mentioned in another thread, that info->fix.name ==
> to video=xxxfb.
>
Sorry Geert, I misinterpret. And you are correct, but that will be scary :-)
Tony
On Fri, 10 Sep 2004, Antonino A. Daplas wrote:
> On Friday 10 September 2004 10:23, Benjamin Herrenschmidt wrote:
> > Recent changes upstream are breaking fbdev on pmacs.
> >
> > I haven't had time to go deep into that (but I suspect Linus sees it
> > too on his own g5 unless he removed offb from his .config).
> >
> > From what I see, it seems that offb is kicking in by default, reserves
> > the mmio regions, and then whatever chip driver loads can't access them.
> >
> > offb is supposed to be a "fallback" driver in case no fbdev is taking
> > over, it should also be "forced" in with video=ofonly kernel command
> > line. This logic has been broken.
>
> Actually, I was thinking about this problem with offb. I was planning on
> adding video=offb:off support for offb, and then place offb at the very top
> drivers Makefile (the reason why I placed it there, but forgot to add the
> setup support for offb). So, without the 'off' option, offb becomes the
> first driver that gets initialized by reason that it's at the top, and with
> the 'off' option, it just exits initialization immediately, giving the other
> drivers a chance to get through.
This is not suitable, since for dual-headed machines, you may want to have one
card driven by its native driver, and the other by offb (as fallback, because
no driver exists yet).
> The second method is not harder but will involve, again, changes to all
> drivers. The only sane method I can think of is to change fb_get_options so
> it returns an error if:
>
> a. "off" option is enabled
> b. "ofonly" is enabled but only if name != "offb"
>
> If fb_get_options returns an error, drivers will not proceed with their
> initialization. The second method is more compatible with the
> previous setup semantics.
Yes, looks better (except that it's less clean, but I'm afraid we can't fix
that easily).
Gr{oetje,eeting}s,
Geert
--
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- [email protected]
In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
-- Linus Torvalds
On Sat, Sep 11, 2004 at 05:04:09AM +0800, Antonino A. Daplas wrote:
> Hi Ben,
>
> How about this patch? This brings back the old way of setting up the
> drivers, supports:
>
> video=xxxfb:off
> video=ofonly
>
> Your patch that brings offb to the very last of the Makefile is needed.
Applying these two patches to 2.6.9-rc1-mm4 makes the framebuffer
console on my Powermac work again. This box has an ATI RAGE chip on
the motherboard I don't often use, so being able to do video=atyfb:off
lets me keep the driver around -- thanks!
--
Joseph Fannin
[email protected]
"Bull in pure form is rare; there is usually some contamination by data."
-- William Graves Perry Jr.
On Sat, 2004-09-11 at 07:04, Antonino A. Daplas wrote:
> How about this patch? This brings back the old way of setting up the
> drivers, supports:
>
> video=xxxfb:off
> video=ofonly
Andrew, Any reason why this patch isn't upstream ? The recent changes
to fbdev in 2.6.9-* are a regression and we need this patch to get bac
the video=ofonly feature.
It's quite important especially on older or very new hardware whre the
video chip may not work properly with the kernel built-in driver.
Signed-off-by: Antonino Daplas <[email protected]>
---
drivers/video/68328fb.c | 6 +++-
drivers/video/acornfb.c | 6 +++-
drivers/video/amba-clcd.c | 2 +
drivers/video/amifb.c | 6 +++-
drivers/video/asiliantfb.c | 3 ++
drivers/video/aty/aty128fb.c | 11 +++++++-
drivers/video/aty/atyfb_base.c | 19 ++++++++++----
drivers/video/aty/radeon_base.c | 6 +++-
drivers/video/bw2.c | 3 ++
drivers/video/cg14.c | 3 ++
drivers/video/cg3.c | 3 ++
drivers/video/cg6.c | 3 ++
drivers/video/chipsfb.c | 3 ++
drivers/video/cirrusfb.c | 6 +++-
drivers/video/clps711xfb.c | 3 ++
drivers/video/controlfb.c | 5 +++
drivers/video/cyber2000fb.c | 6 +++-
drivers/video/dnfb.c | 3 ++
drivers/video/epson1355fb.c | 3 ++
drivers/video/fbmem.c | 44 ++++++++++++++++++++--------------
drivers/video/ffb.c | 3 ++
drivers/video/fm2fb.c | 6 +++-
drivers/video/g364fb.c | 3 ++
drivers/video/gbefb.c | 6 +++-
drivers/video/hgafb.c | 3 ++
drivers/video/hitfb.c | 3 ++
drivers/video/hpfb.c | 3 ++
drivers/video/i810/i810_main.c | 6 +++-
drivers/video/igafb.c | 3 ++
drivers/video/imsttfb.c | 7 ++++-
drivers/video/kyro/fbdev.c | 6 +++-
drivers/video/leo.c | 3 ++
drivers/video/macfb.c | 5 +++
drivers/video/matrox/matroxfb_base.c | 6 +++-
drivers/video/matrox/matroxfb_crtc2.c | 3 ++
drivers/video/maxinefb.c | 3 ++
drivers/video/neofb.c | 6 +++-
drivers/video/offb.c | 5 +++
drivers/video/p9100.c | 3 ++
drivers/video/platinumfb.c | 6 +++-
drivers/video/pm2fb.c | 6 +++-
drivers/video/pmag-ba-fb.c | 3 ++
drivers/video/pmagb-b-fb.c | 3 ++
drivers/video/pvr2fb.c | 6 +++-
drivers/video/pxafb.c | 6 +++-
drivers/video/q40fb.c | 3 ++
drivers/video/radeonfb.c | 6 +++-
drivers/video/riva/fbdev.c | 6 +++-
drivers/video/sa1100fb.c | 3 ++
drivers/video/sgivwfb.c | 6 +++-
drivers/video/sis/sis_main.c | 6 +++-
drivers/video/skeletonfb.c | 6 +++-
drivers/video/sstfb.c | 6 +++-
drivers/video/stifb.c | 6 +++-
drivers/video/tcx.c | 3 ++
drivers/video/tdfxfb.c | 7 ++++-
drivers/video/tgafb.c | 6 +++-
drivers/video/tridentfb.c | 6 +++-
drivers/video/tx3912fb.c | 5 +++
drivers/video/valkyriefb.c | 5 +++
drivers/video/vesafb.c | 5 +++
drivers/video/vfb.c | 6 +++-
drivers/video/vga16fb.c | 8 ++++--
include/linux/fb.h | 2 -
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/68328fb.c linux-2.6.9-rc1-mm4/drivers/video/68328fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/68328fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/68328fb.c 2004-09-10 21:32:01.665230560 +0800
@@ -440,7 +440,11 @@ int __init mc68x328fb_setup(char *option
int __init mc68x328fb_init(void)
{
#ifndef MODULE
- mc68x328fb_setup(fb_get_options("68328fb"));
+ char *option = NULL;
+
+ if (fb_get_options("68328fb", &option))
+ return -ENODEV;
+ mc68x328fb_setup(option);
#endif
/*
* initialize the default mode from the LCD controller registers
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/acornfb.c linux-2.6.9-rc1-mm4/drivers/video/acornfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/acornfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/acornfb.c 2004-09-10 21:32:01.671229648 +0800
@@ -1291,8 +1291,12 @@ acornfb_init(void)
unsigned long size;
u_int h_sync, v_sync;
int rc, i;
+ char *option = NULL;
+
+ if (fb_get_options("acornfb", &option))
+ return -ENODEV;
+ acornfb_setup(option);
- acornfb_setup(fb_get_options("acornfb"));
acornfb_init_fbinfo();
current_par.dev = &acornfb_device;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/amba-clcd.c linux-2.6.9-rc1-mm4/drivers/video/amba-clcd.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/amba-clcd.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/amba-clcd.c 2004-09-10 21:32:01.676228888 +0800
@@ -496,6 +496,8 @@ static struct amba_driver clcd_driver =
int __init amba_clcdfb_init(void)
{
+ if (fb_get_options("ambafb", NULL))
+ return -ENODEV;
return amba_driver_register(&clcd_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/amifb.c linux-2.6.9-rc1-mm4/drivers/video/amifb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/amifb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/amifb.c 2004-09-10 21:32:01.683227824 +0800
@@ -2258,7 +2258,11 @@ int __init amifb_init(void)
u_int defmode;
#ifndef MODULE
- amifb_setup(fb_get_options("amifb"));
+ char *option = NULL;
+
+ if (fb_get_options("amifb", &option))
+ return -ENODEV;
+ amifb_setup(option);
#endif
if (!MACH_IS_AMIGA || !AMIGAHW_PRESENT(AMI_VIDEO))
return -ENXIO;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/asiliantfb.c linux-2.6.9-rc1-mm4/drivers/video/asiliantfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/asiliantfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/asiliantfb.c 2004-09-10 21:32:01.689226912 +0800
@@ -609,6 +609,9 @@ static struct pci_driver asiliantfb_driv
int __init asiliantfb_init(void)
{
+ if (fb_get_options("asiliantfb", NULL))
+ return -ENODEV;
+
return pci_module_init(&asiliantfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/aty/aty128fb.c linux-2.6.9-rc1-mm4/drivers/video/aty/aty128fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/aty/aty128fb.c 2004-09-08 12:44:12.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/aty/aty128fb.c 2004-09-10 21:32:01.695226000 +0800
@@ -2439,6 +2439,14 @@ static int aty128_pci_resume(struct pci_
int __init aty128fb_init(void)
{
+#ifndef MODULE
+ char *option = NULL;
+
+ if (fb_get_options("aty128fb", &option))
+ return -ENODEV;
+ aty128fb_setup(option);
+#endif
+
return pci_module_init(&aty128fb_driver);
}
@@ -2447,8 +2455,9 @@ static void __exit aty128fb_exit(void)
pci_unregister_driver(&aty128fb_driver);
}
-#ifdef MODULE
module_init(aty128fb_init);
+
+#ifdef MODULE
module_exit(aty128fb_exit);
MODULE_AUTHOR("(c)1999-2003 Brad Douglas <[email protected]>");
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/aty/atyfb_base.c linux-2.6.9-rc1-mm4/drivers/video/aty/atyfb_base.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/aty/atyfb_base.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/aty/atyfb_base.c 2004-09-10 21:32:01.702224936 +0800
@@ -1902,12 +1902,8 @@ static int __init aty_init(struct fb_inf
return 1;
}
-int __init atyfb_init(void)
+static int __init atyfb_do_init(void)
{
-#ifndef MODULE
- atyfb_setup(fb_get_options("atyfb"));
-#endif
-
#if defined(CONFIG_PCI)
unsigned long addr, res_start, res_size;
struct atyfb_par *default_par;
@@ -2381,6 +2377,19 @@ int __init atyfb_init(void)
return 0;
}
+int __init atyfb_init(void)
+{
+#ifndef MODULE
+ char *option = NULL;
+
+ if (fb_get_options("atyfb", &option))
+ return -ENODEV;
+ atyfb_setup(option);
+#endif
+ return atyfb_do_init();
+}
+
+
#ifndef MODULE
int __init atyfb_setup(char *options)
{
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/aty/radeon_base.c linux-2.6.9-rc1-mm4/drivers/video/aty/radeon_base.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/aty/radeon_base.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/aty/radeon_base.c 2004-09-10 21:32:01.708224024 +0800
@@ -2443,7 +2443,11 @@ int __init radeonfb_setup (char *options
int __init radeonfb_init (void)
{
#ifndef MODULE
- radeonfb_setup(fb_get_options("radeonfb"));
+ char *option = NULL;
+
+ if (fb_get_options("radeonfb", &option))
+ return -ENODEV;
+ radeonfb_setup(option);
#endif
return pci_module_init (&radeonfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/bw2.c linux-2.6.9-rc1-mm4/drivers/video/bw2.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/bw2.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/bw2.c 2004-09-10 21:32:01.714223112 +0800
@@ -386,6 +386,9 @@ int __init bw2_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("bw2fb", &option))
+ return -ENODEV;
+
#ifdef CONFIG_SUN4
bw2_init_one(NULL);
#endif
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/cg14.c linux-2.6.9-rc1-mm4/drivers/video/cg14.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/cg14.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/cg14.c 2004-09-10 21:32:01.719222352 +0800
@@ -584,6 +584,9 @@ int __init cg14_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("cg14fb", NULL))
+ return -ENODEV;
+
#ifdef CONFIG_SPARC32
{
int root, node;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/cg3.c linux-2.6.9-rc1-mm4/drivers/video/cg3.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/cg3.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/cg3.c 2004-09-10 21:32:01.724221592 +0800
@@ -444,6 +444,9 @@ int __init cg3_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("cg3fb", NULL))
+ return -ENODEV;
+
for_all_sbusdev(sdev, sbus) {
if (!strcmp(sdev->prom_name, "cgthree") ||
!strcmp(sdev->prom_name, "cgRDI"))
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/cg6.c linux-2.6.9-rc1-mm4/drivers/video/cg6.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/cg6.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/cg6.c 2004-09-10 21:32:01.729220832 +0800
@@ -760,6 +760,9 @@ int __init cg6_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("cg6fb", NULL))
+ return -ENODEV;
+
for_all_sbusdev(sdev, sbus) {
if (!strcmp(sdev->prom_name, "cgsix") ||
!strcmp(sdev->prom_name, "cgthree+"))
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/chipsfb.c linux-2.6.9-rc1-mm4/drivers/video/chipsfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/chipsfb.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/chipsfb.c 2004-09-10 21:32:01.734220072 +0800
@@ -462,6 +462,9 @@ static struct pci_driver chipsfb_driver
int __init chips_init(void)
{
+ if (fb_get_options("chipsfb", NULL))
+ return -ENODEV;
+
return pci_module_init(&chipsfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/cirrusfb.c linux-2.6.9-rc1-mm4/drivers/video/cirrusfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/cirrusfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/cirrusfb.c 2004-09-10 21:32:01.741219008 +0800
@@ -2607,7 +2607,11 @@ int __init cirrusfb_init(void)
int error = 0;
#ifndef MODULE
- cirrusfb_setup(fb_get_options("cirrusfb"));
+ char *option = NULL;
+
+ if (fb_get_options("cirrusfb", &option))
+ return -ENODEV;
+ cirrusfb_setup(option);
#endif
#ifdef CONFIG_ZORRO
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/clps711xfb.c linux-2.6.9-rc1-mm4/drivers/video/clps711xfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/clps711xfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/clps711xfb.c 2004-09-10 21:32:01.747218096 +0800
@@ -364,6 +364,9 @@ int __init clps711xfb_init(void)
{
int err = -ENOMEM;
+ if (fb_get_options("clps711xfb", NULL))
+ return -ENODEV;
+
cfb = kmalloc(sizeof(*cfb), GFP_KERNEL);
if (!cfb)
goto out;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/controlfb.c linux-2.6.9-rc1-mm4/drivers/video/controlfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/controlfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/controlfb.c 2004-09-10 21:32:01.752217336 +0800
@@ -556,8 +556,11 @@ static void control_set_hardware(struct
int __init control_init(void)
{
struct device_node *dp;
+ char *option = NULL;
- control_setup(fb_get_options("controlfb"));
+ if (fb_get_options("controlfb", &option))
+ return -ENODEV;
+ control_setup(option);
dp = find_devices("control");
if (dp != 0 && !control_of_init(dp))
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/cyber2000fb.c linux-2.6.9-rc1-mm4/drivers/video/cyber2000fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/cyber2000fb.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/cyber2000fb.c 2004-09-10 21:32:01.758216424 +0800
@@ -1722,7 +1722,11 @@ int __init cyber2000fb_init(void)
int ret = -1, err;
#ifndef MODULE
- cyber2000fb_setup(fb_get_options("cyber200fb"));
+ char *option = NULL;
+
+ if (fb_get_options("cyber2000fb", NULL))
+ return -ENODEV;
+ cyber2000fb_setup(option);
#endif
#ifdef CONFIG_ARCH_SHARK
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/dnfb.c linux-2.6.9-rc1-mm4/drivers/video/dnfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/dnfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/dnfb.c 2004-09-10 21:32:01.763215664 +0800
@@ -284,6 +284,9 @@ int __init dnfb_init(void)
{
int ret;
+ if (fb_get_options("dnfb", NULL))
+ return -ENODEV;
+
ret = driver_register(&dnfb_driver);
if (!ret) {
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/epson1355fb.c linux-2.6.9-rc1-mm4/drivers/video/epson1355fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/epson1355fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/epson1355fb.c 2004-09-10 21:32:01.768214904 +0800
@@ -740,6 +740,9 @@ int __init epson1355fb_init(void)
{
int ret = 0;
+ if (fb_get_options("epson1355fb", NULL))
+ return -ENODEV;
+
ret = driver_register(&epson1355fb_driver);
if (!ret) {
ret = platform_device_register(&epson1355fb_device);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/fbmem.c linux-2.6.9-rc1-mm4/drivers/video/fbmem.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/fbmem.c 2004-09-10 05:29:28.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/fbmem.c 2004-09-10 21:32:01.774213992 +0800
@@ -1288,6 +1288,7 @@ module_init(fbmem_init);
#define NR_FB_DRIVERS 64
static char *video_options[NR_FB_DRIVERS];
+static int ofonly;
/**
* fb_get_options - get kernel boot parameters
@@ -1297,30 +1298,35 @@ static char *video_options[NR_FB_DRIVERS
*
* NOTE: Needed to maintain backwards compatibility
*/
-char* fb_get_options(char *name)
+int fb_get_options(char *name, char **option)
{
- char *option = NULL;
- char *opt;
- int opt_len;
+ char *opt, *options = NULL;
+ int opt_len, retval = 0;
int name_len = strlen(name), i;
- if (!name_len)
- return option;
+ if (name_len && ofonly && strncmp(name, "offb", 4))
+ retval = 1;
- for (i = 0; i < NR_FB_DRIVERS; i++) {
- if (video_options[i] == NULL)
- continue;
- opt_len = strlen(video_options[i]);
- if (!opt_len)
- continue;
- opt = video_options[i];
- if (!strncmp(name, opt, name_len) &&
- opt[name_len] == ':') {
- option = opt + name_len + 1;
- break;
+ if (name_len && !retval) {
+ for (i = 0; i < NR_FB_DRIVERS; i++) {
+ if (video_options[i] == NULL)
+ continue;
+ opt_len = strlen(video_options[i]);
+ if (!opt_len)
+ continue;
+ opt = video_options[i];
+ if (!strncmp(name, opt, name_len) &&
+ opt[name_len] == ':')
+ options = opt + name_len + 1;
}
}
- return option;
+ if (options && !strncmp(options, "off", 3))
+ retval = 1;
+
+ if (option)
+ *option = options;
+
+ return retval;
}
/**
@@ -1345,6 +1351,8 @@ int __init video_setup(char *options)
return 0;
for (i = 0; i < NR_FB_DRIVERS; i++) {
+ if (!strncmp(options, "ofonly", 6))
+ ofonly = 1;
if (video_options[i] == NULL) {
video_options[i] = options;
break;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/ffb.c linux-2.6.9-rc1-mm4/drivers/video/ffb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/ffb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/ffb.c 2004-09-10 21:32:01.779213232 +0800
@@ -1049,6 +1049,9 @@ int __init ffb_init(void)
{
int root;
+ if (fb_get_options("ffb", NULL))
+ return -ENODEV;
+
ffb_scan_siblings(prom_root_node);
root = prom_getchild(prom_root_node);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/fm2fb.c linux-2.6.9-rc1-mm4/drivers/video/fm2fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/fm2fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/fm2fb.c 2004-09-10 21:32:01.784212472 +0800
@@ -296,7 +296,11 @@ int __init fm2fb_setup(char *options);
int __init fm2fb_init(void)
{
- fm2fb_setup(fb_get_options("fb2fb"));
+ char *option = NULL;
+
+ if (fb_get_options("fm2fb", &option))
+ return -ENODEV;
+ fm2fb_setup(option);
return zorro_register_driver(&fm2fb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/g364fb.c linux-2.6.9-rc1-mm4/drivers/video/g364fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/g364fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/g364fb.c 2004-09-10 21:32:01.788211864 +0800
@@ -202,6 +202,9 @@ int __init g364fb_init(void)
(volatile unsigned int *) CURS_PAL_REG;
int mem, i, j;
+ if (fb_get_options("g364fb", NULL))
+ return -ENODEV;
+
/* TBD: G364 detection */
/* get the resolution set by ARC console */
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/gbefb.c linux-2.6.9-rc1-mm4/drivers/video/gbefb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/gbefb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/gbefb.c 2004-09-10 21:32:01.792211256 +0800
@@ -1084,7 +1084,11 @@ int __init gbefb_init(void)
int i, ret = 0;
#ifndef MODULE
- gbefb_setup(fb_get_options("gbefb"));
+ char *option = NULL;
+
+ if (fb_get_options("gbefb", &option))
+ return -ENODEV;
+ gbefb_setup(options);
#endif
if (!request_mem_region(GBE_BASE, sizeof(struct sgi_gbe), "GBE")) {
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/hgafb.c linux-2.6.9-rc1-mm4/drivers/video/hgafb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/hgafb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/hgafb.c 2004-09-10 21:32:01.797210496 +0800
@@ -547,6 +547,9 @@ static struct fb_ops hgafb_ops = {
int __init hgafb_init(void)
{
+ if (fb_get_options("hgafb", NULL))
+ return -ENODEV;
+
if (! hga_card_detect()) {
printk(KERN_INFO "hgafb: HGA card not detected.\n");
return -EINVAL;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/hitfb.c linux-2.6.9-rc1-mm4/drivers/video/hitfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/hitfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/hitfb.c 2004-09-10 21:32:01.801209888 +0800
@@ -270,6 +270,9 @@ int __init hitfb_init(void)
unsigned short lcdclor, ldr3, ldvndr;
int size;
+ if (fb_get_options("hitfb", NULL))
+ return -ENODEV;
+
hitfb_fix.smem_start = CONFIG_HD64461_IOBASE + 0x02000000;
hitfb_fix.smem_len = (MACH_HP690) ? 1024 * 1024 : 512 * 1024;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/hpfb.c linux-2.6.9-rc1-mm4/drivers/video/hpfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/hpfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/hpfb.c 2004-09-10 21:32:01.804209432 +0800
@@ -115,6 +115,9 @@ int __init hpfb_init_one(unsigned long b
{
unsigned long fboff;
+ if (fb_get_options("hpfb", NULL))
+ return -ENODEV;
+
fboff = (in_8(base + TOPCAT_FBOMSB) << 8) | in_8(base + TOPCAT_FBOLSB);
hpfb_fix.smem_start = 0xf0000000 | (in_8(base + fboff) << 16);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/i810/i810_main.c linux-2.6.9-rc1-mm4/drivers/video/i810/i810_main.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/i810/i810_main.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/i810/i810_main.c 2004-09-10 21:32:01.808208824 +0800
@@ -1980,7 +1980,11 @@ static void __exit i810fb_remove_pci(str
#ifndef MODULE
int __init i810fb_init(void)
{
- i810fb_setup(fb_get_options("i810fb"));
+ char *option = NULL;
+
+ if (fb_get_options("i810fb", &option))
+ return -ENODEV;
+ i810fb_setup(option);
if (pci_register_driver(&i810fb_driver) > 0)
return 0;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/igafb.c linux-2.6.9-rc1-mm4/drivers/video/igafb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/igafb.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/igafb.c 2004-09-10 21:32:01.812208216 +0800
@@ -381,6 +381,9 @@ int __init igafb_init(void)
unsigned long addr;
int size, iga2000 = 0;
+ if (fb_get_options("igafb", NULL))
+ return -ENODEV;
+
/* Do not attach when we have a serial console. */
if (!con_is_present())
return -ENXIO;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/imsttfb.c linux-2.6.9-rc1-mm4/drivers/video/imsttfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/imsttfb.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/imsttfb.c 2004-09-10 21:32:01.816207608 +0800
@@ -1604,7 +1604,12 @@ imsttfb_setup(char *options)
int __init imsttfb_init(void)
{
#ifndef MODULE
- imsttfb_setup(fb_get_options("imsttfb"));
+ char *option = NULL;
+
+ if (fb_get_options("imsttfb", &option))
+ return -ENODEV;
+
+ imsttfb_setup(option);
#endif
return pci_module_init(&imsttfb_pci_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/kyro/fbdev.c linux-2.6.9-rc1-mm4/drivers/video/kyro/fbdev.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/kyro/fbdev.c 2004-09-10 05:29:20.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/kyro/fbdev.c 2004-09-10 21:32:01.820207000 +0800
@@ -789,7 +789,11 @@ static void __devexit kyrofb_remove(stru
int __init kyrofb_init(void)
{
#ifndef MODULE
- kyrofb_setup(fb_get_options("kyrofb"));
+ char *option = NULL;
+
+ if (fb_get_options("kyrofb", &option))
+ return -ENODEV;
+ kyrofb_setup(option);
#endif
return pci_module_init(&kyrofb_pci_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/leo.c linux-2.6.9-rc1-mm4/drivers/video/leo.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/leo.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/leo.c 2004-09-10 21:32:01.823206544 +0800
@@ -626,6 +626,9 @@ int __init leo_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("leofb", NULL))
+ return -ENODEV;
+
for_all_sbusdev(sdev, sbus) {
if (!strcmp(sdev->prom_name, "leo"))
leo_init_one(sdev);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/macfb.c linux-2.6.9-rc1-mm4/drivers/video/macfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/macfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/macfb.c 2004-09-10 21:32:01.827205936 +0800
@@ -614,8 +614,11 @@ void __init macfb_init(void)
{
int video_cmap_len, video_is_nubus = 0;
struct nubus_dev* ndev = NULL;
+ char *option = NULL;
- macfb_setup(fb_get_options("macfb"));
+ if (fb_get_options("macfb", &option))
+ return -ENODEV;
+ macfb_setup(option);
if (!MACH_IS_MAC)
return;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/matrox/matroxfb_base.c linux-2.6.9-rc1-mm4/drivers/video/matrox/matroxfb_base.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/matrox/matroxfb_base.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/matrox/matroxfb_base.c 2004-09-10 21:32:01.831205328 +0800
@@ -2416,9 +2416,13 @@ static int __initdata initialized = 0;
int __init matroxfb_init(void)
{
+ char *option = NULL;
+
DBG(__FUNCTION__)
- matroxfb_setup(fb_get_options("matroxfb"));
+ if (fb_get_options("matroxfb", &option))
+ return -ENODEV;
+ matroxfb_setup(option);
if (disabled)
return -ENXIO;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/matrox/matroxfb_crtc2.c linux-2.6.9-rc1-mm4/drivers/video/matrox/matroxfb_crtc2.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/matrox/matroxfb_crtc2.c 2004-09-08 12:44:12.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/matrox/matroxfb_crtc2.c 2004-09-10 21:32:01.835204720 +0800
@@ -721,6 +721,9 @@ static struct matroxfb_driver crtc2 = {
.remove = matroxfb_crtc2_remove };
static int matroxfb_crtc2_init(void) {
+ if (fb_get_options("matrox_crtc2fb", NULL))
+ return -ENODEV;
+
matroxfb_register_driver(&crtc2);
return 0;
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/maxinefb.c linux-2.6.9-rc1-mm4/drivers/video/maxinefb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/maxinefb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/maxinefb.c 2004-09-10 21:32:01.838204264 +0800
@@ -126,6 +126,9 @@ int __init maxinefb_init(void)
unsigned long fb_start;
int i;
+ if (fb_get_options("maxinefb", NULL))
+ return -ENODEV;
+
/* Validate we're on the proper machine type */
if (mips_machtype != MACH_DS5000_XX) {
return -EINVAL;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/neofb.c linux-2.6.9-rc1-mm4/drivers/video/neofb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/neofb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/neofb.c 2004-09-10 21:32:01.842203656 +0800
@@ -2268,7 +2268,11 @@ int __init neofb_setup(char *options)
int __init neofb_init(void)
{
#ifndef MODULE
- neofb_setup(fb_get_options("neofb"));
+ char *option = NULL;
+
+ if (fb_get_options("neofb", &option))
+ return -ENODEV;
+ neofb_setup(option);
#endif
return pci_register_driver(&neofb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/offb.c linux-2.6.9-rc1-mm4/drivers/video/offb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/offb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/offb.c 2004-09-10 21:32:01.846203048 +0800
@@ -247,10 +247,15 @@ int __init offb_init(void)
{
struct device_node *dp;
unsigned int dpy;
+ char *option = NULL;
#if defined(CONFIG_BOOTX_TEXT) && defined(CONFIG_PPC32)
struct device_node *displays = find_type_devices("display");
struct device_node *macos_display = NULL;
+#endif
+ if (fb_get_options("offb", NULL))
+ return -ENODEV;
+#if defined(CONFIG_BOOTX_TEXT) && defined(CONFIG_PPC32)
/* If we're booted from BootX... */
if (prom_num_displays == 0 && boot_infos != 0) {
unsigned long addr =
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/p9100.c linux-2.6.9-rc1-mm4/drivers/video/p9100.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/p9100.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/p9100.c 2004-09-10 21:32:01.849202592 +0800
@@ -340,6 +340,9 @@ int __init p9100_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("p9100fb", NULL))
+ return -ENODEV;
+
for_all_sbusdev(sdev, sbus) {
if (!strcmp(sdev->prom_name, "p9100"))
p9100_init_one(sdev);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/platinumfb.c linux-2.6.9-rc1-mm4/drivers/video/platinumfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/platinumfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/platinumfb.c 2004-09-10 21:32:01.852202136 +0800
@@ -668,7 +668,11 @@ static struct of_platform_driver platinu
int __init platinumfb_init(void)
{
#ifndef MODULE
- platinumfb_setup(fb_get_options("platinumfb"));
+ char *option = NULL;
+
+ if (fb_get_options("platinumfb", &option))
+ return -ENODEV;
+ platinumfb_setup(option);
#endif
of_register_driver(&platinum_driver);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/pm2fb.c linux-2.6.9-rc1-mm4/drivers/video/pm2fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/pm2fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/pm2fb.c 2004-09-10 21:32:01.856201528 +0800
@@ -1220,7 +1220,11 @@ int __init pm2fb_setup(char *options);
int __init pm2fb_init(void)
{
#ifndef MODULE
- pm2fb_setup(fb_get_options("pm2fb"));
+ char *option = NULL;
+
+ if (fb_get_options("pm2fb", &option))
+ return -ENODEV;
+ pm2fb_setup(option);
#endif
return pci_module_init(&pm2fb_driver);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/pmag-ba-fb.c linux-2.6.9-rc1-mm4/drivers/video/pmag-ba-fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/pmag-ba-fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/pmag-ba-fb.c 2004-09-10 21:32:01.859201072 +0800
@@ -160,6 +160,9 @@ int __init pmagbafb_init(void)
int sid;
int found = 0;
+ if (fb_get_options("pmagbafb", NULL))
+ return -ENODEV;
+
if (TURBOCHANNEL) {
while ((sid = search_tc_card("PMAG-BA")) >= 0) {
found = 1;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/pmagb-b-fb.c linux-2.6.9-rc1-mm4/drivers/video/pmagb-b-fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/pmagb-b-fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/pmagb-b-fb.c 2004-09-10 21:32:01.862200616 +0800
@@ -163,6 +163,9 @@ int __init pmagbbfb_init(void)
int sid;
int found = 0;
+ if (fb_get_options("pmagbbfb", NULL))
+ return -ENODEV;
+
if (TURBOCHANNEL) {
while ((sid = search_tc_card("PMAGB-BA")) >= 0) {
found = 1;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/pvr2fb.c linux-2.6.9-rc1-mm4/drivers/video/pvr2fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/pvr2fb.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/pvr2fb.c 2004-09-10 21:32:01.866200008 +0800
@@ -1059,7 +1059,11 @@ int __init pvr2fb_init(void)
int size;
#ifndef MODULE
- pvr2fb_setup(fb_get_options("pvr2fb"));
+ char *option = NULL;
+
+ if (fb_get_options("pvr2fb", &option))
+ return -ENODEV;
+ pvr2fb_setup(option);
#endif
size = sizeof(struct fb_info) + sizeof(struct pvr2fb_par) + 16 * sizeof(u32);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/pxafb.c linux-2.6.9-rc1-mm4/drivers/video/pxafb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/pxafb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/pxafb.c 2004-09-10 21:32:01.869199552 +0800
@@ -1377,7 +1377,11 @@ MODULE_PARM_DESC(options, "LCD parameter
int __devinit pxafb_init(void)
{
#ifndef MODULE
- pxafb_setup(fb_get_options("pxafb"));
+ char *option = NULL;
+
+ if (fb_get_options("pxafb", &option))
+ return -ENODEV;
+ pxafb_setup(option);
#endif
return driver_register(&pxafb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/q40fb.c linux-2.6.9-rc1-mm4/drivers/video/q40fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/q40fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/q40fb.c 2004-09-10 21:32:01.873198944 +0800
@@ -143,6 +143,9 @@ int __init q40fb_init(void)
{
int ret = 0;
+ if (fb_get_options("q40fb", NULL))
+ return -ENODEV;
+
ret = driver_register(&q40fb_driver);
if (!ret) {
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/radeonfb.c linux-2.6.9-rc1-mm4/drivers/video/radeonfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/radeonfb.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/radeonfb.c 2004-09-10 21:32:01.877198336 +0800
@@ -3137,7 +3137,11 @@ int __init radeonfb_old_setup (char *opt
int __init radeonfb_old_init (void)
{
#ifndef MODULE
- radeonfb_old_setup(fb_get_options("radeonfb_old"));
+ char *option = NULL;
+
+ if (fb_get_options("radeonfb_old", &option))
+ return -ENODEV;
+ radeonfb_old_setup(option);
#endif
return pci_module_init (&radeonfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/riva/fbdev.c linux-2.6.9-rc1-mm4/drivers/video/riva/fbdev.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/riva/fbdev.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/riva/fbdev.c 2004-09-10 21:32:01.882197576 +0800
@@ -2133,7 +2133,11 @@ static struct pci_driver rivafb_driver =
int __devinit rivafb_init(void)
{
#ifndef MODULE
- rivafb_setup(fb_get_options("rivafb"));
+ char *option = NULL;
+
+ if (fb_get_options("rivafb", &option))
+ return -ENODEV;
+ rivafb_setup(option);
#endif
if (pci_register_driver(&rivafb_driver) > 0)
return 0;
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/sa1100fb.c linux-2.6.9-rc1-mm4/drivers/video/sa1100fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/sa1100fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/sa1100fb.c 2004-09-10 21:32:01.886196968 +0800
@@ -1804,6 +1804,9 @@ static struct device_driver sa1100fb_dri
int __init sa1100fb_init(void)
{
+ if (fb_get_options("sa1100fb", NULL))
+ return -ENODEV;
+
return driver_register(&sa1100fb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/sgivwfb.c linux-2.6.9-rc1-mm4/drivers/video/sgivwfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/sgivwfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/sgivwfb.c 2004-09-10 21:32:01.890196360 +0800
@@ -870,7 +870,11 @@ int __init sgivwfb_init(void)
int ret;
#ifndef MODULE
- sgivwfb_setup(fb_get_options("sgivwfb"));
+ char *option = NULL;
+
+ if (fb_get_options("sgivwfb", &option))
+ return -ENODEV;
+ sgivwfb_setup(option);
#endif
ret = driver_register(&sgivwfb_driver);
if (!ret) {
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/sis/sis_main.c linux-2.6.9-rc1-mm4/drivers/video/sis/sis_main.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/sis/sis_main.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/sis/sis_main.c 2004-09-10 21:32:01.897195296 +0800
@@ -5720,7 +5720,11 @@ int __init sisfb_init(void)
{
#if LINUX_VERSION_CODE > KERNEL_VERSION(2,6,8)
#ifndef MODULE
- sisfb_setup(fb_get_options("sisfb"));
+ char *option = NULL;
+
+ if (fb_get_options("sisfb", &option))
+ return -ENODEV;
+ sisfb_setup(option);
#endif
#endif
return(pci_module_init(&sisfb_driver));
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/skeletonfb.c linux-2.6.9-rc1-mm4/drivers/video/skeletonfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/skeletonfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/skeletonfb.c 2004-09-10 21:32:01.901194688 +0800
@@ -586,7 +586,11 @@ static void __exit xxxfb_cleanup(void)
* For kernel boot options (in 'video=xxxfb:<options>' format)
*/
#ifndef MODULE
- xxxfb_setup(fb_get_options("xxxfb"));
+ char *option = NULL;
+
+ if (fb_get_options("xxxfb", &option))
+ return -ENODEV;
+ xxxfb_setup(option);
#endif
/*
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/sstfb.c linux-2.6.9-rc1-mm4/drivers/video/sstfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/sstfb.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/sstfb.c 2004-09-10 21:32:01.905194080 +0800
@@ -1573,7 +1573,11 @@ static struct pci_driver sstfb_driver =
int __devinit sstfb_init(void)
{
#ifndef MODULE
- sstfb_setup(fb_get_options("sstfb"));
+ char *option = NULL;
+
+ if (fb_get_options("sstfb", &option))
+ return -ENODEV;
+ sstfb_setup(option);
#endif
return pci_module_init(&sstfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/stifb.c linux-2.6.9-rc1-mm4/drivers/video/stifb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/stifb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/stifb.c 2004-09-10 21:32:01.909193472 +0800
@@ -1386,7 +1386,11 @@ stifb_init(void)
int i;
#ifndef MODULE
- stifb_setup(fb_get_options("stifb"));
+ char *option = NULL;
+
+ if (fb_get_options("stifb", &option))
+ return -ENODEV;
+ stifb_setup(option);
#endif
if (stifb_disabled) {
printk(KERN_INFO "stifb: disabled by \"stifb=off\" kernel parameter\n");
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/tcx.c linux-2.6.9-rc1-mm4/drivers/video/tcx.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/tcx.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/tcx.c 2004-09-10 21:32:01.913192864 +0800
@@ -468,6 +468,9 @@ int __init tcx_init(void)
struct sbus_bus *sbus;
struct sbus_dev *sdev;
+ if (fb_get_options("tcxfb", NULL))
+ return -ENODEV;
+
for_all_sbusdev(sdev, sbus) {
if (!strcmp(sdev->prom_name, "tcx"))
tcx_init_one(sdev);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/tdfxfb.c linux-2.6.9-rc1-mm4/drivers/video/tdfxfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/tdfxfb.c 2004-09-10 05:28:42.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/tdfxfb.c 2004-09-10 21:32:01.916192408 +0800
@@ -1359,7 +1359,12 @@ static void __devexit tdfxfb_remove(stru
int __init tdfxfb_init(void)
{
#ifndef MODULE
- tdfxfb_setup(fb_get_options("tdfxfb"));
+ char *option = NULL;
+
+ if (fb_get_options("tdfxfb", &option))
+ return -ENODEV;
+
+ tdfxfb_setup(option);
#endif
return pci_module_init(&tdfxfb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/tgafb.c linux-2.6.9-rc1-mm4/drivers/video/tgafb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/tgafb.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/tgafb.c 2004-09-10 21:32:01.920191800 +0800
@@ -1528,7 +1528,11 @@ int __init
tgafb_init(void)
{
#ifndef MODULE
- tgafb_setup(fb_get_options("tgafb"));
+ char *option = NULL;
+
+ if (fb_get_options("tgafb", &option))
+ return -ENODEV;
+ tgafb_setup(option);
#endif
return pci_module_init(&tgafb_driver);
}
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/tridentfb.c linux-2.6.9-rc1-mm4/drivers/video/tridentfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/tridentfb.c 2004-09-10 05:29:21.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/tridentfb.c 2004-09-10 21:32:01.924191192 +0800
@@ -1224,7 +1224,11 @@ int tridentfb_setup(char *options);
int __init tridentfb_init(void)
{
#ifndef MODULE
- tridentfb_setup(fb_get_options("tridentfb"));
+ char *option = NULL;
+
+ if (fb_get_options("tridentfb", &option))
+ return -ENODEV;
+ tridentfb_setup(option);
#endif
output("Trident framebuffer %s initializing\n", VERSION);
return pci_module_init(&tridentfb_pci_driver);
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/tx3912fb.c linux-2.6.9-rc1-mm4/drivers/video/tx3912fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/tx3912fb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/tx3912fb.c 2004-09-10 21:32:01.927190736 +0800
@@ -217,8 +217,11 @@ int __init tx3912fb_init(void)
{
u_long tx3912fb_paddr = 0;
int size = (info->var.bits_per_pixel == 8) ? 256 : 16;
+ char *option = NULL;
- tx3912fb_setup(fb_get_options("tx3912fb"));
+ if (fb_get_options("tx3912fb", &option))
+ return -ENODEV;
+ tx3912fb_setup(option);
/* Disable the video logic */
outl(inl(TX3912_VIDEO_CTRL1) &
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/valkyriefb.c linux-2.6.9-rc1-mm4/drivers/video/valkyriefb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/valkyriefb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/valkyriefb.c 2004-09-10 21:32:01.930190280 +0800
@@ -322,8 +322,11 @@ int __init valkyriefb_init(void)
struct fb_info_valkyrie *p;
unsigned long frame_buffer_phys, cmap_regs_phys, flags;
int err;
+ char *option = NULL;
- valkyriefb_setup(fb_get_options("valkyriefb"));
+ if (fb_get_options("valkyriefb", &option))
+ return -ENODEV;
+ valkyriefb_setup(option);
#ifdef CONFIG_MAC
if (!MACH_IS_MAC)
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/vesafb.c linux-2.6.9-rc1-mm4/drivers/video/vesafb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/vesafb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/vesafb.c 2004-09-10 21:32:01.934189672 +0800
@@ -410,8 +410,11 @@ static struct platform_device vesafb_dev
int __init vesafb_init(void)
{
int ret;
+ char *option = NULL;
- vesafb_setup(fb_get_options("vesafb"));
+ /* ignore error return of fb_get_options */
+ fb_get_options("vesafb", &option);
+ vesafb_setup(option);
ret = driver_register(&vesafb_driver);
if (!ret) {
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/vfb.c linux-2.6.9-rc1-mm4/drivers/video/vfb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/vfb.c 2004-09-08 12:45:11.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/vfb.c 2004-09-10 21:32:01.937189216 +0800
@@ -497,7 +497,11 @@ int __init vfb_init(void)
int ret = 0;
#ifndef MODULE
- vfb_setup(fb_get_options("vfb"));
+ char *option = NULL;
+
+ if (fb_get_options("vfb", &option))
+ return -ENODEV;
+ vfb_setup(option);
#endif
if (!vfb_enable)
diff -uprN linux-2.6.9-rc1-mm4-orig/drivers/video/vga16fb.c linux-2.6.9-rc1-mm4/drivers/video/vga16fb.c
--- linux-2.6.9-rc1-mm4-orig/drivers/video/vga16fb.c 2004-09-10 05:28:48.000000000 +0800
+++ linux-2.6.9-rc1-mm4/drivers/video/vga16fb.c 2004-09-10 21:32:01.940188760 +0800
@@ -1342,9 +1342,13 @@ int __init vga16fb_init(void)
{
int i;
int ret;
-
#ifndef MODULE
- vga16fb_setup(fb_get_options("vga16fb"));
+ char *option = NULL;
+
+ if (fb_get_options("vga16fb", &option))
+ return -ENODEV;
+
+ vga16fb_setup(option);
#endif
printk(KERN_DEBUG "vga16fb: initializing\n");
diff -uprN linux-2.6.9-rc1-mm4-orig/include/linux/fb.h linux-2.6.9-rc1-mm4/include/linux/fb.h
--- linux-2.6.9-rc1-mm4-orig/include/linux/fb.h 2004-09-10 05:29:28.000000000 +0800
+++ linux-2.6.9-rc1-mm4/include/linux/fb.h 2004-09-10 21:36:55.522557456 +0800
@@ -789,7 +789,7 @@ extern void fb_sysmove_buf_aligned(struc
extern void fb_load_cursor_image(struct fb_info *);
extern void fb_set_suspend(struct fb_info *info, int state);
extern int fb_get_color_depth(struct fb_info *info);
-extern char* fb_get_options(char *name);
+extern int fb_get_options(char *name, char **option);
extern struct fb_info *registered_fb[FB_MAX];
extern int num_registered_fb;
Benjamin Herrenschmidt <[email protected]> wrote:
>
> Andrew, Any reason why this patch isn't upstream ? The recent changes
> to fbdev in 2.6.9-* are a regression and we need this patch to get bac
> the video=ofonly feature.
Well I have a whole bunch of fbcon/fbdev patches here, but at some point
one needs to plug the flow so we can get 2.6.9 out the door. And nobody
told me (until now) that we had a problem.
Tony, which of the below shold be merged into 2.6.9?
fbdev-remove-unnecessary-banshee_wait_idle-from-tdfxfb.patch
fbdev-fix-logo-drawing-failure-for-vga16fb.patch
fbdev-initialize-i810fb-after-agpgart.patch
fbdev-fix-userland-compile-breakage.patch
fbcon-fix-setup-boot-options-of-fbcon.patch
fbdev-pass-struct-device-to-class_simple_device_add.patch
fbdev-add-tile-blitting-support.patch
fbcon-fix-fbcons-setup-routine.patch
fbdev-arrange-driver-order-in-makefile.patch
fbdev-fix-scrolling-corruption.patch
radeonfb-fix-warnings-about-uninitialized-variables.patch
fbdev-remove-i810fb-explicit-agp-initialization-hack.patch
On Monday 20 September 2004 23:52, Andrew Morton wrote:
> Benjamin Herrenschmidt <[email protected]> wrote:
> > Andrew, Any reason why this patch isn't upstream ? The recent changes
> > to fbdev in 2.6.9-* are a regression and we need this patch to get bac
> > the video=ofonly feature.
>
> Well I have a whole bunch of fbcon/fbdev patches here, but at some point
> one needs to plug the flow so we can get 2.6.9 out the door. And nobody
> told me (until now) that we had a problem.
>
> Tony, which of the below shold be merged into 2.6.9?
>
> fbdev-fix-userland-compile-breakage.patch
> fbcon-fix-fbcons-setup-routine.patch
> fbdev-arrange-driver-order-in-makefile.patch
These 3 need to go to mainline.
> fbdev-fix-logo-drawing-failure-for-vga16fb.patch
> fbcon-fix-setup-boot-options-of-fbcon.patch
These 2 need not go immediately as no one will probably notice what they
fixed.
> radeonfb-fix-warnings-about-uninitialized-variables.patch
I haven't seen this.
> fbdev-remove-unnecessary-banshee_wait_idle-from-tdfxfb.patch
> fbdev-initialize-i810fb-after-agpgart.patch
> fbdev-pass-struct-device-to-class_simple_device_add.patch
> fbdev-add-tile-blitting-support.patch
> fbdev-fix-scrolling-corruption.patch
> fbdev-remove-i810fb-explicit-agp-initialization-hack.patch
These can wait.
Tony
On Tuesday 21 September 2004 03:38, Antonino A. Daplas wrote:
> > fbdev-arrange-driver-order-in-makefile.patch
BTW, you may get rejects with the above patch as it depends on this.
fbdev-initialize-i810fb-after-agpgart.patch
Tony