mirror of
https://github.com/RGBCube/serenity
synced 2025-07-28 07:07:44 +00:00
Kernel: Move all Graphics-related code into Devices/GPU directory
Like the HID, Audio and Storage subsystem, the Graphics subsystem (which handles GPUs technically) exposes unix device files (typically in /dev). To ensure consistency across the repository, move all related files to a new directory under Kernel/Devices called "GPU". Also remove the redundant "GPU" word from the VirtIO driver directory, and the word "Graphics" from GraphicsManagement.{h,cpp} filenames.
This commit is contained in:
parent
31a7dabf02
commit
9ee098b119
69 changed files with 167 additions and 167 deletions
68
Kernel/Devices/GPU/Bochs/Definitions.h
Normal file
68
Kernel/Devices/GPU/Bochs/Definitions.h
Normal file
|
@ -0,0 +1,68 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
#define VBE_DISPI_IOPORT_INDEX 0x01CE
|
||||
#define VBE_DISPI_IOPORT_DATA 0x01CF
|
||||
|
||||
#define BOCHS_DISPLAY_LITTLE_ENDIAN 0x1e1e1e1e
|
||||
#define BOCHS_DISPLAY_BIG_ENDIAN 0xbebebebe
|
||||
|
||||
#define VBE_DISPI_ID5 0xB0C5
|
||||
|
||||
enum class BochsFramebufferSettings {
|
||||
Enabled = 0x1,
|
||||
LinearFramebuffer = 0x40,
|
||||
};
|
||||
|
||||
enum class BochsDISPIRegisters {
|
||||
ID = 0x0,
|
||||
XRES = 0x1,
|
||||
YRES = 0x2,
|
||||
BPP = 0x3,
|
||||
ENABLE = 0x4,
|
||||
BANK = 0x5,
|
||||
VIRT_WIDTH = 0x6,
|
||||
VIRT_HEIGHT = 0x7,
|
||||
X_OFFSET = 0x8,
|
||||
Y_OFFSET = 0x9,
|
||||
VIDEO_RAM_64K_CHUNKS_COUNT = 0xA,
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] DISPIInterface {
|
||||
u16 index_id;
|
||||
u16 xres;
|
||||
u16 yres;
|
||||
u16 bpp;
|
||||
u16 enable;
|
||||
u16 bank;
|
||||
u16 virt_width;
|
||||
u16 virt_height;
|
||||
u16 x_offset;
|
||||
u16 y_offset;
|
||||
u16 vram_64k_chunks_count;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] ExtensionRegisters {
|
||||
u32 region_size;
|
||||
u32 framebuffer_byteorder;
|
||||
};
|
||||
|
||||
struct [[gnu::packed]] BochsDisplayMMIORegisters {
|
||||
u8 edid_data[0x400];
|
||||
u16 vga_ioports[0x10];
|
||||
u8 reserved[0xE0];
|
||||
DISPIInterface bochs_regs;
|
||||
u8 reserved2[0x100 - sizeof(DISPIInterface)];
|
||||
ExtensionRegisters extension_regs;
|
||||
};
|
||||
|
||||
}
|
85
Kernel/Devices/GPU/Bochs/GraphicsAdapter.cpp
Normal file
85
Kernel/Devices/GPU/Bochs/GraphicsAdapter.cpp
Normal file
|
@ -0,0 +1,85 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <AK/Atomic.h>
|
||||
#include <AK/Checked.h>
|
||||
#include <AK/Try.h>
|
||||
#if ARCH(X86_64)
|
||||
# include <Kernel/Arch/x86_64/Hypervisor/BochsDisplayConnector.h>
|
||||
#endif
|
||||
#include <Kernel/Bus/PCI/API.h>
|
||||
#include <Kernel/Bus/PCI/IDs.h>
|
||||
#include <Kernel/Devices/GPU/Bochs/Definitions.h>
|
||||
#include <Kernel/Devices/GPU/Bochs/GraphicsAdapter.h>
|
||||
#include <Kernel/Devices/GPU/Bochs/QEMUDisplayConnector.h>
|
||||
#include <Kernel/Devices/GPU/Console/ContiguousFramebufferConsole.h>
|
||||
#include <Kernel/Devices/GPU/Management.h>
|
||||
#include <Kernel/Memory/TypedMapping.h>
|
||||
#include <Kernel/Sections.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
UNMAP_AFTER_INIT ErrorOr<bool> BochsGraphicsAdapter::probe(PCI::DeviceIdentifier const& pci_device_identifier)
|
||||
{
|
||||
PCI::HardwareID id = pci_device_identifier.hardware_id();
|
||||
if (id.vendor_id == PCI::VendorID::QEMUOld && id.device_id == 0x1111)
|
||||
return true;
|
||||
if (id.vendor_id == PCI::VendorID::VirtualBox && id.device_id == 0xbeef)
|
||||
return true;
|
||||
return false;
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT ErrorOr<NonnullLockRefPtr<GenericGraphicsAdapter>> BochsGraphicsAdapter::create(PCI::DeviceIdentifier const& pci_device_identifier)
|
||||
{
|
||||
auto adapter = TRY(adopt_nonnull_lock_ref_or_enomem(new (nothrow) BochsGraphicsAdapter(pci_device_identifier)));
|
||||
MUST(adapter->initialize_adapter(pci_device_identifier));
|
||||
return adapter;
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT BochsGraphicsAdapter::BochsGraphicsAdapter(PCI::DeviceIdentifier const& device_identifier)
|
||||
: PCI::Device(const_cast<PCI::DeviceIdentifier&>(device_identifier))
|
||||
{
|
||||
}
|
||||
|
||||
UNMAP_AFTER_INIT ErrorOr<void> BochsGraphicsAdapter::initialize_adapter(PCI::DeviceIdentifier const& pci_device_identifier)
|
||||
{
|
||||
// Note: If we use VirtualBox graphics adapter (which is based on Bochs one), we need to use IO ports
|
||||
// Note: Bochs (the real bochs graphics adapter in the Bochs emulator) uses revision ID of 0x0
|
||||
// and doesn't support memory-mapped IO registers.
|
||||
|
||||
// Note: In non x86-builds, we should never encounter VirtualBox hardware nor Pure Bochs VBE graphics,
|
||||
// so just assume we can use the QEMU BochsVBE-compatible graphics adapter only.
|
||||
auto bar0_space_size = PCI::get_BAR_space_size(pci_device_identifier, PCI::HeaderType0BaseRegister::BAR0);
|
||||
#if ARCH(X86_64)
|
||||
bool virtual_box_hardware = (pci_device_identifier.hardware_id().vendor_id == 0x80ee && pci_device_identifier.hardware_id().device_id == 0xbeef);
|
||||
if (pci_device_identifier.revision_id().value() == 0x0 || virtual_box_hardware) {
|
||||
m_display_connector = BochsDisplayConnector::must_create(PhysicalAddress(PCI::get_BAR0(pci_device_identifier) & PCI::bar_address_mask), bar0_space_size, virtual_box_hardware);
|
||||
} else {
|
||||
auto registers_mapping = TRY(Memory::map_typed_writable<BochsDisplayMMIORegisters volatile>(PhysicalAddress(PCI::get_BAR2(pci_device_identifier) & PCI::bar_address_mask)));
|
||||
VERIFY(registers_mapping.region);
|
||||
m_display_connector = QEMUDisplayConnector::must_create(PhysicalAddress(PCI::get_BAR0(pci_device_identifier) & PCI::bar_address_mask), bar0_space_size, move(registers_mapping));
|
||||
}
|
||||
#else
|
||||
auto registers_mapping = TRY(Memory::map_typed_writable<BochsDisplayMMIORegisters volatile>(PhysicalAddress(PCI::get_BAR2(pci_device_identifier) & PCI::bar_address_mask)));
|
||||
VERIFY(registers_mapping.region);
|
||||
m_display_connector = QEMUDisplayConnector::must_create(PhysicalAddress(PCI::get_BAR0(pci_device_identifier) & PCI::bar_address_mask), bar0_space_size, move(registers_mapping));
|
||||
#endif
|
||||
|
||||
// Note: According to Gerd Hoffmann - "The linux driver simply does
|
||||
// the unblank unconditionally. With bochs-display this is not needed but
|
||||
// it also has no bad side effect".
|
||||
// FIXME: If the error is ENOTIMPL, ignore it for now until we implement
|
||||
// unblank support for VBoxDisplayConnector class too.
|
||||
auto result = m_display_connector->unblank();
|
||||
if (result.is_error() && result.error().code() != ENOTIMPL)
|
||||
return result;
|
||||
|
||||
TRY(m_display_connector->set_safe_mode_setting());
|
||||
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
39
Kernel/Devices/GPU/Bochs/GraphicsAdapter.h
Normal file
39
Kernel/Devices/GPU/Bochs/GraphicsAdapter.h
Normal file
|
@ -0,0 +1,39 @@
|
|||
/*
|
||||
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Types.h>
|
||||
#include <Kernel/Bus/PCI/Device.h>
|
||||
#include <Kernel/Devices/GPU/Bochs/Definitions.h>
|
||||
#include <Kernel/Devices/GPU/Console/GenericFramebufferConsole.h>
|
||||
#include <Kernel/Devices/GPU/GenericGraphicsAdapter.h>
|
||||
#include <Kernel/Memory/PhysicalAddress.h>
|
||||
#include <Kernel/Memory/TypedMapping.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
class GraphicsManagement;
|
||||
struct BochsDisplayMMIORegisters;
|
||||
|
||||
class BochsGraphicsAdapter final : public GenericGraphicsAdapter
|
||||
, public PCI::Device {
|
||||
friend class GraphicsManagement;
|
||||
|
||||
public:
|
||||
static ErrorOr<bool> probe(PCI::DeviceIdentifier const&);
|
||||
static ErrorOr<NonnullLockRefPtr<GenericGraphicsAdapter>> create(PCI::DeviceIdentifier const&);
|
||||
virtual ~BochsGraphicsAdapter() = default;
|
||||
virtual StringView device_name() const override { return "BochsGraphicsAdapter"sv; }
|
||||
|
||||
private:
|
||||
ErrorOr<void> initialize_adapter(PCI::DeviceIdentifier const&);
|
||||
|
||||
explicit BochsGraphicsAdapter(PCI::DeviceIdentifier const&);
|
||||
|
||||
LockRefPtr<DisplayConnector> m_display_connector;
|
||||
};
|
||||
}
|
183
Kernel/Devices/GPU/Bochs/QEMUDisplayConnector.cpp
Normal file
183
Kernel/Devices/GPU/Bochs/QEMUDisplayConnector.cpp
Normal file
|
@ -0,0 +1,183 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/Debug.h>
|
||||
#include <Kernel/Devices/DeviceManagement.h>
|
||||
#include <Kernel/Devices/GPU/Bochs/QEMUDisplayConnector.h>
|
||||
#include <Kernel/Devices/GPU/Console/ContiguousFramebufferConsole.h>
|
||||
#include <Kernel/Devices/GPU/Management.h>
|
||||
#include <LibEDID/Definitions.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
NonnullLockRefPtr<QEMUDisplayConnector> QEMUDisplayConnector::must_create(PhysicalAddress framebuffer_address, size_t framebuffer_resource_size, Memory::TypedMapping<BochsDisplayMMIORegisters volatile> registers_mapping)
|
||||
{
|
||||
auto device_or_error = DeviceManagement::try_create_device<QEMUDisplayConnector>(framebuffer_address, framebuffer_resource_size, move(registers_mapping));
|
||||
VERIFY(!device_or_error.is_error());
|
||||
auto connector = device_or_error.release_value();
|
||||
MUST(connector->create_attached_framebuffer_console());
|
||||
MUST(connector->fetch_and_initialize_edid());
|
||||
return connector;
|
||||
}
|
||||
|
||||
ErrorOr<void> QEMUDisplayConnector::fetch_and_initialize_edid()
|
||||
{
|
||||
Array<u8, 128> bochs_edid;
|
||||
static_assert(sizeof(BochsDisplayMMIORegisters::edid_data) >= sizeof(EDID::Definitions::EDID));
|
||||
memcpy(bochs_edid.data(), (u8 const*)(m_registers.base_address().offset(__builtin_offsetof(BochsDisplayMMIORegisters, edid_data)).as_ptr()), sizeof(bochs_edid));
|
||||
set_edid_bytes(bochs_edid);
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> QEMUDisplayConnector::create_attached_framebuffer_console()
|
||||
{
|
||||
// We assume safe resolution is 1024x768x32
|
||||
m_framebuffer_console = Graphics::ContiguousFramebufferConsole::initialize(m_framebuffer_address.value(), 1024, 768, 1024 * sizeof(u32));
|
||||
GraphicsManagement::the().set_console(*m_framebuffer_console);
|
||||
return {};
|
||||
}
|
||||
|
||||
void QEMUDisplayConnector::enable_console()
|
||||
{
|
||||
VERIFY(m_control_lock.is_locked());
|
||||
VERIFY(m_framebuffer_console);
|
||||
m_framebuffer_console->enable();
|
||||
}
|
||||
|
||||
void QEMUDisplayConnector::disable_console()
|
||||
{
|
||||
VERIFY(m_control_lock.is_locked());
|
||||
VERIFY(m_framebuffer_console);
|
||||
m_framebuffer_console->disable();
|
||||
}
|
||||
|
||||
ErrorOr<void> QEMUDisplayConnector::flush_first_surface()
|
||||
{
|
||||
return Error::from_errno(ENOTSUP);
|
||||
}
|
||||
|
||||
ErrorOr<void> QEMUDisplayConnector::set_safe_mode_setting()
|
||||
{
|
||||
DisplayConnector::ModeSetting safe_mode_set {
|
||||
.horizontal_stride = 1024 * sizeof(u32),
|
||||
.pixel_clock_in_khz = 0, // Note: There's no pixel clock in paravirtualized hardware
|
||||
.horizontal_active = 1024,
|
||||
.horizontal_front_porch_pixels = 0, // Note: There's no horizontal_front_porch_pixels in paravirtualized hardware
|
||||
.horizontal_sync_time_pixels = 0, // Note: There's no horizontal_sync_time_pixels in paravirtualized hardware
|
||||
.horizontal_blank_pixels = 0, // Note: There's no horizontal_blank_pixels in paravirtualized hardware
|
||||
.vertical_active = 768,
|
||||
.vertical_front_porch_lines = 0, // Note: There's no vertical_front_porch_lines in paravirtualized hardware
|
||||
.vertical_sync_time_lines = 0, // Note: There's no vertical_sync_time_lines in paravirtualized hardware
|
||||
.vertical_blank_lines = 0, // Note: There's no vertical_blank_lines in paravirtualized hardware
|
||||
.horizontal_offset = 0,
|
||||
.vertical_offset = 0,
|
||||
};
|
||||
return set_mode_setting(safe_mode_set);
|
||||
}
|
||||
|
||||
QEMUDisplayConnector::QEMUDisplayConnector(PhysicalAddress framebuffer_address, size_t framebuffer_resource_size, Memory::TypedMapping<BochsDisplayMMIORegisters volatile> registers_mapping)
|
||||
: DisplayConnector(framebuffer_address, framebuffer_resource_size, false)
|
||||
, m_registers(move(registers_mapping))
|
||||
{
|
||||
}
|
||||
|
||||
QEMUDisplayConnector::IndexID QEMUDisplayConnector::index_id() const
|
||||
{
|
||||
return m_registers->bochs_regs.index_id;
|
||||
}
|
||||
|
||||
void QEMUDisplayConnector::set_framebuffer_to_big_endian_format()
|
||||
{
|
||||
VERIFY(m_modeset_lock.is_locked());
|
||||
dbgln_if(BXVGA_DEBUG, "QEMUDisplayConnector set_framebuffer_to_big_endian_format");
|
||||
full_memory_barrier();
|
||||
if (m_registers->extension_regs.region_size == 0xFFFFFFFF || m_registers->extension_regs.region_size == 0)
|
||||
return;
|
||||
full_memory_barrier();
|
||||
m_registers->extension_regs.framebuffer_byteorder = BOCHS_DISPLAY_BIG_ENDIAN;
|
||||
full_memory_barrier();
|
||||
}
|
||||
|
||||
void QEMUDisplayConnector::set_framebuffer_to_little_endian_format()
|
||||
{
|
||||
VERIFY(m_modeset_lock.is_locked());
|
||||
dbgln_if(BXVGA_DEBUG, "QEMUDisplayConnector set_framebuffer_to_little_endian_format");
|
||||
full_memory_barrier();
|
||||
if (m_registers->extension_regs.region_size == 0xFFFFFFFF || m_registers->extension_regs.region_size == 0)
|
||||
return;
|
||||
full_memory_barrier();
|
||||
m_registers->extension_regs.framebuffer_byteorder = BOCHS_DISPLAY_LITTLE_ENDIAN;
|
||||
full_memory_barrier();
|
||||
}
|
||||
|
||||
ErrorOr<void> QEMUDisplayConnector::unblank()
|
||||
{
|
||||
SpinlockLocker locker(m_modeset_lock);
|
||||
full_memory_barrier();
|
||||
m_registers->vga_ioports[0] = 0x20;
|
||||
full_memory_barrier();
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> QEMUDisplayConnector::set_y_offset(size_t y_offset)
|
||||
{
|
||||
VERIFY(m_modeset_lock.is_locked());
|
||||
m_registers->bochs_regs.y_offset = y_offset;
|
||||
return {};
|
||||
}
|
||||
|
||||
ErrorOr<void> QEMUDisplayConnector::set_mode_setting(ModeSetting const& mode_setting)
|
||||
{
|
||||
SpinlockLocker locker(m_modeset_lock);
|
||||
VERIFY(m_framebuffer_console);
|
||||
size_t width = mode_setting.horizontal_active;
|
||||
size_t height = mode_setting.vertical_active;
|
||||
|
||||
if (Checked<size_t>::multiplication_would_overflow(width, height, sizeof(u32)))
|
||||
return EOVERFLOW;
|
||||
|
||||
dbgln_if(BXVGA_DEBUG, "QEMUDisplayConnector resolution registers set to - {}x{}", width, height);
|
||||
m_registers->bochs_regs.enable = 0;
|
||||
full_memory_barrier();
|
||||
m_registers->bochs_regs.xres = width;
|
||||
m_registers->bochs_regs.yres = height;
|
||||
m_registers->bochs_regs.virt_width = width;
|
||||
m_registers->bochs_regs.virt_height = height * 2;
|
||||
m_registers->bochs_regs.bpp = 32;
|
||||
full_memory_barrier();
|
||||
m_registers->bochs_regs.enable = to_underlying(BochsFramebufferSettings::Enabled) | to_underlying(BochsFramebufferSettings::LinearFramebuffer);
|
||||
full_memory_barrier();
|
||||
m_registers->bochs_regs.bank = 0;
|
||||
if (index_id().value() == VBE_DISPI_ID5) {
|
||||
set_framebuffer_to_little_endian_format();
|
||||
}
|
||||
|
||||
if ((u16)width != m_registers->bochs_regs.xres || (u16)height != m_registers->bochs_regs.yres) {
|
||||
return Error::from_errno(ENOTIMPL);
|
||||
}
|
||||
|
||||
m_framebuffer_console->set_resolution(width, height, width * sizeof(u32));
|
||||
|
||||
DisplayConnector::ModeSetting mode_set {
|
||||
.horizontal_stride = m_registers->bochs_regs.xres * sizeof(u32),
|
||||
.pixel_clock_in_khz = 0, // Note: There's no pixel clock in paravirtualized hardware
|
||||
.horizontal_active = m_registers->bochs_regs.xres,
|
||||
.horizontal_front_porch_pixels = 0, // Note: There's no horizontal_front_porch_pixels in paravirtualized hardware
|
||||
.horizontal_sync_time_pixels = 0, // Note: There's no horizontal_sync_time_pixels in paravirtualized hardware
|
||||
.horizontal_blank_pixels = 0, // Note: There's no horizontal_blank_pixels in paravirtualized hardware
|
||||
.vertical_active = m_registers->bochs_regs.yres,
|
||||
.vertical_front_porch_lines = 0, // Note: There's no vertical_front_porch_lines in paravirtualized hardware
|
||||
.vertical_sync_time_lines = 0, // Note: There's no vertical_sync_time_lines in paravirtualized hardware
|
||||
.vertical_blank_lines = 0, // Note: There's no vertical_blank_lines in paravirtualized hardware
|
||||
.horizontal_offset = 0,
|
||||
.vertical_offset = 0,
|
||||
};
|
||||
|
||||
m_current_mode_setting = mode_set;
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
59
Kernel/Devices/GPU/Bochs/QEMUDisplayConnector.h
Normal file
59
Kernel/Devices/GPU/Bochs/QEMUDisplayConnector.h
Normal file
|
@ -0,0 +1,59 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#pragma once
|
||||
|
||||
#include <AK/Try.h>
|
||||
#include <Kernel/Devices/GPU/Bochs/Definitions.h>
|
||||
#include <Kernel/Devices/GPU/Console/GenericFramebufferConsole.h>
|
||||
#include <Kernel/Devices/GPU/DisplayConnector.h>
|
||||
#include <Kernel/Library/LockRefPtr.h>
|
||||
#include <Kernel/Locking/Spinlock.h>
|
||||
#include <Kernel/Memory/TypedMapping.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
struct BochsDisplayMMIORegisters;
|
||||
class QEMUDisplayConnector final
|
||||
: public DisplayConnector {
|
||||
friend class BochsGraphicsAdapter;
|
||||
friend class DeviceManagement;
|
||||
|
||||
public:
|
||||
AK_TYPEDEF_DISTINCT_ORDERED_ID(u16, IndexID);
|
||||
|
||||
static NonnullLockRefPtr<QEMUDisplayConnector> must_create(PhysicalAddress framebuffer_address, size_t framebuffer_resource_size, Memory::TypedMapping<BochsDisplayMMIORegisters volatile>);
|
||||
|
||||
private:
|
||||
IndexID index_id() const;
|
||||
|
||||
ErrorOr<void> fetch_and_initialize_edid();
|
||||
ErrorOr<void> create_attached_framebuffer_console();
|
||||
QEMUDisplayConnector(PhysicalAddress framebuffer_address, size_t framebuffer_resource_size, Memory::TypedMapping<BochsDisplayMMIORegisters volatile>);
|
||||
|
||||
virtual bool mutable_mode_setting_capable() const override final { return true; }
|
||||
virtual bool double_framebuffering_capable() const override { return true; }
|
||||
virtual ErrorOr<void> set_mode_setting(ModeSetting const&) override;
|
||||
virtual ErrorOr<void> set_y_offset(size_t y) override;
|
||||
virtual ErrorOr<void> set_safe_mode_setting() override final;
|
||||
virtual ErrorOr<void> unblank() override;
|
||||
virtual bool partial_flush_support() const override final { return false; }
|
||||
virtual bool flush_support() const override final { return false; }
|
||||
// Note: Paravirtualized hardware doesn't require a defined refresh rate for modesetting.
|
||||
virtual bool refresh_rate_support() const override final { return false; }
|
||||
virtual ErrorOr<void> flush_first_surface() override final;
|
||||
|
||||
void set_framebuffer_to_big_endian_format();
|
||||
void set_framebuffer_to_little_endian_format();
|
||||
|
||||
virtual void enable_console() override final;
|
||||
virtual void disable_console() override final;
|
||||
|
||||
LockRefPtr<Graphics::GenericFramebufferConsole> m_framebuffer_console;
|
||||
|
||||
Memory::TypedMapping<BochsDisplayMMIORegisters volatile> m_registers;
|
||||
};
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue