From patchwork Fri Nov 11 13:30:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Thomas Zimmermann X-Patchwork-Id: 13040322 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 74E0BC4332F for ; Fri, 11 Nov 2022 13:30:44 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233990AbiKKNan (ORCPT ); Fri, 11 Nov 2022 08:30:43 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:46646 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S234019AbiKKNaf (ORCPT ); Fri, 11 Nov 2022 08:30:35 -0500 Received: from smtp-out1.suse.de (smtp-out1.suse.de [195.135.220.28]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 9CB0F6177E for ; Fri, 11 Nov 2022 05:30:28 -0800 (PST) Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by smtp-out1.suse.de (Postfix) with ESMTPS id 5968D225E2; Fri, 11 Nov 2022 13:30:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_rsa; t=1668173427; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dsmIe2itMalpnjTqx7F0j8Kfs1ig+xRa9vcNN5sjkcw=; b=RjRGAmsV+cVg4JBos+BFFb4OcmgUtRzC9O/gVkTyKex+Q3Kj8FChwwA/bRcqNsUwA8hSPF vNKnGcjkd8lX7AselIwurgVxneNuAlWiJ1bilpkG5pzEXIvWw96Iolzq3KYy2b14SNokkr MbccM7/+GdUPv3kjsCj+CCeVM/7DN90= DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=suse.de; s=susede2_ed25519; t=1668173427; h=from:from:reply-to:date:date:message-id:message-id:to:to:cc:cc: mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=dsmIe2itMalpnjTqx7F0j8Kfs1ig+xRa9vcNN5sjkcw=; b=SLcHbxD1/kWSxf3dE0PIkOHr+kKVJwtvQYkDBn1Hz1Ziqv+J5oso8CEsIN97KtThqyMUr6 YOTQceH9gPsn0ZCw== Received: from imap2.suse-dmz.suse.de (imap2.suse-dmz.suse.de [192.168.254.74]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (P-521) server-digest SHA512) (No client certificate requested) by imap2.suse-dmz.suse.de (Postfix) with ESMTPS id 2493313273; Fri, 11 Nov 2022 13:30:27 +0000 (UTC) Received: from dovecot-director2.suse.de ([192.168.254.65]) by imap2.suse-dmz.suse.de with ESMTPSA id iG8UCHNObmPCbQAAMHmgww (envelope-from ); Fri, 11 Nov 2022 13:30:27 +0000 From: Thomas Zimmermann To: deller@gmx.de, daniel@ffwll.ch, javierm@redhat.com Cc: linux-fbdev@vger.kernel.org, dri-devel@lists.freedesktop.org, Thomas Zimmermann Subject: [PATCH v2 2/2] fbdev: Add support for the nomodeset kernel parameter Date: Fri, 11 Nov 2022 14:30:24 +0100 Message-Id: <20221111133024.9897-3-tzimmermann@suse.de> X-Mailer: git-send-email 2.38.0 In-Reply-To: <20221111133024.9897-1-tzimmermann@suse.de> References: <20221111133024.9897-1-tzimmermann@suse.de> MIME-Version: 1.0 Precedence: bulk List-ID: X-Mailing-List: linux-fbdev@vger.kernel.org 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 Reviewed-by: Javier Martinez Canillas --- drivers/staging/sm750fb/Kconfig | 1 + drivers/staging/sm750fb/sm750.c | 3 ++ drivers/video/fbdev/Kconfig | 37 ++++++++++++++++++++ drivers/video/fbdev/arkfb.c | 5 +++ drivers/video/fbdev/asiliantfb.c | 3 ++ drivers/video/fbdev/aty/aty128fb.c | 5 +++ drivers/video/fbdev/aty/atyfb_base.c | 5 +++ drivers/video/fbdev/aty/radeon_base.c | 5 +++ drivers/video/fbdev/carminefb.c | 3 ++ drivers/video/fbdev/chipsfb.c | 3 ++ drivers/video/fbdev/cirrusfb.c | 5 +++ drivers/video/fbdev/core/fbmem.c | 15 ++++++++ drivers/video/fbdev/cyber2000fb.c | 6 +++- drivers/video/fbdev/geode/Kconfig | 3 ++ drivers/video/fbdev/geode/gx1fb_core.c | 5 +++ drivers/video/fbdev/geode/gxfb_core.c | 5 +++ drivers/video/fbdev/geode/lxfb_core.c | 5 +++ drivers/video/fbdev/gxt4500.c | 3 ++ drivers/video/fbdev/hyperv_fb.c | 4 ++- drivers/video/fbdev/i740fb.c | 5 +++ drivers/video/fbdev/i810/i810_main.c | 6 ++++ drivers/video/fbdev/imsttfb.c | 5 +++ drivers/video/fbdev/intelfb/intelfbdrv.c | 3 ++ drivers/video/fbdev/kyro/fbdev.c | 5 +++ drivers/video/fbdev/matrox/matroxfb_base.c | 3 ++ drivers/video/fbdev/mb862xx/mb862xxfbdrv.c | 3 ++ drivers/video/fbdev/neofb.c | 5 +++ drivers/video/fbdev/nvidia/nvidia.c | 5 +++ drivers/video/fbdev/pm2fb.c | 5 +++ drivers/video/fbdev/pm3fb.c | 5 +++ drivers/video/fbdev/pvr2fb.c | 5 +++ drivers/video/fbdev/riva/fbdev.c | 5 +++ drivers/video/fbdev/s3fb.c | 5 +++ drivers/video/fbdev/savage/savagefb_driver.c | 3 ++ drivers/video/fbdev/sis/sis_main.c | 5 +++ drivers/video/fbdev/skeletonfb.c | 5 +++ drivers/video/fbdev/sm712fb.c | 3 ++ drivers/video/fbdev/sstfb.c | 3 ++ drivers/video/fbdev/sunxvr2500.c | 3 ++ drivers/video/fbdev/sunxvr500.c | 3 ++ drivers/video/fbdev/tdfxfb.c | 5 +++ drivers/video/fbdev/tgafb.c | 5 +++ drivers/video/fbdev/tridentfb.c | 5 +++ drivers/video/fbdev/vermilion/vermilion.c | 5 +++ drivers/video/fbdev/via/via-core.c | 3 ++ drivers/video/fbdev/vt8623fb.c | 5 +++ include/linux/fb.h | 9 +++++ 47 files changed, 246 insertions(+), 2 deletions(-) diff --git a/drivers/staging/sm750fb/Kconfig b/drivers/staging/sm750fb/Kconfig index 8c0d8a873d5b0..acb6c08d09dce 100644 --- a/drivers/staging/sm750fb/Kconfig +++ b/drivers/staging/sm750fb/Kconfig @@ -6,6 +6,7 @@ config FB_SM750 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help Frame buffer driver for the Silicon Motion SM750 chip with 2D accelearion and dual head support. diff --git a/drivers/staging/sm750fb/sm750.c b/drivers/staging/sm750fb/sm750.c index 168ae2e9005d7..effc7fcc3703f 100644 --- a/drivers/staging/sm750fb/sm750.c +++ b/drivers/staging/sm750fb/sm750.c @@ -1168,6 +1168,9 @@ static int __init lynxfb_init(void) { char *option; + if (fb_modesetting_disabled("sm750fb")) + return -ENODEV; + #ifdef MODULE option = g_option; #else diff --git a/drivers/video/fbdev/Kconfig b/drivers/video/fbdev/Kconfig index a98987aa27846..71019b167f8b0 100644 --- a/drivers/video/fbdev/Kconfig +++ b/drivers/video/fbdev/Kconfig @@ -227,6 +227,7 @@ config FB_CIRRUS select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help This enables support for Cirrus Logic GD542x/543x based boards on Amiga: SD64, Piccolo, Picasso II/II+, Picasso IV, or EGS Spectrum. @@ -245,6 +246,7 @@ config FB_PM2 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help This is the frame buffer device driver for cards based on the 3D Labs Permedia, Permedia 2 and Permedia 2V chips. @@ -340,6 +342,7 @@ config FB_CYBER2000 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help This enables support for the Integraphics CyberPro 20x0 and 5000 VGA chips used in the Rebel.com Netwinder and other machines. @@ -504,6 +507,7 @@ config FB_CT65550 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help This is the frame buffer device driver for the Chips & Technologies 65550 graphics chip in PowerBooks. @@ -514,6 +518,7 @@ config FB_ASILIANT select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help This is the frame buffer device driver for the Asiliant 69030 chipset @@ -522,6 +527,7 @@ config FB_IMSTT depends on (FB = y) && PCI select FB_CFB_IMAGEBLIT select FB_MACMODES if PPC_PMAC + select VIDEO_NOMODESET help The IMS Twin Turbo is a PCI-based frame buffer card bundled with many Macintosh and compatible computers. @@ -585,6 +591,7 @@ config FB_TGA select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select BITREVERSE + select VIDEO_NOMODESET help This is the frame buffer device driver for generic TGA and SFB+ graphic cards. These include DEC ZLXp-E1, -E2 and -E3 PCI cards, @@ -777,6 +784,7 @@ config FB_XVR500 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help This is the framebuffer device for the Sun XVR-500 and similar graphics cards based upon the 3DLABS Wildcat chipset. The driver @@ -790,6 +798,7 @@ config FB_XVR2500 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help This is the framebuffer device for the Sun XVR-2500 and similar graphics cards based upon the 3DLABS Wildcat chipset. The driver @@ -816,6 +825,7 @@ config FB_PVR2 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help Say Y here if you have a PowerVR 2 card in your box. If you plan to run linux on your Dreamcast, you will have to say Y here. @@ -881,6 +891,7 @@ config FB_NVIDIA select FB_CFB_IMAGEBLIT select BITREVERSE select VGASTATE + select VIDEO_NOMODESET help This driver supports graphics boards with the nVidia chips, TNT and newer. For very old chipsets, such as the RIVA128, then use @@ -928,6 +939,7 @@ config FB_RIVA select FB_CFB_IMAGEBLIT select BITREVERSE select VGASTATE + select VIDEO_NOMODESET help This driver supports graphics boards with the nVidia Riva/Geforce chips. @@ -972,6 +984,7 @@ config FB_I740 select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select VGASTATE + select VIDEO_NOMODESET select FB_DDC help This driver supports graphics cards based on Intel740 chip. @@ -984,6 +997,7 @@ config FB_I810 select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select VGASTATE + select VIDEO_NOMODESET help This driver supports the on-board graphics built in to the Intel 810 and 815 chipsets. Say Y if you have and plan to use such a board. @@ -1034,6 +1048,7 @@ config FB_LE80578 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help This driver supports the LE80578 (Vermilion Range) chipset @@ -1051,6 +1066,7 @@ config FB_INTEL select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select BOOT_VESA_SUPPORT if FB_INTEL = y + select VIDEO_NOMODESET depends on !DRM_I915 help This driver supports the on-board graphics built in to the Intel @@ -1088,6 +1104,7 @@ config FB_MATROX select FB_CFB_IMAGEBLIT select FB_TILEBLITTING select FB_MACMODES if PPC_PMAC + select VIDEO_NOMODESET help Say Y here if you have a Matrox Millennium, Matrox Millennium II, Matrox Mystique, Matrox Mystique 220, Matrox Productiva G100, Matrox @@ -1208,6 +1225,7 @@ config FB_RADEON select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select FB_MACMODES if PPC + select VIDEO_NOMODESET help Choose this option if you want to use an ATI Radeon graphics card as a framebuffer device. There are both PCI and AGP versions. You @@ -1247,6 +1265,7 @@ config FB_ATY128 select FB_CFB_IMAGEBLIT select FB_BACKLIGHT if FB_ATY128_BACKLIGHT select FB_MACMODES if PPC_PMAC + select VIDEO_NOMODESET help This driver supports graphics boards with the ATI Rage128 chips. Say Y if you have such a graphics board and read @@ -1271,6 +1290,7 @@ config FB_ATY select FB_BACKLIGHT if FB_ATY_BACKLIGHT select FB_MACMODES if PPC select FB_ATY_CT if SPARC64 && PCI + select VIDEO_NOMODESET help This driver supports graphics boards with the ATI Mach64 chips. Say Y if you have such a graphics board. @@ -1321,6 +1341,7 @@ config FB_S3 select FB_TILEBLITTING select FB_SVGALIB select VGASTATE + select VIDEO_NOMODESET select FONT_8x16 if FRAMEBUFFER_CONSOLE help Driver for graphics boards with S3 Trio / S3 Virge chip. @@ -1341,6 +1362,7 @@ config FB_SAVAGE select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select VGASTATE + select VIDEO_NOMODESET help This driver supports notebooks and computers with S3 Savage PCI/AGP chips. @@ -1379,6 +1401,7 @@ config FB_SIS select FB_CFB_IMAGEBLIT select BOOT_VESA_SUPPORT if FB_SIS = y select FB_SIS_300 if !FB_SIS_315 + select VIDEO_NOMODESET help This is the frame buffer device driver for the SiS 300, 315, 330 and 340 series as well as XGI V3XT, V5, V8, Z7 graphics chipsets. @@ -1408,6 +1431,7 @@ config FB_VIA select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select I2C_ALGOBIT + select VIDEO_NOMODESET help This is the frame buffer device driver for Graphics chips of VIA UniChrome (Pro) Family (CLE266,PM800/CN400,P4M800CE/P4M800Pro/ @@ -1447,6 +1471,7 @@ config FB_NEOMAGIC select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT select VGASTATE + select VIDEO_NOMODESET help This driver supports notebooks with NeoMagic PCI chips. Say Y if you have such a graphics card. @@ -1460,6 +1485,7 @@ config FB_KYRO select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help Say Y here if you have a STG4000 / Kyro / PowerVR 3 based graphics board. @@ -1474,6 +1500,7 @@ config FB_3DFX select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_MODE_HELPERS + select VIDEO_NOMODESET help This driver supports graphics boards with the 3Dfx Banshee, Voodoo3 or VSA-100 (aka Voodoo4/5) chips. Say Y if you have @@ -1503,6 +1530,7 @@ config FB_VOODOO1 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help Say Y here if you have a 3Dfx Voodoo Graphics (Voodoo1/sst1) or Voodoo2 (cvg) based graphics card. @@ -1524,6 +1552,7 @@ config FB_VT8623 select FB_TILEBLITTING select FB_SVGALIB select VGASTATE + select VIDEO_NOMODESET select FONT_8x16 if FRAMEBUFFER_CONSOLE help Driver for CastleRock integrated graphics core in the @@ -1537,6 +1566,7 @@ config FB_TRIDENT select FB_CFB_IMAGEBLIT select FB_DDC select FB_MODE_HELPERS + select VIDEO_NOMODESET help This is the frame buffer device driver for Trident PCI/AGP chipsets. Supported chipset families are TGUI 9440/96XX, 3DImage, Blade3D @@ -1560,6 +1590,7 @@ config FB_ARK select FB_TILEBLITTING select FB_SVGALIB select VGASTATE + select VIDEO_NOMODESET select FONT_8x16 if FRAMEBUFFER_CONSOLE help Driver for PCI graphics boards with ARK 2000PV chip @@ -1571,6 +1602,7 @@ config FB_PM3 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help This is the frame buffer device driver for the 3DLabs Permedia3 chipset, used in Formac ProFormance III, 3DLabs Oxygen VX1 & @@ -1583,6 +1615,7 @@ config FB_CARMINE select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help This is the frame buffer device driver for the Fujitsu Carmine chip. The driver provides two independent frame buffer devices. @@ -1961,6 +1994,7 @@ config FB_IBM_GXT4500 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help Say Y here to enable support for the IBM GXT4000P/6000P and GXT4500P/6500P display adaptor based on Raster Engine RC1000, @@ -2101,6 +2135,7 @@ config FB_MB862XX select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help Frame buffer driver for Fujitsu Carmine/Coral-P(A)/Lime controllers. @@ -2188,6 +2223,7 @@ config FB_HYPERV select FB_CFB_IMAGEBLIT select FB_DEFERRED_IO select DMA_CMA if HAVE_DMA_CONTIGUOUS && CMA + select VIDEO_NOMODESET help This framebuffer driver supports Microsoft Hyper-V Synthetic Video. @@ -2230,6 +2266,7 @@ config FB_SM712 select FB_CFB_FILLRECT select FB_CFB_COPYAREA select FB_CFB_IMAGEBLIT + select VIDEO_NOMODESET help Frame buffer driver for the Silicon Motion SM710, SM712, SM721 and SM722 chips. diff --git a/drivers/video/fbdev/arkfb.c b/drivers/video/fbdev/arkfb.c index 5f8fec9e5fd4d..60a96fdb5dd8e 100644 --- a/drivers/video/fbdev/arkfb.c +++ b/drivers/video/fbdev/arkfb.c @@ -1187,7 +1187,12 @@ static int __init arkfb_init(void) #ifndef MODULE char *option = NULL; +#endif + + if (fb_modesetting_disabled("arkfb")) + return -ENODEV; +#ifndef MODULE if (fb_get_options("arkfb", &option)) return -ENODEV; diff --git a/drivers/video/fbdev/asiliantfb.c b/drivers/video/fbdev/asiliantfb.c index 3818437a8f691..8383468f55775 100644 --- a/drivers/video/fbdev/asiliantfb.c +++ b/drivers/video/fbdev/asiliantfb.c @@ -616,6 +616,9 @@ static struct pci_driver asiliantfb_driver = { static int __init asiliantfb_init(void) { + if (fb_modesetting_disabled("asiliantfb")) + return -ENODEV; + if (fb_get_options("asiliantfb", NULL)) return -ENODEV; diff --git a/drivers/video/fbdev/aty/aty128fb.c b/drivers/video/fbdev/aty/aty128fb.c index 57e398fe7a81c..dd31b9d7d337c 100644 --- a/drivers/video/fbdev/aty/aty128fb.c +++ b/drivers/video/fbdev/aty/aty128fb.c @@ -2503,7 +2503,12 @@ static int aty128fb_init(void) { #ifndef MODULE char *option = NULL; +#endif + + if (fb_modesetting_disabled("aty128fb")) + return -ENODEV; +#ifndef MODULE if (fb_get_options("aty128fb", &option)) return -ENODEV; aty128fb_setup(option); diff --git a/drivers/video/fbdev/aty/atyfb_base.c b/drivers/video/fbdev/aty/atyfb_base.c index b3463d1371520..0ccf5d401ecbc 100644 --- a/drivers/video/fbdev/aty/atyfb_base.c +++ b/drivers/video/fbdev/aty/atyfb_base.c @@ -3965,7 +3965,12 @@ static int __init atyfb_init(void) int err1 = 1, err2 = 1; #ifndef MODULE char *option = NULL; +#endif + + if (fb_modesetting_disabled("atyfb")) + return -ENODEV; +#ifndef MODULE if (fb_get_options("atyfb", &option)) return -ENODEV; atyfb_setup(option); diff --git a/drivers/video/fbdev/aty/radeon_base.c b/drivers/video/fbdev/aty/radeon_base.c index 8b28c9bddd974..657064227de84 100644 --- a/drivers/video/fbdev/aty/radeon_base.c +++ b/drivers/video/fbdev/aty/radeon_base.c @@ -2607,7 +2607,12 @@ static int __init radeonfb_init (void) { #ifndef MODULE char *option = NULL; +#endif + + if (fb_modesetting_disabled("radeonfb")) + return -ENODEV; +#ifndef MODULE if (fb_get_options("radeonfb", &option)) return -ENODEV; radeonfb_setup(option); diff --git a/drivers/video/fbdev/carminefb.c b/drivers/video/fbdev/carminefb.c index 4651b48a87f93..4ae21dbdb8caa 100644 --- a/drivers/video/fbdev/carminefb.c +++ b/drivers/video/fbdev/carminefb.c @@ -773,6 +773,9 @@ static struct pci_driver carmine_pci_driver = { static int __init carminefb_init(void) { + if (fb_modesetting_disabled("carminefb")) + return -ENODEV; + if (!(fb_displays & (CARMINE_USE_DISPLAY0 | CARMINE_USE_DISPLAY1))) { printk(KERN_ERR "If you disable both displays than you don't " diff --git a/drivers/video/fbdev/chipsfb.c b/drivers/video/fbdev/chipsfb.c index f1c1c95c1fdf0..cc37ec3f8fc1f 100644 --- a/drivers/video/fbdev/chipsfb.c +++ b/drivers/video/fbdev/chipsfb.c @@ -506,6 +506,9 @@ static struct pci_driver chipsfb_driver = { int __init chips_init(void) { + if (fb_modesetting_disabled("chipsfb")) + return -ENODEV; + if (fb_get_options("chipsfb", NULL)) return -ENODEV; diff --git a/drivers/video/fbdev/cirrusfb.c b/drivers/video/fbdev/cirrusfb.c index b08bee43779ae..ba45e2147c52a 100644 --- a/drivers/video/fbdev/cirrusfb.c +++ b/drivers/video/fbdev/cirrusfb.c @@ -2359,7 +2359,12 @@ static int __init cirrusfb_init(void) #ifndef MODULE char *option = NULL; +#endif + + if (fb_modesetting_disabled("cirrusfb")) + return -ENODEV; +#ifndef MODULE if (fb_get_options("cirrusfb", &option)) return -ENODEV; cirrusfb_setup(option); diff --git a/drivers/video/fbdev/core/fbmem.c b/drivers/video/fbdev/core/fbmem.c index 1e70d8c676533..3a6c8458eb8d5 100644 --- a/drivers/video/fbdev/core/fbmem.c +++ b/drivers/video/fbdev/core/fbmem.c @@ -40,6 +40,7 @@ #include +#include