2021-11-12 21:32:27 +08:00
|
|
|
// SPDX-License-Identifier: GPL-2.0
|
|
|
|
|
|
|
|
#include <linux/module.h>
|
|
|
|
#include <linux/types.h>
|
|
|
|
|
2022-11-11 21:30:23 +08:00
|
|
|
#include <video/nomodeset.h>
|
2021-11-12 21:32:27 +08:00
|
|
|
|
2022-11-11 21:30:23 +08:00
|
|
|
static bool video_nomodeset;
|
|
|
|
|
|
|
|
bool video_firmware_drivers_only(void)
|
2021-11-12 21:32:27 +08:00
|
|
|
{
|
2022-11-11 21:30:23 +08:00
|
|
|
return video_nomodeset;
|
2021-11-12 21:32:27 +08:00
|
|
|
}
|
2022-11-11 21:30:23 +08:00
|
|
|
EXPORT_SYMBOL(video_firmware_drivers_only);
|
2021-11-12 21:32:27 +08:00
|
|
|
|
|
|
|
static int __init disable_modeset(char *str)
|
|
|
|
{
|
2022-11-11 21:30:23 +08:00
|
|
|
video_nomodeset = true;
|
2021-11-12 21:32:27 +08:00
|
|
|
|
2021-11-12 21:32:30 +08:00
|
|
|
pr_warn("Booted with the nomodeset parameter. Only the system framebuffer will be available\n");
|
2021-11-12 21:32:27 +08:00
|
|
|
|
|
|
|
return 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
/* Disable kernel modesetting */
|
|
|
|
__setup("nomodeset", disable_modeset);
|