mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 06:37: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:
parent
5f718c6b05
commit
87f8f892d8
9 changed files with 88 additions and 13 deletions
|
@ -60,6 +60,7 @@ class VirtualConsole final : public TTY
|
|||
public:
|
||||
struct Line {
|
||||
bool dirty;
|
||||
size_t length;
|
||||
};
|
||||
|
||||
struct Cell {
|
||||
|
@ -80,6 +81,8 @@ public:
|
|||
|
||||
size_t index() const { return m_index; }
|
||||
|
||||
void refresh_after_resolution_change();
|
||||
|
||||
bool is_graphical() { return m_graphical; }
|
||||
void set_graphical(bool graphical);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue