Skip to content

Commit 0ba2fa8

Browse files
author
Thomas Zimmermann
committed
fbdev: Add support for the nomodeset kernel parameter
Support the kernel's nomodeset parameter for all PCI-based fbdev drivers that use aperture helpers to remove other, hardware-agnostic graphics drivers. The parameter is a simple way of using the firmware-provided scanout buffer if the hardware's native driver is broken. The same effect could be achieved with per-driver options, but the importance of the graphics output for many users makes a single, unified approach worthwhile. With nomodeset specified, the fbdev driver module will not load. This unifies behavior with similar DRM drivers. In DRM helpers, modules first check the nomodeset parameter before registering the PCI driver. As fbdev has no such module helpers, we have to modify each driver individually. The name 'nomodeset' is slightly misleading, but has been chosen for historical reasons. Several drivers implemented it before it became a general option for DRM. So keeping the existing name was preferred over introducing a new one. v2: * print a warning if a driver does not init (Helge) * wrap video_firmware_drivers_only() in helper Signed-off-by: Thomas Zimmermann <[email protected]> Reviewed-by: Javier Martinez Canillas <[email protected]> Link: https://patchwork.freedesktop.org/patch/msgid/[email protected]
1 parent 9a758d8 commit 0ba2fa8

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

47 files changed

+246
-2
lines changed

drivers/staging/sm750fb/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ config FB_SM750
66
select FB_CFB_FILLRECT
77
select FB_CFB_COPYAREA
88
select FB_CFB_IMAGEBLIT
9+
select VIDEO_NOMODESET
910
help
1011
Frame buffer driver for the Silicon Motion SM750 chip
1112
with 2D accelearion and dual head support.

