1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-27 01:47:35 +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

@ -39,8 +39,9 @@ public:
void draw_ntsc_test_pattern(Badge<VirtIOGraphicsAdapter>);
void initialize_console(Badge<VirtIOGraphicsAdapter>);
private:
void initialize_console();
virtual bool mutable_mode_setting_capable() const override { return true; }
virtual bool double_framebuffering_capable() const override { return false; }
virtual bool partial_flush_support() const override { return true; }
@ -82,7 +83,7 @@ private:
Graphics::VirtIOGPU::ContextID m_kernel_context_id;
NonnullLockRefPtr<VirtIOGraphicsAdapter> m_graphics_adapter;
LockRefPtr<Graphics::Console> m_console;
LockRefPtr<Graphics::VirtIOGPU::Console> m_console;
Graphics::VirtIOGPU::Protocol::DisplayInfoResponse::Display m_display_info {};
Graphics::VirtIOGPU::ScanoutID m_scanout_id;