1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-05-26 02:05:08 +00:00

Kernel/Graphics: Merge VirtIO GraphicsAdapter and VirtIO GPU code

A VirtIO graphics adapter is really the VirtIO GPU, so the virtualized
hardware has no distinction between both components so there's no
need to put such distinction in software.

We might need to split things in the future, but when we do so, we must
take proper care to ensure that the interface between the components
is correct and use the usual codebase patterns.
This commit is contained in:
Liav A 2021-09-21 10:08:28 +03:00 committed by Idan Horowitz
parent a9538b5879
commit f476b49fd8
11 changed files with 435 additions and 474 deletions

View file

@ -101,19 +101,19 @@ UNMAP_AFTER_INIT KResult FramebufferDevice::initialize()
UNMAP_AFTER_INIT FramebufferDevice::FramebufferDevice(const GraphicsDevice& adapter, size_t output_port_index)
: BlockDevice(29, GraphicsManagement::the().allocate_minor_device_number())
, m_output_port_index(output_port_index)
, m_graphics_adapter(adapter)
, m_output_port_index(output_port_index)
{
}
UNMAP_AFTER_INIT FramebufferDevice::FramebufferDevice(const GraphicsDevice& adapter, size_t output_port_index, PhysicalAddress addr, size_t width, size_t height, size_t pitch)
: BlockDevice(29, GraphicsManagement::the().allocate_minor_device_number())
, m_graphics_adapter(adapter)
, m_framebuffer_address(addr)
, m_framebuffer_pitch(pitch)
, m_framebuffer_width(width)
, m_framebuffer_height(height)
, m_output_port_index(output_port_index)
, m_graphics_adapter(adapter)
{
VERIFY(!m_framebuffer_address.is_null());
VERIFY(m_framebuffer_pitch);