mirror of
https://github.com/RGBCube/serenity
synced 2025-07-26 12:17:35 +00:00
Kernel: Enable additional VirtIO displays only on first resolution set
Also, only allocate the amount of memory we actually need for the given resolution.
This commit is contained in:
parent
8749235046
commit
56cd0f929e
5 changed files with 52 additions and 40 deletions
|
@ -100,14 +100,8 @@ void VirtIOGPU::query_display_information()
|
|||
auto& scanout = m_scanouts[i].display_info;
|
||||
scanout = response.scanout_modes[i];
|
||||
dbgln_if(VIRTIO_DEBUG, "Scanout {}: enabled: {} x: {}, y: {}, width: {}, height: {}", i, !!scanout.enabled, scanout.rect.x, scanout.rect.y, scanout.rect.width, scanout.rect.height);
|
||||
if (scanout.enabled && !m_default_scanout.has_value()) {
|
||||
if (scanout.enabled && !m_default_scanout.has_value())
|
||||
m_default_scanout = i;
|
||||
} else if (i < m_num_scanouts) {
|
||||
// TODO: We should not enable all displays until the first resolution set
|
||||
scanout.rect.width = 1024;
|
||||
scanout.rect.height = 768;
|
||||
scanout.enabled = true;
|
||||
}
|
||||
}
|
||||
VERIFY(m_default_scanout.has_value());
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue