Kernel/Graphics: Remove GenericGraphicsAdapter::vga_compatible method

There's no point in keeping this method as we don't really care if a
graphics adapter is VGA compatible or not because we don't use this
method anymore.
This commit is contained in:
Liav A 2022-07-15 04:58:51 +03:00 committed by Andreas Kling
parent e5de5f4cf3
commit ebbc38cd2a
Notes: sideshowbarker 2024-07-17 08:56:43 +09:00
7 changed files with 0 additions and 25 deletions

View file

@ -34,8 +34,6 @@ UNMAP_AFTER_INIT NonnullRefPtr<BochsGraphicsAdapter> BochsGraphicsAdapter::initi
UNMAP_AFTER_INIT BochsGraphicsAdapter::BochsGraphicsAdapter(PCI::DeviceIdentifier const& pci_device_identifier) UNMAP_AFTER_INIT BochsGraphicsAdapter::BochsGraphicsAdapter(PCI::DeviceIdentifier const& pci_device_identifier)
: PCI::Device(pci_device_identifier.address()) : PCI::Device(pci_device_identifier.address())
{ {
if (pci_device_identifier.class_code().value() == 0x3 && pci_device_identifier.subclass_code().value() == 0x0)
m_is_vga_capable = true;
} }
UNMAP_AFTER_INIT ErrorOr<void> BochsGraphicsAdapter::initialize_adapter(PCI::DeviceIdentifier const& pci_device_identifier) UNMAP_AFTER_INIT ErrorOr<void> BochsGraphicsAdapter::initialize_adapter(PCI::DeviceIdentifier const& pci_device_identifier)
@ -67,9 +65,4 @@ UNMAP_AFTER_INIT ErrorOr<void> BochsGraphicsAdapter::initialize_adapter(PCI::Dev
return {}; return {};
} }
bool BochsGraphicsAdapter::vga_compatible() const
{
return m_is_vga_capable;
}
} }

View file

@ -28,14 +28,11 @@ public:
static NonnullRefPtr<BochsGraphicsAdapter> initialize(PCI::DeviceIdentifier const&); static NonnullRefPtr<BochsGraphicsAdapter> initialize(PCI::DeviceIdentifier const&);
virtual ~BochsGraphicsAdapter() = default; virtual ~BochsGraphicsAdapter() = default;
virtual bool vga_compatible() const override;
private: private:
ErrorOr<void> initialize_adapter(PCI::DeviceIdentifier const&); ErrorOr<void> initialize_adapter(PCI::DeviceIdentifier const&);
explicit BochsGraphicsAdapter(PCI::DeviceIdentifier const&); explicit BochsGraphicsAdapter(PCI::DeviceIdentifier const&);
RefPtr<BochsDisplayConnector> m_display_connector; RefPtr<BochsDisplayConnector> m_display_connector;
bool m_is_vga_capable { false };
}; };
} }

View file

@ -19,8 +19,6 @@ class GenericGraphicsAdapter
public: public:
virtual ~GenericGraphicsAdapter() = default; virtual ~GenericGraphicsAdapter() = default;
virtual bool vga_compatible() const = 0;
protected: protected:
GenericGraphicsAdapter() = default; GenericGraphicsAdapter() = default;
}; };

View file

@ -24,8 +24,6 @@ public:
virtual ~IntelNativeGraphicsAdapter() = default; virtual ~IntelNativeGraphicsAdapter() = default;
virtual bool vga_compatible() const override { return true; }
private: private:
ErrorOr<void> initialize_adapter(); ErrorOr<void> initialize_adapter();

View file

@ -188,9 +188,4 @@ UNMAP_AFTER_INIT ErrorOr<void> VMWareGraphicsAdapter::initialize_adapter()
return {}; return {};
} }
bool VMWareGraphicsAdapter::vga_compatible() const
{
return false;
}
} }

View file

@ -29,8 +29,6 @@ public:
static RefPtr<VMWareGraphicsAdapter> try_initialize(PCI::DeviceIdentifier const&); static RefPtr<VMWareGraphicsAdapter> try_initialize(PCI::DeviceIdentifier const&);
virtual ~VMWareGraphicsAdapter() = default; virtual ~VMWareGraphicsAdapter() = default;
virtual bool vga_compatible() const override;
ErrorOr<void> modeset_primary_screen_resolution(Badge<VMWareDisplayConnector>, size_t width, size_t height); ErrorOr<void> modeset_primary_screen_resolution(Badge<VMWareDisplayConnector>, size_t width, size_t height);
size_t primary_screen_width(Badge<VMWareDisplayConnector>) const; size_t primary_screen_width(Badge<VMWareDisplayConnector>) const;
size_t primary_screen_height(Badge<VMWareDisplayConnector>) const; size_t primary_screen_height(Badge<VMWareDisplayConnector>) const;
@ -55,7 +53,6 @@ private:
const IOAddress m_io_registers_base; const IOAddress m_io_registers_base;
mutable Spinlock m_io_access_lock; mutable Spinlock m_io_access_lock;
mutable RecursiveSpinlock m_operation_lock; mutable RecursiveSpinlock m_operation_lock;
bool m_is_vga_capable { false };
}; };
} }

View file

@ -39,9 +39,6 @@ class VirtIOGraphicsAdapter final
public: public:
static NonnullRefPtr<VirtIOGraphicsAdapter> initialize(PCI::DeviceIdentifier const&); static NonnullRefPtr<VirtIOGraphicsAdapter> initialize(PCI::DeviceIdentifier const&);
// FIXME: There's a VirtIO VGA GPU variant, so we should consider that
virtual bool vga_compatible() const override { return false; }
virtual void initialize() override; virtual void initialize() override;
void initialize_3d_device(); void initialize_3d_device();