From ebbc38cd2a40d88b29afe94854ec9f7e6a3d6f5b Mon Sep 17 00:00:00 2001 From: Liav A Date: Fri, 15 Jul 2022 04:58:51 +0300 Subject: [PATCH] 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. --- Kernel/Graphics/Bochs/GraphicsAdapter.cpp | 7 ------- Kernel/Graphics/Bochs/GraphicsAdapter.h | 3 --- Kernel/Graphics/GenericGraphicsAdapter.h | 2 -- Kernel/Graphics/Intel/NativeGraphicsAdapter.h | 2 -- Kernel/Graphics/VMWare/GraphicsAdapter.cpp | 5 ----- Kernel/Graphics/VMWare/GraphicsAdapter.h | 3 --- Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h | 3 --- 7 files changed, 25 deletions(-) diff --git a/Kernel/Graphics/Bochs/GraphicsAdapter.cpp b/Kernel/Graphics/Bochs/GraphicsAdapter.cpp index 8ba489a918c..e974c812a87 100644 --- a/Kernel/Graphics/Bochs/GraphicsAdapter.cpp +++ b/Kernel/Graphics/Bochs/GraphicsAdapter.cpp @@ -34,8 +34,6 @@ UNMAP_AFTER_INIT NonnullRefPtr BochsGraphicsAdapter::initi UNMAP_AFTER_INIT BochsGraphicsAdapter::BochsGraphicsAdapter(PCI::DeviceIdentifier const& pci_device_identifier) : 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 BochsGraphicsAdapter::initialize_adapter(PCI::DeviceIdentifier const& pci_device_identifier) @@ -67,9 +65,4 @@ UNMAP_AFTER_INIT ErrorOr BochsGraphicsAdapter::initialize_adapter(PCI::Dev return {}; } -bool BochsGraphicsAdapter::vga_compatible() const -{ - return m_is_vga_capable; -} - } diff --git a/Kernel/Graphics/Bochs/GraphicsAdapter.h b/Kernel/Graphics/Bochs/GraphicsAdapter.h index 1d39eb0fad9..12376a4c834 100644 --- a/Kernel/Graphics/Bochs/GraphicsAdapter.h +++ b/Kernel/Graphics/Bochs/GraphicsAdapter.h @@ -28,14 +28,11 @@ public: static NonnullRefPtr initialize(PCI::DeviceIdentifier const&); virtual ~BochsGraphicsAdapter() = default; - virtual bool vga_compatible() const override; - private: ErrorOr initialize_adapter(PCI::DeviceIdentifier const&); explicit BochsGraphicsAdapter(PCI::DeviceIdentifier const&); RefPtr m_display_connector; - bool m_is_vga_capable { false }; }; } diff --git a/Kernel/Graphics/GenericGraphicsAdapter.h b/Kernel/Graphics/GenericGraphicsAdapter.h index 94610cad754..8a5e13731c0 100644 --- a/Kernel/Graphics/GenericGraphicsAdapter.h +++ b/Kernel/Graphics/GenericGraphicsAdapter.h @@ -19,8 +19,6 @@ class GenericGraphicsAdapter public: virtual ~GenericGraphicsAdapter() = default; - virtual bool vga_compatible() const = 0; - protected: GenericGraphicsAdapter() = default; }; diff --git a/Kernel/Graphics/Intel/NativeGraphicsAdapter.h b/Kernel/Graphics/Intel/NativeGraphicsAdapter.h index 9f380340b51..cc7dec7ad97 100644 --- a/Kernel/Graphics/Intel/NativeGraphicsAdapter.h +++ b/Kernel/Graphics/Intel/NativeGraphicsAdapter.h @@ -24,8 +24,6 @@ public: virtual ~IntelNativeGraphicsAdapter() = default; - virtual bool vga_compatible() const override { return true; } - private: ErrorOr initialize_adapter(); diff --git a/Kernel/Graphics/VMWare/GraphicsAdapter.cpp b/Kernel/Graphics/VMWare/GraphicsAdapter.cpp index 29ad1c1adba..3ccf87a3632 100644 --- a/Kernel/Graphics/VMWare/GraphicsAdapter.cpp +++ b/Kernel/Graphics/VMWare/GraphicsAdapter.cpp @@ -188,9 +188,4 @@ UNMAP_AFTER_INIT ErrorOr VMWareGraphicsAdapter::initialize_adapter() return {}; } -bool VMWareGraphicsAdapter::vga_compatible() const -{ - return false; -} - } diff --git a/Kernel/Graphics/VMWare/GraphicsAdapter.h b/Kernel/Graphics/VMWare/GraphicsAdapter.h index bbe56483c69..212298d975c 100644 --- a/Kernel/Graphics/VMWare/GraphicsAdapter.h +++ b/Kernel/Graphics/VMWare/GraphicsAdapter.h @@ -29,8 +29,6 @@ public: static RefPtr try_initialize(PCI::DeviceIdentifier const&); virtual ~VMWareGraphicsAdapter() = default; - virtual bool vga_compatible() const override; - ErrorOr modeset_primary_screen_resolution(Badge, size_t width, size_t height); size_t primary_screen_width(Badge) const; size_t primary_screen_height(Badge) const; @@ -55,7 +53,6 @@ private: const IOAddress m_io_registers_base; mutable Spinlock m_io_access_lock; mutable RecursiveSpinlock m_operation_lock; - bool m_is_vga_capable { false }; }; } diff --git a/Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h b/Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h index e4eab527d75..fbaa5d85212 100644 --- a/Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h +++ b/Kernel/Graphics/VirtIOGPU/GraphicsAdapter.h @@ -39,9 +39,6 @@ class VirtIOGraphicsAdapter final public: static NonnullRefPtr 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; void initialize_3d_device();