mirror of
https://github.com/RGBCube/serenity
synced 2025-05-19 03:45:08 +00:00

A bit old but a relatively uncomplicated device capable of outputting 1920x1080 video with 32-bit color. Tested with a Voodoo 3 3000 16MB PCI card. Resolution switching from DisplaySettings also works. If the requested mode contains timing information, it is used directly. Otherwise, display timing values are selected from the EDID. First the detailed timings are checked, and then standard and established timings for which there is a matching DMT mode. The driver does not (yet) read the actual EDID, so the generic EDID in DisplayConnector now includes a set of common display modes to make this work. The driver should also be compatible with the Voodoo Banshee, 4 and 5 but I don't have these cards to test this with. The PCI IDs of these cards are included as a commented line in case someone wants to give it a try.
32 lines
936 B
C++
32 lines
936 B
C++
/*
|
|
* Copyright (c) 2023, Edwin Rijkee <edwin@virtualparadise.org>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
#include <Kernel/Bus/PCI/Device.h>
|
|
#include <Kernel/Devices/GPU/Console/GenericFramebufferConsole.h>
|
|
#include <Kernel/Devices/GPU/GenericGraphicsAdapter.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class VoodooGraphicsAdapter final : public GenericGraphicsAdapter
|
|
, public PCI::Device {
|
|
|
|
public:
|
|
static ErrorOr<bool> probe(PCI::DeviceIdentifier const&);
|
|
static ErrorOr<NonnullLockRefPtr<GenericGraphicsAdapter>> create(PCI::DeviceIdentifier const&);
|
|
virtual ~VoodooGraphicsAdapter() = default;
|
|
virtual StringView device_name() const override { return "VoodooGraphicsAdapter"sv; }
|
|
|
|
private:
|
|
ErrorOr<void> initialize_adapter(PCI::DeviceIdentifier const&);
|
|
|
|
explicit VoodooGraphicsAdapter(PCI::DeviceIdentifier const&);
|
|
|
|
LockRefPtr<DisplayConnector> m_display_connector;
|
|
};
|
|
}
|