mirror of
https://github.com/RGBCube/serenity
synced 2025-05-21 11:05:08 +00:00

Now that the old PCI::Device was removed, we can complete the PCI changes by making the PCI::DeviceController to be named PCI::Device. Really the entire purpose and the distinction between the two was about interrupts, but since this is no longer a problem, just rename it to simplify things further.
43 lines
1.3 KiB
C++
43 lines
1.3 KiB
C++
/*
|
|
* Copyright (c) 2021, Sahan Fernando <sahan.h.fernando@gmail.com>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <Kernel/Graphics/VirtIOGPU/Console.h>
|
|
#include <Kernel/Graphics/VirtIOGPU/FrameBufferDevice.h>
|
|
#include <Kernel/Graphics/VirtIOGPU/GPU.h>
|
|
|
|
namespace Kernel::Graphics::VirtIOGPU {
|
|
|
|
class GraphicsAdapter final
|
|
: public GraphicsDevice
|
|
, public PCI::Device {
|
|
AK_MAKE_ETERNAL
|
|
|
|
public:
|
|
static NonnullRefPtr<GraphicsAdapter> initialize(PCI::Address);
|
|
|
|
virtual bool framebuffer_devices_initialized() const override { return m_created_framebuffer_devices; }
|
|
|
|
private:
|
|
explicit GraphicsAdapter(PCI::Address base_address);
|
|
|
|
virtual void initialize_framebuffer_devices() override;
|
|
virtual Type type() const override { return Type::Raw; }
|
|
|
|
virtual void enable_consoles() override;
|
|
virtual void disable_consoles() override;
|
|
|
|
virtual bool modesetting_capable() const override { return false; }
|
|
virtual bool double_framebuffering_capable() const override { return false; }
|
|
|
|
virtual bool try_to_set_resolution(size_t, size_t, size_t) override { return false; }
|
|
virtual bool set_y_offset(size_t, size_t) override { return false; }
|
|
|
|
RefPtr<GPU> m_gpu_device;
|
|
bool m_created_framebuffer_devices { false };
|
|
};
|
|
}
|