1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 20:27:45 +00:00

Kernel/Graphics: Restore VirtIO GPU framebuffer console functionality

This has been done in multiple ways:
- Each time we modeset the resolution via the VirtIOGPU DisplayConnector
  we ensure that the framebuffer is updated with the new resolution.
- Each time the cursor is updated we ensure that the framebuffer console
  is marked dirty so the IO Work Queue task which is scheduled to check
  if it is dirty, will flush the surface.
- We only initialize a framebuffer console after we ensure that at the
  very least a DisplayConnector has being set with a known resolution.
- We only call GenericFramebufferConsole::enable() when enabling the
  console after the important variables of the console (m_width, m_pitch
  and m_height) have been set.
This commit is contained in:
Liav A 2022-12-19 14:57:03 +02:00 committed by Andrew Kaster
parent 658f9eec6a
commit 883b0f1390
5 changed files with 50 additions and 7 deletions

View file

@ -47,6 +47,7 @@ ErrorOr<void> VirtIOGraphicsAdapter::initialize_adapter()
m_scanouts[index].display_connector = display_connector;
MUST(query_and_set_edid(index, *display_connector));
display_connector->set_safe_mode_setting_after_initialization({});
display_connector->initialize_console({});
}
return {};
}