drivers/staging/sm750fb/sm750.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1168,6 +1168,9 @@ static int __init lynxfb_init(void)
11681168
{
11691169
char *option;
11701170

1171+
if (fb_modesetting_disabled("sm750fb"))
1172+
return -ENODEV;
1173+
11711174
#ifdef MODULE
11721175
option = g_option;
11731176
#else

drivers/video/fbdev/Kconfig

Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -227,6 +227,7 @@ config FB_CIRRUS
227227
select FB_CFB_FILLRECT
228228
select FB_CFB_COPYAREA
229229
select FB_CFB_IMAGEBLIT
230+
select VIDEO_NOMODESET
230231
help
231232
This enables support for Cirrus Logic GD542x/543x based boards on
232233
Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum.
@@ -245,6 +246,7 @@ config FB_PM2
245246
select FB_CFB_FILLRECT
246247
select FB_CFB_COPYAREA
247248
select FB_CFB_IMAGEBLIT
249+
select VIDEO_NOMODESET
248250
help
249251
This is the frame buffer device driver for cards based on
250252
the 3D Labs Permedia, Permedia 2 and Permedia 2V chips.
@@ -340,6 +342,7 @@ config FB_CYBER2000
340342
select FB_CFB_FILLRECT
341343
select FB_CFB_COPYAREA
342344
select FB_CFB_IMAGEBLIT
345+
select VIDEO_NOMODESET
343346
help
344347
This enables support for the Integraphics CyberPro 20x0 and 5000
345348
VGA chips used in the Rebel.com Netwinder and other machines.
@@ -504,6 +507,7 @@ config FB_CT65550
504507
select FB_CFB_FILLRECT
505508
select FB_CFB_COPYAREA
506509
select FB_CFB_IMAGEBLIT
510+
select VIDEO_NOMODESET
507511
help
508512
This is the frame buffer device driver for the Chips & Technologies
509513
65550 graphics chip in PowerBooks.
@@ -514,6 +518,7 @@ config FB_ASILIANT
514518
select FB_CFB_FILLRECT
515519
select FB_CFB_COPYAREA
516520
select FB_CFB_IMAGEBLIT
521+
select VIDEO_NOMODESET
517522
help
518523
This is the frame buffer device driver for the Asiliant 69030 chipset
519524

@@ -522,6 +527,7 @@ config FB_IMSTT
522527
depends on (FB = y) && PCI
523528
select FB_CFB_IMAGEBLIT
524529
select FB_MACMODES if PPC_PMAC
530+
select VIDEO_NOMODESET
525531
help
526532
The IMS Twin Turbo is a PCI-based frame buffer card bundled with
527533
many Macintosh and compatible computers.
@@ -585,6 +591,7 @@ config FB_TGA
585591
select FB_CFB_COPYAREA
586592
select FB_CFB_IMAGEBLIT
587593
select BITREVERSE
594+
select VIDEO_NOMODESET
588595
help
589596
This is the frame buffer device driver for generic TGA and SFB+
590597
graphic cards. These include DEC ZLXp-E1, -E2 and -E3 PCI cards,
@@ -777,6 +784,7 @@ config FB_XVR500
777784
select FB_CFB_FILLRECT
778785
select FB_CFB_COPYAREA
779786
select FB_CFB_IMAGEBLIT
787+
select VIDEO_NOMODESET
780788
help
781789
This is the framebuffer device for the Sun XVR-500 and similar
782790
graphics cards based upon the 3DLABS Wildcat chipset. The driver
@@ -790,6 +798,7 @@ config FB_XVR2500
790798
select FB_CFB_FILLRECT
791799
select FB_CFB_COPYAREA
792800
select FB_CFB_IMAGEBLIT
801+
select VIDEO_NOMODESET
793802
help
794803
This is the framebuffer device for the Sun XVR-2500 and similar
795804
graphics cards based upon the 3DLABS Wildcat chipset. The driver
@@ -816,6 +825,7 @@ config FB_PVR2
816825
select FB_CFB_FILLRECT
817826
select FB_CFB_COPYAREA
818827
select FB_CFB_IMAGEBLIT
828+
select VIDEO_NOMODESET
819829
help
820830
Say Y here if you have a PowerVR 2 card in your box. If you plan to
821831
run linux on your Dreamcast, you will have to say Y here.
@@ -881,6 +891,7 @@ config FB_NVIDIA
881891
select FB_CFB_IMAGEBLIT
882892
select BITREVERSE
883893
select VGASTATE
894+
select VIDEO_NOMODESET
884895
help
885896
This driver supports graphics boards with the nVidia chips, TNT
886897
and newer. For very old chipsets, such as the RIVA128, then use
@@ -928,6 +939,7 @@ config FB_RIVA
928939
select FB_CFB_IMAGEBLIT
929940
select BITREVERSE
930941
select VGASTATE
942+
select VIDEO_NOMODESET
931943
help
932944
This driver supports graphics boards with the nVidia Riva/Geforce
933945
chips.
@@ -972,6 +984,7 @@ config FB_I740
972984
select FB_CFB_COPYAREA
973985
select FB_CFB_IMAGEBLIT
974986
select VGASTATE
987+
select VIDEO_NOMODESET
975988
select FB_DDC
976989
help
977990
This driver supports graphics cards based on Intel740 chip.
@@ -984,6 +997,7 @@ config FB_I810
984997
select FB_CFB_COPYAREA
985998
select FB_CFB_IMAGEBLIT
986999
select VGASTATE
1000+
select VIDEO_NOMODESET
9871001
help
9881002
This driver supports the on-board graphics built in to the Intel 810
9891003
and 815 chipsets. Say Y if you have and plan to use such a board.
@@ -1034,6 +1048,7 @@ config FB_LE80578
10341048
select FB_CFB_FILLRECT
10351049
select FB_CFB_COPYAREA
10361050
select FB_CFB_IMAGEBLIT
1051+
select VIDEO_NOMODESET
10371052
help
10381053
This driver supports the LE80578 (Vermilion Range) chipset
10391054

@@ -1051,6 +1066,7 @@ config FB_INTEL
10511066
select FB_CFB_COPYAREA
10521067
select FB_CFB_IMAGEBLIT
10531068
select BOOT_VESA_SUPPORT if FB_INTEL = y
1069+
select VIDEO_NOMODESET
10541070
depends on !DRM_I915
10551071
help
10561072
This driver supports the on-board graphics built in to the Intel
@@ -1088,6 +1104,7 @@ config FB_MATROX
10881104
select FB_CFB_IMAGEBLIT
10891105
select FB_TILEBLITTING
10901106
select FB_MACMODES if PPC_PMAC
1107+
select VIDEO_NOMODESET
10911108
help
10921109
Say Y here if you have a Matrox Millennium, Matrox Millennium II,
10931110
Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox
@@ -1208,6 +1225,7 @@ config FB_RADEON
12081225
select FB_CFB_COPYAREA
12091226
select FB_CFB_IMAGEBLIT
12101227
select FB_MACMODES if PPC
1228+
select VIDEO_NOMODESET
12111229
help
12121230
Choose this option if you want to use an ATI Radeon graphics card as
12131231
a framebuffer device. There are both PCI and AGP versions. You
@@ -1247,6 +1265,7 @@ config FB_ATY128
12471265
select FB_CFB_IMAGEBLIT
12481266
select FB_BACKLIGHT if FB_ATY128_BACKLIGHT
12491267
select FB_MACMODES if PPC_PMAC
1268+
select VIDEO_NOMODESET
12501269
help
12511270
This driver supports graphics boards with the ATI Rage128 chips.
12521271
Say Y if you have such a graphics board and read
@@ -1271,6 +1290,7 @@ config FB_ATY
12711290
select FB_BACKLIGHT if FB_ATY_BACKLIGHT
12721291
select FB_MACMODES if PPC
12731292
select FB_ATY_CT if SPARC64 && PCI
1293+
select VIDEO_NOMODESET
12741294
help
12751295
This driver supports graphics boards with the ATI Mach64 chips.
12761296
Say Y if you have such a graphics board.
@@ -1321,6 +1341,7 @@ config FB_S3
13211341
select FB_TILEBLITTING
13221342
select FB_SVGALIB
13231343
select VGASTATE
1344+
select VIDEO_NOMODESET
13241345
select FONT_8x16 if FRAMEBUFFER_CONSOLE
13251346
help
13261347
Driver for graphics boards with S3 Trio / S3 Virge chip.
@@ -1341,6 +1362,7 @@ config FB_SAVAGE
13411362
select FB_CFB_COPYAREA
13421363
select FB_CFB_IMAGEBLIT
13431364
select VGASTATE
1365+
select VIDEO_NOMODESET
13441366
help
13451367
This driver supports notebooks and computers with S3 Savage PCI/AGP
13461368
chips.
@@ -1379,6 +1401,7 @@ config FB_SIS
13791401
select FB_CFB_IMAGEBLIT
13801402
select BOOT_VESA_SUPPORT if FB_SIS = y
13811403
select FB_SIS_300 if !FB_SIS_315
1404+
select VIDEO_NOMODESET
13821405
help
13831406
This is the frame buffer device driver for the SiS 300, 315, 330
13841407
and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets.
@@ -1408,6 +1431,7 @@ config FB_VIA
14081431
select FB_CFB_COPYAREA
14091432
select FB_CFB_IMAGEBLIT
14101433
select I2C_ALGOBIT
1434+
select VIDEO_NOMODESET
14111435
help
14121436
This is the frame buffer device driver for Graphics chips of VIA
14131437
UniChrome (Pro) Family (CLE266,PM800/CN400,P4M800CE/P4M800Pro/
@@ -1447,6 +1471,7 @@ config FB_NEOMAGIC
14471471
select FB_CFB_COPYAREA
14481472
select FB_CFB_IMAGEBLIT
14491473
select VGASTATE
1474+
select VIDEO_NOMODESET
14501475
help
14511476
This driver supports notebooks with NeoMagic PCI chips.
14521477
Say Y if you have such a graphics card.
@@ -1460,6 +1485,7 @@ config FB_KYRO
14601485
select FB_CFB_FILLRECT
14611486
select FB_CFB_COPYAREA
14621487
select FB_CFB_IMAGEBLIT
1488+
select VIDEO_NOMODESET
14631489
help
14641490
Say Y here if you have a STG4000 / Kyro / PowerVR 3 based
14651491
graphics board.
@@ -1474,6 +1500,7 @@ config FB_3DFX
14741500
select FB_CFB_FILLRECT
14751501
select FB_CFB_COPYAREA
14761502
select FB_MODE_HELPERS
1503+
select VIDEO_NOMODESET
14771504
help
14781505
This driver supports graphics boards with the 3Dfx Banshee,
14791506
Voodoo3 or VSA-100 (aka Voodoo4/5) chips. Say Y if you have
@@ -1503,6 +1530,7 @@ config FB_VOODOO1
15031530
select FB_CFB_FILLRECT
15041531
select FB_CFB_COPYAREA
15051532
select FB_CFB_IMAGEBLIT
1533+
select VIDEO_NOMODESET
15061534
help
15071535
Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or
15081536
Voodoo2 (cvg) based graphics card.
@@ -1524,6 +1552,7 @@ config FB_VT8623
15241552
select FB_TILEBLITTING
15251553
select FB_SVGALIB
15261554
select VGASTATE
1555+
select VIDEO_NOMODESET
15271556
select FONT_8x16 if FRAMEBUFFER_CONSOLE
15281557
help
15291558
Driver for CastleRock integrated graphics core in the
@@ -1537,6 +1566,7 @@ config FB_TRIDENT
15371566
select FB_CFB_IMAGEBLIT
15381567
select FB_DDC
15391568
select FB_MODE_HELPERS
1569+
select VIDEO_NOMODESET
15401570
help
15411571
This is the frame buffer device driver for Trident PCI/AGP chipsets.
15421572
Supported chipset families are TGUI 9440/96XX, 3DImage, Blade3D
@@ -1560,6 +1590,7 @@ config FB_ARK
15601590
select FB_TILEBLITTING
15611591
select FB_SVGALIB
15621592
select VGASTATE
1593+
select VIDEO_NOMODESET
15631594
select FONT_8x16 if FRAMEBUFFER_CONSOLE
15641595
help
15651596
Driver for PCI graphics boards with ARK 2000PV chip
@@ -1571,6 +1602,7 @@ config FB_PM3
15711602
select FB_CFB_FILLRECT
15721603
select FB_CFB_COPYAREA
15731604
select FB_CFB_IMAGEBLIT
1605+
select VIDEO_NOMODESET
15741606
help
15751607
This is the frame buffer device driver for the 3DLabs Permedia3
15761608
chipset, used in Formac ProFormance III, 3DLabs Oxygen VX1 &
@@ -1583,6 +1615,7 @@ config FB_CARMINE
15831615
select FB_CFB_FILLRECT
15841616
select FB_CFB_COPYAREA
15851617
select FB_CFB_IMAGEBLIT
1618+
select VIDEO_NOMODESET
15861619
help
15871620
This is the frame buffer device driver for the Fujitsu Carmine chip.
15881621
The driver provides two independent frame buffer devices.
@@ -1961,6 +1994,7 @@ config FB_IBM_GXT4500
19611994
select FB_CFB_FILLRECT
19621995
select FB_CFB_COPYAREA
19631996
select FB_CFB_IMAGEBLIT
1997+
select VIDEO_NOMODESET
19641998
help
19651999
Say Y here to enable support for the IBM GXT4000P/6000P and
19662000
GXT4500P/6500P display adaptor based on Raster Engine RC1000,
@@ -2101,6 +2135,7 @@ config FB_MB862XX
21012135
select FB_CFB_FILLRECT
21022136
select FB_CFB_COPYAREA
21032137
select FB_CFB_IMAGEBLIT
2138+
select VIDEO_NOMODESET
21042139
help
21052140
Frame buffer driver for Fujitsu Carmine/Coral-P(A)/Lime controllers.
21062141

@@ -2188,6 +2223,7 @@ config FB_HYPERV
21882223
select FB_CFB_IMAGEBLIT
21892224
select FB_DEFERRED_IO
21902225
select DMA_CMA if HAVE_DMA_CONTIGUOUS && CMA
2226+
select VIDEO_NOMODESET
21912227
help
21922228
This framebuffer driver supports Microsoft Hyper-V Synthetic Video.
21932229

@@ -2230,6 +2266,7 @@ config FB_SM712
22302266
select FB_CFB_FILLRECT
22312267
select FB_CFB_COPYAREA
22322268
select FB_CFB_IMAGEBLIT
2269+
select VIDEO_NOMODESET
22332270
help
22342271
Frame buffer driver for the Silicon Motion SM710, SM712, SM721
22352272
and SM722 chips.

drivers/video/fbdev/arkfb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1187,7 +1187,12 @@ static int __init arkfb_init(void)
11871187

11881188
#ifndef MODULE
11891189
char *option = NULL;
1190+
#endif
1191+
1192+
if (fb_modesetting_disabled("arkfb"))
1193+
return -ENODEV;
11901194

1195+
#ifndef MODULE
11911196
if (fb_get_options("arkfb", &option))
11921197
return -ENODEV;
11931198

drivers/video/fbdev/asiliantfb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -616,6 +616,9 @@ static struct pci_driver asiliantfb_driver = {
616616

617617
static int __init asiliantfb_init(void)
618618
{
619+
if (fb_modesetting_disabled("asiliantfb"))
620+
return -ENODEV;
621+
619622
if (fb_get_options("asiliantfb", NULL))
620623
return -ENODEV;
621624

drivers/video/fbdev/aty/aty128fb.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2503,7 +2503,12 @@ static int aty128fb_init(void)
25032503
{
25042504
#ifndef MODULE
25052505
char *option = NULL;
2506+
#endif
2507+
2508+
if (fb_modesetting_disabled("aty128fb"))
2509+
return -ENODEV;
25062510

2511+
#ifndef MODULE
25072512
if (fb_get_options("aty128fb", &option))
25082513
return -ENODEV;
25092514
aty128fb_setup(option);

drivers/video/fbdev/aty/atyfb_base.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3965,7 +3965,12 @@ static int __init atyfb_init(void)
39653965
int err1 = 1, err2 = 1;
39663966
#ifndef MODULE
39673967
char *option = NULL;
3968+
#endif
3969+
3970+
if (fb_modesetting_disabled("atyfb"))
3971+
return -ENODEV;
39683972

3973+
#ifndef MODULE
39693974
if (fb_get_options("atyfb", &option))
39703975
return -ENODEV;
39713976
atyfb_setup(option);

drivers/video/fbdev/aty/radeon_base.c

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2607,7 +2607,12 @@ static int __init radeonfb_init (void)
26072607
{
26082608
#ifndef MODULE
26092609
char *option = NULL;
2610+
#endif
2611+
2612+
if (fb_modesetting_disabled("radeonfb"))
2613+
return -ENODEV;
26102614

2615+
#ifndef MODULE
26112616
if (fb_get_options("radeonfb", &option))
26122617
return -ENODEV;
26132618
radeonfb_setup(option);

drivers/video/fbdev/carminefb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -773,6 +773,9 @@ static struct pci_driver carmine_pci_driver = {
773773

774774
static int __init carminefb_init(void)
775775
{
776+
if (fb_modesetting_disabled("carminefb"))
777+
return -ENODEV;
778+
776779
if (!(fb_displays &
777780
(CARMINE_USE_DISPLAY0 | CARMINE_USE_DISPLAY1))) {
778781
printk(KERN_ERR "If you disable both displays than you don't "

drivers/video/fbdev/chipsfb.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -506,6 +506,9 @@ static struct pci_driver chipsfb_driver = {
506506

507507
int __init chips_init(void)
508508
{
509+
if (fb_modesetting_disabled("chipsfb"))
510+
return -ENODEV;
511+
509512
if (fb_get_options("chipsfb", NULL))
510513
return -ENODEV;
511514

0 commit comments

Comments
 (0)