mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 17:07:35 +00:00
Kernel/Graphics: Allocate 16 MiB framebuffer if failed allocating larger
We try our best to ensure a DisplayConnector initialization succeeds, and this makes the Intel driver to work again, because if we can't allocate a Region for the whole PCI BAR mapped region, then we will try to allocate a Region with 16 MiB window size, so it doesn't eat the entire Kernel-allocated virtual memory space.
This commit is contained in:
parent
25bb293629
commit
7625f7db73
2 changed files with 29 additions and 12 deletions
|
@ -148,6 +148,8 @@ private:
|
|||
virtual void will_be_destroyed() override;
|
||||
virtual ErrorOr<void> after_inserting() override;
|
||||
|
||||
ErrorOr<void> allocate_framebuffer_resources(size_t rounded_size);
|
||||
|
||||
ErrorOr<bool> ioctl_requires_ownership(unsigned request) const;
|
||||
|
||||
OwnPtr<Memory::Region> m_framebuffer_region;
|
||||
|
@ -159,7 +161,7 @@ private:
|
|||
|
||||
protected:
|
||||
Optional<PhysicalAddress> const m_framebuffer_address;
|
||||
size_t const m_framebuffer_resource_size;
|
||||
size_t m_framebuffer_resource_size;
|
||||
|
||||
private:
|
||||
LockRefPtr<Memory::SharedFramebufferVMObject> m_shared_framebuffer_vmobject;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue