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

Configure Feed

Select the types of activity you want to include in your feed.

drm: Move nomodeset kernel parameter to drivers/video

Move the nomodeset kernel parameter to drivers/video to make it
available to non-DRM drivers. Adapt the interface, but keep the DRM
interface drm_firmware_drivers_only() to avoid churn within DRM. The
function should later be inlined into callers.

The parameter disables any DRM graphics driver that would replace a
driver for firmware-provided scanout buffers. It is an option to easily
fallback to basic graphics output if the hardware's native driver is
broken. Moving it to a more prominent location wil make it available
to fbdev as well.

v2:
* clarify the meaning of the nomodeset parameter (Javier)

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-2-tzimmermann@suse.de

+38 -18
+8 -5
Documentation/admin-guide/kernel-parameters.txt
··· 3777 3777 shutdown the other cpus. Instead use the REBOOT_VECTOR 3778 3778 irq. 3779 3779 3780 - nomodeset Disable kernel modesetting. DRM drivers will not perform 3781 - display-mode changes or accelerated rendering. Only the 3782 - system framebuffer will be available for use if this was 3783 - set-up by the firmware or boot loader. 3780 + nomodeset Disable kernel modesetting. Most systems' firmware 3781 + sets up a display mode and provides framebuffer memory 3782 + for output. With nomodeset, DRM and fbdev drivers will 3783 + not load if they could possibly displace the pre- 3784 + initialized output. Only the system framebuffer will 3785 + be available for use. The respective drivers will not 3786 + perform display-mode changes or accelerated rendering. 3784 3787 3785 - Useful as fallback, or for testing and debugging. 3788 + Useful as error fallback, or for testing and debugging. 3786 3789 3787 3790 nomodule Disable module load 3788 3791
+2
MAINTAINERS
··· 6701 6701 F: drivers/gpu/drm/tiny/ofdrm.c 6702 6702 F: drivers/gpu/drm/tiny/simpledrm.c 6703 6703 F: drivers/video/aperture.c 6704 + F: drivers/video/nomodeset.c 6704 6705 F: include/drm/drm_aperture.h 6705 6706 F: include/linux/aperture.h 6707 + F: include/video/nomodeset.h 6706 6708 6707 6709 DRM DRIVER FOR SIS VIDEO CARDS 6708 6710 S: Orphan / Obsolete
+1 -6
drivers/gpu/drm/Kconfig
··· 8 8 menuconfig DRM 9 9 tristate "Direct Rendering Manager (XFree86 4.1.0 and higher DRI support)" 10 10 depends on (AGP || AGP=n) && !EMULATED_CMPXCHG && HAS_DMA 11 - select DRM_NOMODESET 12 11 select DRM_PANEL_ORIENTATION_QUIRKS 13 12 select HDMI 14 13 select FB_CMDLINE ··· 18 19 # gallium uses SYS_kcmp for os_same_file_description() to de-duplicate 19 20 # device and dmabuf fd. Let's make sure that is available for our userspace. 20 21 select KCMP 22 + select VIDEO_NOMODESET 21 23 help 22 24 Kernel-level support for the Direct Rendering Infrastructure (DRI) 23 25 introduced in XFree86 4.0. If you say Y here, you need to select ··· 513 513 # Separate option because drm_panel_orientation_quirks.c is shared with fbdev 514 514 config DRM_PANEL_ORIENTATION_QUIRKS 515 515 tristate 516 - 517 - # Separate option because nomodeset parameter is global and expected built-in 518 - config DRM_NOMODESET 519 - bool 520 - default n 521 516 522 517 config DRM_LIB_RANDOM 523 518 bool
-1
drivers/gpu/drm/Makefile
··· 72 72 drm_privacy_screen_x86.o 73 73 obj-$(CONFIG_DRM) += drm.o 74 74 75 - obj-$(CONFIG_DRM_NOMODESET) += drm_nomodeset.o 76 75 obj-$(CONFIG_DRM_PANEL_ORIENTATION_QUIRKS) += drm_panel_orientation_quirks.o 77 76 78 77 #
+7 -5
drivers/gpu/drm/drm_nomodeset.c drivers/video/nomodeset.c
··· 3 3 #include <linux/module.h> 4 4 #include <linux/types.h> 5 5 6 - static bool drm_nomodeset; 6 + #include <video/nomodeset.h> 7 7 8 - bool drm_firmware_drivers_only(void) 8 + static bool video_nomodeset; 9 + 10 + bool video_firmware_drivers_only(void) 9 11 { 10 - return drm_nomodeset; 12 + return video_nomodeset; 11 13 } 12 - EXPORT_SYMBOL(drm_firmware_drivers_only); 14 + EXPORT_SYMBOL(video_firmware_drivers_only); 13 15 14 16 static int __init disable_modeset(char *str) 15 17 { 16 - drm_nomodeset = true; 18 + video_nomodeset = true; 17 19 18 20 pr_warn("Booted with the nomodeset parameter. Only the system framebuffer will be available\n"); 19 21
+4
drivers/video/Kconfig
··· 11 11 Support tracking and hand-over of aperture ownership. Required 12 12 by graphics drivers for firmware-provided framebuffers. 13 13 14 + config VIDEO_NOMODESET 15 + bool 16 + default n 17 + 14 18 if HAS_IOMEM 15 19 16 20 config HAVE_FB_ATMEL
+1
drivers/video/Makefile
··· 2 2 3 3 obj-$(CONFIG_APERTURE_HELPERS) += aperture.o 4 4 obj-$(CONFIG_VGASTATE) += vgastate.o 5 + obj-$(CONFIG_VIDEO_NOMODESET) += nomodeset.o 5 6 obj-$(CONFIG_HDMI) += hdmi.o 6 7 7 8 obj-$(CONFIG_VT) += console/
+7 -1
include/drm/drm_drv.h
··· 30 30 #include <linux/list.h> 31 31 #include <linux/irqreturn.h> 32 32 33 + #include <video/nomodeset.h> 34 + 33 35 #include <drm/drm_device.h> 34 36 35 37 struct drm_file; ··· 604 602 605 603 int drm_dev_set_unique(struct drm_device *dev, const char *name); 606 604 607 - extern bool drm_firmware_drivers_only(void); 605 + /* TODO: Inline drm_firmware_drivers_only() in all its callers. */ 606 + static inline bool drm_firmware_drivers_only(void) 607 + { 608 + return video_firmware_drivers_only(); 609 + } 608 610 609 611 #endif
+8
include/video/nomodeset.h
··· 1 + /* SPDX-License-Identifier: MIT */ 2 + 3 + #ifndef VIDEO_NOMODESET_H 4 + #define VIDEO_NOMODESET_H 5 + 6 + bool video_firmware_drivers_only(void); 7 + 8 + #endif