mirror of
https://mirrors.bfsu.edu.cn/git/linux.git
synced 2024-12-03 00:54:09 +08:00
9a758d8756
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
27 lines
520 B
C
27 lines
520 B
C
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
#include <linux/module.h>
|
|
#include <linux/types.h>
|
|
|
|
#include <video/nomodeset.h>
|
|
|
|
static bool video_nomodeset;
|
|
|
|
bool video_firmware_drivers_only(void)
|
|
{
|
|
return video_nomodeset;
|
|
}
|
|
EXPORT_SYMBOL(video_firmware_drivers_only);
|
|
|
|
static int __init disable_modeset(char *str)
|
|
{
|
|
video_nomodeset = true;
|
|
|
|
pr_warn("Booted with the nomodeset parameter. Only the system framebuffer will be available\n");
|
|
|
|
return 1;
|
|
}
|
|
|
|
/* Disable kernel modesetting */
|
|
__setup("nomodeset", disable_modeset);
|