Browse Source

Kernel: Enable Write-Combine for FramebufferDevice

This enables much faster writing to the userspace mapped framebuffer,
if supported by the hardware.
Tom 3 years ago
parent
commit
4383b26faa
1 changed files with 2 additions and 0 deletions
  1. 2 0
      Kernel/Graphics/FramebufferDevice.cpp

+ 2 - 0
Kernel/Graphics/FramebufferDevice.cpp

@@ -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;
 }