Skip to content

Commit

Permalink
Kernel: Enable Write-Combine for FramebufferDevice
Browse files Browse the repository at this point in the history
This enables much faster writing to the userspace mapped framebuffer,
if supported by the hardware.
  • Loading branch information
tomuta authored and IdanHo committed Jan 26, 2022
1 parent 6e46e21 commit 4383b26
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions Kernel/Graphics/FramebufferDevice.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,8 @@ ErrorOr<Memory::Region*> FramebufferDevice::mmap(Process& process, OpenFileDescr
"Framebuffer",
prot,
shared));
if (auto result = m_userspace_framebuffer_region->set_write_combine(true); result.is_error())
dbgln("FramebufferDevice: Failed to enable Write-Combine on Framebuffer: {}", result.error());
return m_userspace_framebuffer_region;
}

Expand Down

0 comments on commit 4383b26

Please sign in to comment.