mirror of
https://github.com/RGBCube/serenity
synced 2025-05-20 11:55:08 +00:00
Kernel: Don't enable write-combine for the Bochs framebuffer device
While write-combine greatly improves performance on bare metal, QEMU appears to perform significantly worse when enabling it.
This commit is contained in:
parent
c8aae1ac52
commit
413bc9976c
3 changed files with 9 additions and 2 deletions
|
@ -127,6 +127,8 @@ UNMAP_AFTER_INIT void BochsGraphicsAdapter::initialize_framebuffer_devices()
|
|||
{
|
||||
// FIXME: Find a better way to determine default resolution...
|
||||
m_framebuffer_device = FramebufferDevice::create(*this, PhysicalAddress(PCI::get_BAR0(pci_address()) & 0xfffffff0), 1024, 768, 1024 * sizeof(u32));
|
||||
// While write-combine helps greatly on actual hardware, it greatly reduces performance in QEMU
|
||||
m_framebuffer_device->enable_write_combine(false);
|
||||
// FIXME: Would be nice to be able to return a ErrorOr<void> here.
|
||||
VERIFY(!m_framebuffer_device->try_to_initialize().is_error());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue