mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 00:45:08 +00:00
Kernel/Graphics: Unblank the screen when initializing bochs display
This commit is contained in:
parent
3fae7ca113
commit
00e4cc23cb
2 changed files with 14 additions and 0 deletions
|
@ -65,6 +65,11 @@ UNMAP_AFTER_INIT BochsGraphicsAdapter::BochsGraphicsAdapter(PCI::Address pci_add
|
|||
auto id = PCI::get_id(pci_address);
|
||||
if (id.vendor_id == 0x80ee && id.device_id == 0xbeef)
|
||||
m_io_required = true;
|
||||
|
||||
// FIXME: Although this helps with setting the screen to work on some cases,
|
||||
// we need to check we actually can access the VGA MMIO remapped ioports before
|
||||
// doing the unblanking.
|
||||
unblank();
|
||||
set_safe_resolution();
|
||||
}
|
||||
|
||||
|
@ -82,6 +87,14 @@ GraphicsDevice::Type BochsGraphicsAdapter::type() const
|
|||
return Type::Bochs;
|
||||
}
|
||||
|
||||
void BochsGraphicsAdapter::unblank()
|
||||
{
|
||||
auto registers = map_typed_writable<volatile BochsDisplayMMIORegisters>(m_mmio_registers);
|
||||
full_memory_barrier();
|
||||
registers->vga_ioports[0] = 0x20;
|
||||
full_memory_barrier();
|
||||
}
|
||||
|
||||
void BochsGraphicsAdapter::set_safe_resolution()
|
||||
{
|
||||
VERIFY(m_framebuffer_console);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue