1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 02:17:35 +00:00

Kernel: Fix framebuffer resolution modesetting after boot

If we tried to change the resolution before of this patch, we triggered
a kernel crash due to mmaping the framebuffer device again.
Therefore, on mmaping of the framebuffer device, we create an entire new
set of VMObjects and Regions for the new settings.

Then, when we change the resolution, the framebuffersconsole needs to be
updated with the new resolution and also to be refreshed with the new
settings. To ensure we handle both shrinking of the resolution and
growth of it, we only copy the right amount of available data from the
cells Region.
This commit is contained in:
Liav A 2021-05-18 21:34:22 +03:00 committed by Andreas Kling
parent 5f718c6b05
commit 87f8f892d8
9 changed files with 88 additions and 13 deletions

View file

@ -16,6 +16,8 @@ class FramebufferConsole final : public Console {
public:
static NonnullRefPtr<FramebufferConsole> initialize(PhysicalAddress, size_t width, size_t height, size_t pitch);
void set_resolution(size_t width, size_t height, size_t pitch);
virtual size_t bytes_per_base_glyph() const override;
virtual size_t chars_per_line() const override;