mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 03:17:34 +00:00
Kernel: Allow VGA-capable graphics adapters to exist with legacy VGA
If we have a VGA-capable graphics adapter that we support, we should prefer it over any legacy VGA because we wouldn't use it in legacy VGA mode in this case. This solves the problem where we would only use the legacy VGA card when both a legacy VGA card as well as a VGA-mode capable adapter is present.
This commit is contained in:
parent
ddc855ffcd
commit
fb488e2b27
6 changed files with 92 additions and 43 deletions
|
@ -9,6 +9,7 @@
|
|||
#include <AK/String.h>
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Devices/BlockDevice.h>
|
||||
#include <Kernel/PCI/Definitions.h>
|
||||
#include <Kernel/PhysicalAddress.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
@ -23,6 +24,7 @@ public:
|
|||
virtual ~GraphicsDevice() = default;
|
||||
virtual void initialize_framebuffer_devices() = 0;
|
||||
virtual Type type() const = 0;
|
||||
PCI::Address device_pci_address() const { return m_pci_address; }
|
||||
virtual void enable_consoles() = 0;
|
||||
virtual void disable_consoles() = 0;
|
||||
bool consoles_enabled() const { return m_consoles_enabled; }
|
||||
|
@ -35,8 +37,12 @@ public:
|
|||
virtual bool set_y_offset(size_t output_port_index, size_t y) = 0;
|
||||
|
||||
protected:
|
||||
GraphicsDevice() = default;
|
||||
GraphicsDevice(PCI::Address pci_address)
|
||||
: m_pci_address(pci_address)
|
||||
{
|
||||
}
|
||||
|
||||
const PCI::Address m_pci_address;
|
||||
bool m_consoles_enabled { false };
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue