1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
// 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);
当你的天空 突然 下起了大雨 那是我 在为你 炸乌云