1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-31 18:28:12 +00:00

Kernel: Don't override FramebufferDevice's memory regions on mmap

This additionally refactors FramebufferDevice::try_to_initialize to not
leave the FramebufferDevice in an invalid state on errors.
This also unifies the logic between FramebufferDevice::mmap and
FramebufferDevice::try_to_initialize.
This comes with the drawback of removing the UNMAP_AFTER_INIT attribute
from this function, which wasn't honoured by IntelNativeGraphicsAdapter
anyway.
This commit is contained in:
Hendiadyoin1 2022-02-18 16:53:17 +01:00 committed by Brian Gianforcaro
parent 790d620b39
commit 85ba70d86f
2 changed files with 22 additions and 12 deletions

View file

@ -67,6 +67,7 @@ private:
bool m_graphical_writes_enabled { true };
bool m_write_combine { true };
bool m_initialized { false };
RefPtr<Memory::AnonymousVMObject> m_userspace_real_framebuffer_vmobject;
Memory::Region* m_userspace_framebuffer_region { nullptr };