Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

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 <tzimmermann@suse.de>
Reviewed-by: Javier Martinez Canillas <javierm@redhat.com>
Link: https://patchwork.freedesktop.org/patch/msgid/20221111133024.9897-3-tzimmermann@suse.de

+246 -2
+1
drivers/staging/sm750fb/Kconfig
··· 6 6 select FB_CFB_FILLRECT 7 7 select FB_CFB_COPYAREA 8 8 select FB_CFB_IMAGEBLIT 9 + select VIDEO_NOMODESET 9 10 help 10 11 Frame buffer driver for the Silicon Motion SM750 chip 11 12 with 2D accelearion and dual head support.
+3
drivers/staging/sm750fb/sm750.c
··· 1168 1168 { 1169 1169 char *option; 1170 1170 1171 + if (fb_modesetting_disabled("sm750fb")) 1172 + return -ENODEV; 1173 + 1171 1174 #ifdef MODULE 1172 1175 option = g_option; 1173 1176 #else
+37
drivers/video/fbdev/Kconfig
··· 227 227 select FB_CFB_FILLRECT 228 228 select FB_CFB_COPYAREA 229 229 select FB_CFB_IMAGEBLIT 230 + select VIDEO_NOMODESET 230 231 help 231 232 This enables support for Cirrus Logic GD542x/543x based boards on 232 233 Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum. ··· 246 245 select FB_CFB_FILLRECT 247 246 select FB_CFB_COPYAREA 248 247 select FB_CFB_IMAGEBLIT 248 + select VIDEO_NOMODESET 249 249 help 250 250 This is the frame buffer device driver for cards based on 251 251 the 3D Labs Permedia, Permedia 2 and Permedia 2V chips. ··· 342 340 select FB_CFB_FILLRECT 343 341 select FB_CFB_COPYAREA 344 342 select FB_CFB_IMAGEBLIT 343 + select VIDEO_NOMODESET 345 344 help 346 345 This enables support for the Integraphics CyberPro 20x0 and 5000 347 346 VGA chips used in the Rebel.com Netwinder and other machines. ··· 507 504 select FB_CFB_FILLRECT 508 505 select FB_CFB_COPYAREA 509 506 select FB_CFB_IMAGEBLIT 507 + select VIDEO_NOMODESET 510 508 help 511 509 This is the frame buffer device driver for the Chips & Technologies 512 510 65550 graphics chip in PowerBooks. ··· 518 514 select FB_CFB_FILLRECT 519 515 select FB_CFB_COPYAREA 520 516 select FB_CFB_IMAGEBLIT 517 + select VIDEO_NOMODESET 521 518 help 522 519 This is the frame buffer device driver for the Asiliant 69030 chipset 523 520 ··· 527 522 depends on (FB = y) && PCI 528 523 select FB_CFB_IMAGEBLIT 529 524 select FB_MACMODES if PPC_PMAC 525 + select VIDEO_NOMODESET 530 526 help 531 527 The IMS Twin Turbo is a PCI-based frame buffer card bundled with 532 528 many Macintosh and compatible computers. ··· 591 585 select FB_CFB_COPYAREA 592 586 select FB_CFB_IMAGEBLIT 593 587 select BITREVERSE 588 + select VIDEO_NOMODESET 594 589 help 595 590 This is the frame buffer device driver for generic TGA and SFB+ 596 591 graphic cards. These include DEC ZLXp-E1, -E2 and -E3 PCI cards, ··· 784 777 select FB_CFB_FILLRECT 785 778 select FB_CFB_COPYAREA 786 779 select FB_CFB_IMAGEBLIT 780 + select VIDEO_NOMODESET 787 781 help 788 782 This is the framebuffer device for the Sun XVR-500 and similar 789 783 graphics cards based upon the 3DLABS Wildcat chipset. The driver ··· 798 790 select FB_CFB_FILLRECT 799 791 select FB_CFB_COPYAREA 800 792 select FB_CFB_IMAGEBLIT 793 + select VIDEO_NOMODESET 801 794 help 802 795 This is the framebuffer device for the Sun XVR-2500 and similar 803 796 graphics cards based upon the 3DLABS Wildcat chipset. The driver ··· 825 816 select FB_CFB_FILLRECT 826 817 select FB_CFB_COPYAREA 827 818 select FB_CFB_IMAGEBLIT 819 + select VIDEO_NOMODESET 828 820 help 829 821 Say Y here if you have a PowerVR 2 card in your box. If you plan to 830 822 run linux on your Dreamcast, you will have to say Y here. ··· 891 881 select FB_CFB_IMAGEBLIT 892 882 select BITREVERSE 893 883 select VGASTATE 884 + select VIDEO_NOMODESET 894 885 help 895 886 This driver supports graphics boards with the nVidia chips, TNT 896 887 and newer. For very old chipsets, such as the RIVA128, then use ··· 939 928 select FB_CFB_IMAGEBLIT 940 929 select BITREVERSE 941 930 select VGASTATE 931 + select VIDEO_NOMODESET 942 932 help 943 933 This driver supports graphics boards with the nVidia Riva/Geforce 944 934 chips. ··· 984 972 select FB_CFB_COPYAREA 985 973 select FB_CFB_IMAGEBLIT 986 974 select VGASTATE 975 + select VIDEO_NOMODESET 987 976 select FB_DDC 988 977 help 989 978 This driver supports graphics cards based on Intel740 chip. ··· 997 984 select FB_CFB_COPYAREA 998 985 select FB_CFB_IMAGEBLIT 999 986 select VGASTATE 987 + select VIDEO_NOMODESET 1000 988 help 1001 989 This driver supports the on-board graphics built in to the Intel 810 1002 990 and 815 chipsets. Say Y if you have and plan to use such a board. ··· 1048 1034 select FB_CFB_FILLRECT 1049 1035 select FB_CFB_COPYAREA 1050 1036 select FB_CFB_IMAGEBLIT 1037 + select VIDEO_NOMODESET 1051 1038 help 1052 1039 This driver supports the LE80578 (Vermilion Range) chipset 1053 1040 ··· 1066 1051 select FB_CFB_COPYAREA 1067 1052 select FB_CFB_IMAGEBLIT 1068 1053 select BOOT_VESA_SUPPORT if FB_INTEL = y 1054 + select VIDEO_NOMODESET 1069 1055 depends on !DRM_I915 1070 1056 help 1071 1057 This driver supports the on-board graphics built in to the Intel ··· 1104 1088 select FB_CFB_IMAGEBLIT 1105 1089 select FB_TILEBLITTING 1106 1090 select FB_MACMODES if PPC_PMAC 1091 + select VIDEO_NOMODESET 1107 1092 help 1108 1093 Say Y here if you have a Matrox Millennium, Matrox Millennium II, 1109 1094 Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox ··· 1225 1208 select FB_CFB_COPYAREA 1226 1209 select FB_CFB_IMAGEBLIT 1227 1210 select FB_MACMODES if PPC 1211 + select VIDEO_NOMODESET 1228 1212 help 1229 1213 Choose this option if you want to use an ATI Radeon graphics card as 1230 1214 a framebuffer device. There are both PCI and AGP versions. You ··· 1265 1247 select FB_CFB_IMAGEBLIT 1266 1248 select FB_BACKLIGHT if FB_ATY128_BACKLIGHT 1267 1249 select FB_MACMODES if PPC_PMAC 1250 + select VIDEO_NOMODESET 1268 1251 help 1269 1252 This driver supports graphics boards with the ATI Rage128 chips. 1270 1253 Say Y if you have such a graphics board and read ··· 1290 1271 select FB_BACKLIGHT if FB_ATY_BACKLIGHT 1291 1272 select FB_MACMODES if PPC 1292 1273 select FB_ATY_CT if SPARC64 && PCI 1274 + select VIDEO_NOMODESET 1293 1275 help 1294 1276 This driver supports graphics boards with the ATI Mach64 chips. 1295 1277 Say Y if you have such a graphics board. ··· 1341 1321 select FB_TILEBLITTING 1342 1322 select FB_SVGALIB 1343 1323 select VGASTATE 1324 + select VIDEO_NOMODESET 1344 1325 select FONT_8x16 if FRAMEBUFFER_CONSOLE 1345 1326 help 1346 1327 Driver for graphics boards with S3 Trio / S3 Virge chip. ··· 1362 1341 select FB_CFB_COPYAREA 1363 1342 select FB_CFB_IMAGEBLIT 1364 1343 select VGASTATE 1344 + select VIDEO_NOMODESET 1365 1345 help 1366 1346 This driver supports notebooks and computers with S3 Savage PCI/AGP 1367 1347 chips. ··· 1401 1379 select FB_CFB_IMAGEBLIT 1402 1380 select BOOT_VESA_SUPPORT if FB_SIS = y 1403 1381 select FB_SIS_300 if !FB_SIS_315 1382 + select VIDEO_NOMODESET 1404 1383 help 1405 1384 This is the frame buffer device driver for the SiS 300, 315, 330 1406 1385 and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets. ··· 1431 1408 select FB_CFB_COPYAREA 1432 1409 select FB_CFB_IMAGEBLIT 1433 1410 select I2C_ALGOBIT 1411 + select VIDEO_NOMODESET 1434 1412 help 1435 1413 This is the frame buffer device driver for Graphics chips of VIA 1436 1414 UniChrome (Pro) Family (CLE266,PM800/CN400,P4M800CE/P4M800Pro/ ··· 1471 1447 select FB_CFB_COPYAREA 1472 1448 select FB_CFB_IMAGEBLIT 1473 1449 select VGASTATE 1450 + select VIDEO_NOMODESET 1474 1451 help 1475 1452 This driver supports notebooks with NeoMagic PCI chips. 1476 1453 Say Y if you have such a graphics card. ··· 1485 1460 select FB_CFB_FILLRECT 1486 1461 select FB_CFB_COPYAREA 1487 1462 select FB_CFB_IMAGEBLIT 1463 + select VIDEO_NOMODESET 1488 1464 help 1489 1465 Say Y here if you have a STG4000 / Kyro / PowerVR 3 based 1490 1466 graphics board. ··· 1500 1474 select FB_CFB_FILLRECT 1501 1475 select FB_CFB_COPYAREA 1502 1476 select FB_MODE_HELPERS 1477 + select VIDEO_NOMODESET 1503 1478 help 1504 1479 This driver supports graphics boards with the 3Dfx Banshee, 1505 1480 Voodoo3 or VSA-100 (aka Voodoo4/5) chips. Say Y if you have ··· 1530 1503 select FB_CFB_FILLRECT 1531 1504 select FB_CFB_COPYAREA 1532 1505 select FB_CFB_IMAGEBLIT 1506 + select VIDEO_NOMODESET 1533 1507 help 1534 1508 Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or 1535 1509 Voodoo2 (cvg) based graphics card. ··· 1552 1524 select FB_TILEBLITTING 1553 1525 select FB_SVGALIB 1554 1526 select VGASTATE 1527 + select VIDEO_NOMODESET 1555 1528 select FONT_8x16 if FRAMEBUFFER_CONSOLE 1556 1529 help 1557 1530 Driver for CastleRock integrated graphics core in the ··· 1566 1537 select FB_CFB_IMAGEBLIT 1567 1538 select FB_DDC 1568 1539 select FB_MODE_HELPERS 1540 + select VIDEO_NOMODESET 1569 1541 help 1570 1542 This is the frame buffer device driver for Trident PCI/AGP chipsets. 1571 1543 Supported chipset families are TGUI 9440/96XX, 3DImage, Blade3D ··· 1590 1560 select FB_TILEBLITTING 1591 1561 select FB_SVGALIB 1592 1562 select VGASTATE 1563 + select VIDEO_NOMODESET 1593 1564 select FONT_8x16 if FRAMEBUFFER_CONSOLE 1594 1565 help 1595 1566 Driver for PCI graphics boards with ARK 2000PV chip ··· 1602 1571 select FB_CFB_FILLRECT 1603 1572 select FB_CFB_COPYAREA 1604 1573 select FB_CFB_IMAGEBLIT 1574 + select VIDEO_NOMODESET 1605 1575 help 1606 1576 This is the frame buffer device driver for the 3DLabs Permedia3 1607 1577 chipset, used in Formac ProFormance III, 3DLabs Oxygen VX1 & ··· 1615 1583 select FB_CFB_FILLRECT 1616 1584 select FB_CFB_COPYAREA 1617 1585 select FB_CFB_IMAGEBLIT 1586 + select VIDEO_NOMODESET 1618 1587 help 1619 1588 This is the frame buffer device driver for the Fujitsu Carmine chip. 1620 1589 The driver provides two independent frame buffer devices. ··· 1994 1961 select FB_CFB_FILLRECT 1995 1962 select FB_CFB_COPYAREA 1996 1963 select FB_CFB_IMAGEBLIT 1964 + select VIDEO_NOMODESET 1997 1965 help 1998 1966 Say Y here to enable support for the IBM GXT4000P/6000P and 1999 1967 GXT4500P/6500P display adaptor based on Raster Engine RC1000, ··· 2135 2101 select FB_CFB_FILLRECT 2136 2102 select FB_CFB_COPYAREA 2137 2103 select FB_CFB_IMAGEBLIT 2104 + select VIDEO_NOMODESET 2138 2105 help 2139 2106 Frame buffer driver for Fujitsu Carmine/Coral-P(A)/Lime controllers. 2140 2107 ··· 2223 2188 select FB_CFB_IMAGEBLIT 2224 2189 select FB_DEFERRED_IO 2225 2190 select DMA_CMA if HAVE_DMA_CONTIGUOUS && CMA 2191 + select VIDEO_NOMODESET 2226 2192 help 2227 2193 This framebuffer driver supports Microsoft Hyper-V Synthetic Video. 2228 2194 ··· 2266 2230 select FB_CFB_FILLRECT 2267 2231 select FB_CFB_COPYAREA 2268 2232 select FB_CFB_IMAGEBLIT 2233 + select VIDEO_NOMODESET 2269 2234 help 2270 2235 Frame buffer driver for the Silicon Motion SM710, SM712, SM721 2271 2236 and SM722 chips.
+5
drivers/video/fbdev/arkfb.c
··· 1187 1187 1188 1188 #ifndef MODULE 1189 1189 char *option = NULL; 1190 + #endif 1190 1191 1192 + if (fb_modesetting_disabled("arkfb")) 1193 + return -ENODEV; 1194 + 1195 + #ifndef MODULE 1191 1196 if (fb_get_options("arkfb", &option)) 1192 1197 return -ENODEV; 1193 1198
+3
drivers/video/fbdev/asiliantfb.c
··· 616 616 617 617 static int __init asiliantfb_init(void) 618 618 { 619 + if (fb_modesetting_disabled("asiliantfb")) 620 + return -ENODEV; 621 + 619 622 if (fb_get_options("asiliantfb", NULL)) 620 623 return -ENODEV; 621 624
+5
drivers/video/fbdev/aty/aty128fb.c
··· 2503 2503 { 2504 2504 #ifndef MODULE 2505 2505 char *option = NULL; 2506 + #endif 2506 2507 2508 + if (fb_modesetting_disabled("aty128fb")) 2509 + return -ENODEV; 2510 + 2511 + #ifndef MODULE 2507 2512 if (fb_get_options("aty128fb", &option)) 2508 2513 return -ENODEV; 2509 2514 aty128fb_setup(option);
+5
drivers/video/fbdev/aty/atyfb_base.c
··· 3965 3965 int err1 = 1, err2 = 1; 3966 3966 #ifndef MODULE 3967 3967 char *option = NULL; 3968 + #endif 3968 3969 3970 + if (fb_modesetting_disabled("atyfb")) 3971 + return -ENODEV; 3972 + 3973 + #ifndef MODULE 3969 3974 if (fb_get_options("atyfb", &option)) 3970 3975 return -ENODEV; 3971 3976 atyfb_setup(option);
+5
drivers/video/fbdev/aty/radeon_base.c
··· 2607 2607 { 2608 2608 #ifndef MODULE 2609 2609 char *option = NULL; 2610 + #endif 2610 2611 2612 + if (fb_modesetting_disabled("radeonfb")) 2613 + return -ENODEV; 2614 + 2615 + #ifndef MODULE 2611 2616 if (fb_get_options("radeonfb", &option)) 2612 2617 return -ENODEV; 2613 2618 radeonfb_setup(option);
+3
drivers/video/fbdev/carminefb.c
··· 773 773 774 774 static int __init carminefb_init(void) 775 775 { 776 + if (fb_modesetting_disabled("carminefb")) 777 + return -ENODEV; 778 + 776 779 if (!(fb_displays & 777 780 (CARMINE_USE_DISPLAY0 | CARMINE_USE_DISPLAY1))) { 778 781 printk(KERN_ERR "If you disable both displays than you don't "
+3
drivers/video/fbdev/chipsfb.c
··· 506 506 507 507 int __init chips_init(void) 508 508 { 509 + if (fb_modesetting_disabled("chipsfb")) 510 + return -ENODEV; 511 + 509 512 if (fb_get_options("chipsfb", NULL)) 510 513 return -ENODEV; 511 514
+5
drivers/video/fbdev/cirrusfb.c
··· 2359 2359 2360 2360 #ifndef MODULE 2361 2361 char *option = NULL; 2362 + #endif 2362 2363 2364 + if (fb_modesetting_disabled("cirrusfb")) 2365 + return -ENODEV; 2366 + 2367 + #ifndef MODULE 2363 2368 if (fb_get_options("cirrusfb", &option)) 2364 2369 return -ENODEV; 2365 2370 cirrusfb_setup(option);
+15
drivers/video/fbdev/core/fbmem.c
··· 40 40 41 41 #include <asm/fb.h> 42 42 43 + #include <video/nomodeset.h> 43 44 #include <video/vga.h> 44 45 45 46 /* ··· 1844 1843 1845 1844 return 0; 1846 1845 } 1846 + 1847 + #if defined(CONFIG_VIDEO_NOMODESET) 1848 + bool fb_modesetting_disabled(const char *drvname) 1849 + { 1850 + bool fwonly = video_firmware_drivers_only(); 1851 + 1852 + if (fwonly) 1853 + pr_warn("Driver %s not loading because of nomodeset parameter\n", 1854 + drvname); 1855 + 1856 + return fwonly; 1857 + } 1858 + EXPORT_SYMBOL(fb_modesetting_disabled); 1859 + #endif 1847 1860 1848 1861 MODULE_LICENSE("GPL");
+5 -1
drivers/video/fbdev/cyber2000fb.c
··· 48 48 #include <linux/i2c.h> 49 49 #include <linux/i2c-algo-bit.h> 50 50 51 - 52 51 #ifdef __arm__ 53 52 #include <asm/mach-types.h> 54 53 #endif ··· 1875 1876 1876 1877 #ifndef MODULE 1877 1878 char *option = NULL; 1879 + #endif 1878 1880 1881 + if (fb_modesetting_disabled("CyberPro")) 1882 + return -ENODEV; 1883 + 1884 + #ifndef MODULE 1879 1885 if (fb_get_options("cyber2000fb", &option)) 1880 1886 return -ENODEV; 1881 1887 cyber2000fb_setup(option);
+3
drivers/video/fbdev/geode/Kconfig
··· 15 15 select FB_CFB_FILLRECT 16 16 select FB_CFB_COPYAREA 17 17 select FB_CFB_IMAGEBLIT 18 + select VIDEO_NOMODESET 18 19 help 19 20 Framebuffer driver for the display controller integrated into the 20 21 AMD Geode LX processors. ··· 31 30 select FB_CFB_FILLRECT 32 31 select FB_CFB_COPYAREA 33 32 select FB_CFB_IMAGEBLIT 33 + select VIDEO_NOMODESET 34 34 help 35 35 Framebuffer driver for the display controller integrated into the 36 36 AMD Geode GX processors. ··· 47 45 select FB_CFB_FILLRECT 48 46 select FB_CFB_COPYAREA 49 47 select FB_CFB_IMAGEBLIT 48 + select VIDEO_NOMODESET 50 49 help 51 50 Framebuffer driver for the display controller integrated into the 52 51 AMD Geode GX1 processor.
+5
drivers/video/fbdev/geode/gx1fb_core.c
··· 446 446 { 447 447 #ifndef MODULE 448 448 char *option = NULL; 449 + #endif 449 450 451 + if (fb_modesetting_disabled("gx1fb")) 452 + return -ENODEV; 453 + 454 + #ifndef MODULE 450 455 if (fb_get_options("gx1fb", &option)) 451 456 return -ENODEV; 452 457 gx1fb_setup(option);
+5
drivers/video/fbdev/geode/gxfb_core.c
··· 511 511 { 512 512 #ifndef MODULE 513 513 char *option = NULL; 514 + #endif 514 515 516 + if (fb_modesetting_disabled("gxfb")) 517 + return -ENODEV; 518 + 519 + #ifndef MODULE 515 520 if (fb_get_options("gxfb", &option)) 516 521 return -ENODEV; 517 522
+5
drivers/video/fbdev/geode/lxfb_core.c
··· 647 647 { 648 648 #ifndef MODULE 649 649 char *option = NULL; 650 + #endif 650 651 652 + if (fb_modesetting_disabled("lxfb")) 653 + return -ENODEV; 654 + 655 + #ifndef MODULE 651 656 if (fb_get_options("lxfb", &option)) 652 657 return -ENODEV; 653 658
+3
drivers/video/fbdev/gxt4500.c
··· 779 779 780 780 static int gxt4500_init(void) 781 781 { 782 + if (fb_modesetting_disabled("gxt4500")) 783 + return -ENODEV; 784 + 782 785 #ifndef MODULE 783 786 if (fb_get_options("gxt4500", &mode_option)) 784 787 return -ENODEV;
+3 -1
drivers/video/fbdev/hyperv_fb.c
··· 59 59 60 60 #include <linux/hyperv.h> 61 61 62 - 63 62 /* Hyper-V Synthetic Video Protocol definitions and structures */ 64 63 #define MAX_VMBUS_PKT_SIZE 0x4000 65 64 ··· 1361 1362 static int __init hvfb_drv_init(void) 1362 1363 { 1363 1364 int ret; 1365 + 1366 + if (fb_modesetting_disabled("hyper_fb")) 1367 + return -ENODEV; 1364 1368 1365 1369 ret = vmbus_driver_register(&hvfb_drv); 1366 1370 if (ret != 0)
+5
drivers/video/fbdev/i740fb.c
··· 1285 1285 { 1286 1286 #ifndef MODULE 1287 1287 char *option = NULL; 1288 + #endif 1288 1289 1290 + if (fb_modesetting_disabled("i740fb")) 1291 + return -ENODEV; 1292 + 1293 + #ifndef MODULE 1289 1294 if (fb_get_options("i740fb", &option)) 1290 1295 return -ENODEV; 1291 1296 i740fb_setup(option);
+6
drivers/video/fbdev/i810/i810_main.c
··· 2143 2143 { 2144 2144 char *option = NULL; 2145 2145 2146 + if (fb_modesetting_disabled("i810fb")) 2147 + return -ENODEV; 2148 + 2146 2149 if (fb_get_options("i810fb", &option)) 2147 2150 return -ENODEV; 2148 2151 i810fb_setup(option); ··· 2162 2159 2163 2160 static int i810fb_init(void) 2164 2161 { 2162 + if (fb_modesetting_disabled("i810fb")) 2163 + return -ENODEV; 2164 + 2165 2165 hsync1 *= 1000; 2166 2166 hsync2 *= 1000; 2167 2167
+5
drivers/video/fbdev/imsttfb.c
··· 1617 1617 { 1618 1618 #ifndef MODULE 1619 1619 char *option = NULL; 1620 + #endif 1620 1621 1622 + if (fb_modesetting_disabled("imsttfb")) 1623 + return -ENODEV; 1624 + 1625 + #ifndef MODULE 1621 1626 if (fb_get_options("imsttfb", &option)) 1622 1627 return -ENODEV; 1623 1628
+3
drivers/video/fbdev/intelfb/intelfbdrv.c
··· 389 389 if (idonly) 390 390 return -ENODEV; 391 391 392 + if (fb_modesetting_disabled("intelfb")) 393 + return -ENODEV; 394 + 392 395 #ifndef MODULE 393 396 if (fb_get_options("intelfb", &option)) 394 397 return -ENODEV;
+5
drivers/video/fbdev/kyro/fbdev.c
··· 789 789 { 790 790 #ifndef MODULE 791 791 char *option = NULL; 792 + #endif 792 793 794 + if (fb_modesetting_disabled("kyrofb")) 795 + return -ENODEV; 796 + 797 + #ifndef MODULE 793 798 if (fb_get_options("kyrofb", &option)) 794 799 return -ENODEV; 795 800 kyrofb_setup(option);
+3
drivers/video/fbdev/matrox/matroxfb_base.c
··· 2314 2314 static int __init matrox_init(void) { 2315 2315 int err; 2316 2316 2317 + if (fb_modesetting_disabled("matroxfb")) 2318 + return -ENODEV; 2319 + 2317 2320 matroxfb_init_params(); 2318 2321 err = pci_register_driver(&matroxfb_driver); 2319 2322 dev = -1; /* accept all new devices... */
+3
drivers/video/fbdev/mb862xx/mb862xxfbdrv.c
··· 1181 1181 { 1182 1182 int ret = -ENODEV; 1183 1183 1184 + if (fb_modesetting_disabled(DRV_NAME)) 1185 + return -ENODEV; 1186 + 1184 1187 #if defined(CONFIG_FB_MB862XX_LIME) 1185 1188 ret = platform_driver_register(&of_platform_mb862xxfb_driver); 1186 1189 #endif
+5
drivers/video/fbdev/neofb.c
··· 2209 2209 { 2210 2210 #ifndef MODULE 2211 2211 char *option = NULL; 2212 + #endif 2212 2213 2214 + if (fb_modesetting_disabled("neofb")) 2215 + return -ENODEV; 2216 + 2217 + #ifndef MODULE 2213 2218 if (fb_get_options("neofb", &option)) 2214 2219 return -ENODEV; 2215 2220 neofb_setup(option);
+5
drivers/video/fbdev/nvidia/nvidia.c
··· 1521 1521 { 1522 1522 #ifndef MODULE 1523 1523 char *option = NULL; 1524 + #endif 1524 1525 1526 + if (fb_modesetting_disabled("nvidiafb")) 1527 + return -ENODEV; 1528 + 1529 + #ifndef MODULE 1525 1530 if (fb_get_options("nvidiafb", &option)) 1526 1531 return -ENODEV; 1527 1532 nvidiafb_setup(option);
+5
drivers/video/fbdev/pm2fb.c
··· 1799 1799 { 1800 1800 #ifndef MODULE 1801 1801 char *option = NULL; 1802 + #endif 1802 1803 1804 + if (fb_modesetting_disabled("pm2fb")) 1805 + return -ENODEV; 1806 + 1807 + #ifndef MODULE 1803 1808 if (fb_get_options("pm2fb", &option)) 1804 1809 return -ENODEV; 1805 1810 pm2fb_setup(option);
+5
drivers/video/fbdev/pm3fb.c
··· 1540 1540 */ 1541 1541 #ifndef MODULE 1542 1542 char *option = NULL; 1543 + #endif 1543 1544 1545 + if (fb_modesetting_disabled("pm3fb")) 1546 + return -ENODEV; 1547 + 1548 + #ifndef MODULE 1544 1549 if (fb_get_options("pm3fb", &option)) 1545 1550 return -ENODEV; 1546 1551 pm3fb_setup(option);
+5
drivers/video/fbdev/pvr2fb.c
··· 1082 1082 1083 1083 #ifndef MODULE 1084 1084 char *option = NULL; 1085 + #endif 1085 1086 1087 + if (fb_modesetting_disabled("pvr2fb")) 1088 + return -ENODEV; 1089 + 1090 + #ifndef MODULE 1086 1091 if (fb_get_options("pvr2fb", &option)) 1087 1092 return -ENODEV; 1088 1093 pvr2fb_setup(option);
+5
drivers/video/fbdev/riva/fbdev.c
··· 2165 2165 { 2166 2166 #ifndef MODULE 2167 2167 char *option = NULL; 2168 + #endif 2168 2169 2170 + if (fb_modesetting_disabled("rivafb")) 2171 + return -ENODEV; 2172 + 2173 + #ifndef MODULE 2169 2174 if (fb_get_options("rivafb", &option)) 2170 2175 return -ENODEV; 2171 2176 rivafb_setup(option);
+5
drivers/video/fbdev/s3fb.c
··· 1558 1558 1559 1559 #ifndef MODULE 1560 1560 char *option = NULL; 1561 + #endif 1561 1562 1563 + if (fb_modesetting_disabled("s3fb")) 1564 + return -ENODEV; 1565 + 1566 + #ifndef MODULE 1562 1567 if (fb_get_options("s3fb", &option)) 1563 1568 return -ENODEV; 1564 1569 s3fb_setup(option);
+3
drivers/video/fbdev/savage/savagefb_driver.c
··· 2556 2556 2557 2557 DBG("savagefb_init"); 2558 2558 2559 + if (fb_modesetting_disabled("savagefb")) 2560 + return -ENODEV; 2561 + 2559 2562 if (fb_get_options("savagefb", &option)) 2560 2563 return -ENODEV; 2561 2564
+5
drivers/video/fbdev/sis/sis_main.c
··· 6588 6588 { 6589 6589 #ifndef MODULE 6590 6590 char *options = NULL; 6591 + #endif 6591 6592 6593 + if (fb_modesetting_disabled("sisfb")) 6594 + return -ENODEV; 6595 + 6596 + #ifndef MODULE 6592 6597 if(fb_get_options("sisfb", &options)) 6593 6598 return -ENODEV; 6594 6599
+5
drivers/video/fbdev/skeletonfb.c
··· 987 987 */ 988 988 #ifndef MODULE 989 989 char *option = NULL; 990 + #endif 990 991 992 + if (fb_modesetting_disabled("xxxfb")) 993 + return -ENODEV; 994 + 995 + #ifndef MODULE 991 996 if (fb_get_options("xxxfb", &option)) 992 997 return -ENODEV; 993 998 xxxfb_setup(option);
+3
drivers/video/fbdev/sm712fb.c
··· 1756 1756 { 1757 1757 char *option = NULL; 1758 1758 1759 + if (fb_modesetting_disabled("sm712fb")) 1760 + return -ENODEV; 1761 + 1759 1762 if (fb_get_options("sm712fb", &option)) 1760 1763 return -ENODEV; 1761 1764 if (option && *option)
+3
drivers/video/fbdev/sstfb.c
··· 1503 1503 { 1504 1504 char *option = NULL; 1505 1505 1506 + if (fb_modesetting_disabled("sstfb")) 1507 + return -ENODEV; 1508 + 1506 1509 if (fb_get_options("sstfb", &option)) 1507 1510 return -ENODEV; 1508 1511 sstfb_setup(option);
+3
drivers/video/fbdev/sunxvr2500.c
··· 247 247 248 248 static int __init s3d_init(void) 249 249 { 250 + if (fb_modesetting_disabled("s3d")) 251 + return -ENODEV; 252 + 250 253 if (fb_get_options("s3d", NULL)) 251 254 return -ENODEV; 252 255
+3
drivers/video/fbdev/sunxvr500.c
··· 430 430 431 431 static int __init e3d_init(void) 432 432 { 433 + if (fb_modesetting_disabled("e3d")) 434 + return -ENODEV; 435 + 433 436 if (fb_get_options("e3d", NULL)) 434 437 return -ENODEV; 435 438
+5
drivers/video/fbdev/tdfxfb.c
··· 1632 1632 { 1633 1633 #ifndef MODULE 1634 1634 char *option = NULL; 1635 + #endif 1635 1636 1637 + if (fb_modesetting_disabled("tdfxfb")) 1638 + return -ENODEV; 1639 + 1640 + #ifndef MODULE 1636 1641 if (fb_get_options("tdfxfb", &option)) 1637 1642 return -ENODEV; 1638 1643
+5
drivers/video/fbdev/tgafb.c
··· 1597 1597 int status; 1598 1598 #ifndef MODULE 1599 1599 char *option = NULL; 1600 + #endif 1600 1601 1602 + if (fb_modesetting_disabled("tgafb")) 1603 + return -ENODEV; 1604 + 1605 + #ifndef MODULE 1601 1606 if (fb_get_options("tgafb", &option)) 1602 1607 return -ENODEV; 1603 1608 tgafb_setup(option);
+5
drivers/video/fbdev/tridentfb.c
··· 1811 1811 { 1812 1812 #ifndef MODULE 1813 1813 char *option = NULL; 1814 + #endif 1814 1815 1816 + if (fb_modesetting_disabled("tridentfb")) 1817 + return -ENODEV; 1818 + 1819 + #ifndef MODULE 1815 1820 if (fb_get_options("tridentfb", &option)) 1816 1821 return -ENODEV; 1817 1822 tridentfb_setup(option);
+5
drivers/video/fbdev/vermilion/vermilion.c
··· 1057 1057 1058 1058 #ifndef MODULE 1059 1059 char *option = NULL; 1060 + #endif 1060 1061 1062 + if (fb_modesetting_disabled("vmlfb")) 1063 + return -ENODEV; 1064 + 1065 + #ifndef MODULE 1061 1066 if (fb_get_options(MODULE_NAME, &option)) 1062 1067 return -ENODEV; 1063 1068 #endif
+3
drivers/video/fbdev/via/via-core.c
··· 725 725 { 726 726 int ret; 727 727 728 + if (fb_modesetting_disabled("viafb")) 729 + return -ENODEV; 730 + 728 731 ret = viafb_init(); 729 732 if (ret) 730 733 return ret;
+5
drivers/video/fbdev/vt8623fb.c
··· 920 920 921 921 #ifndef MODULE 922 922 char *option = NULL; 923 + #endif 923 924 925 + if (fb_modesetting_disabled("vt8623fb")) 926 + return -ENODEV; 927 + 928 + #ifndef MODULE 924 929 if (fb_get_options("vt8623fb", &option)) 925 930 return -ENODEV; 926 931
+9
include/linux/fb.h
··· 804 804 const struct fb_videomode *default_mode, 805 805 unsigned int default_bpp); 806 806 807 + #if defined(CONFIG_VIDEO_NOMODESET) 808 + bool fb_modesetting_disabled(const char *drvname); 809 + #else 810 + bool fb_modesetting_disabled(const char *drvname) 811 + { 812 + return false; 813 + } 814 + #endif 815 + 807 816 /* Convenience logging macros */ 808 817 #define fb_err(fb_info, fmt, ...) \ 809 818 pr_err("fb%d: " fmt, (fb_info)->node, ##__VA_ARGS__)