summaryrefslogtreecommitdiff
path: root/Kernel/TTY/ConsoleManagement.h
diff options
context:
space:
mode:
authorLiav A <liavalb@gmail.com>2021-05-18 21:34:22 +0300
committerAndreas Kling <kling@serenityos.org>2021-05-21 08:08:33 +0200
commit87f8f892d858a14b5c03b7bd7fdc9517a8f4cb84 (patch)
tree7076b1d1989a9c29fe3d84948faa25af09b9a088 /Kernel/TTY/ConsoleManagement.h
parent5f718c6b05a638d200b9f546cc7f67cc77cf4b66 (diff)
downloadserenity-87f8f892d858a14b5c03b7bd7fdc9517a8f4cb84.zip
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.
Diffstat (limited to 'Kernel/TTY/ConsoleManagement.h')
-rw-r--r--Kernel/TTY/ConsoleManagement.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/Kernel/TTY/ConsoleManagement.h b/Kernel/TTY/ConsoleManagement.h
index eb05156a37..7e466eb23d 100644
--- a/Kernel/TTY/ConsoleManagement.h
+++ b/Kernel/TTY/ConsoleManagement.h
@@ -26,6 +26,8 @@ public:
void switch_to(unsigned);
void initialize();
+ void resolution_was_changed();
+
void switch_to_debug() { switch_to(1); }
NonnullRefPtr<VirtualConsole> first_tty() const { return m_consoles[0]; }