1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:57:35 +00:00

Kernel/Graphics: Simplify the feature level of the Graphics subsystem

Instead of letting the user to determine whether framebuffer devices
will be created (which is useless because they are gone by now), let's
simplify the flow by allowing the user to choose between full, limited
or disabled functionality. The determination happens only once, so, if
the user decided to disable graphics support, the initialize method
exits immediately. If limited functionality is chosen, then a generic
DisplayConnector is initialized with the preset framebuffer resolution,
if present, and then the initialize method exits. As a default, the code
proceeds to initialize all drivers as usual.
This commit is contained in:
Liav A 2022-04-30 15:53:02 +03:00 committed by Andreas Kling
parent e301af8352
commit d49a35df31
5 changed files with 35 additions and 50 deletions

View file

@ -53,10 +53,10 @@ public:
No,
};
enum class FrameBufferDevices {
enum class GraphicsSubsystemMode {
Enabled,
ConsoleOnly,
BootloaderOnly
Limited,
Disabled
};
[[nodiscard]] StringView string() const { return m_string->view(); }
@ -74,7 +74,7 @@ public:
[[nodiscard]] bool is_pci_disabled() const;
[[nodiscard]] bool is_legacy_time_enabled() const;
[[nodiscard]] bool is_pc_speaker_enabled() const;
[[nodiscard]] FrameBufferDevices are_framebuffer_devices_enabled() const;
[[nodiscard]] GraphicsSubsystemMode graphics_subsystem_mode() const;
[[nodiscard]] bool is_force_pio() const;
[[nodiscard]] AcpiFeatureLevel acpi_feature_level() const;
[[nodiscard]] StringView system_mode() const;