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