mirror of
https://github.com/RGBCube/serenity
synced 2025-05-16 15:54:58 +00:00

A virtual method named device_name() was added to Kernel::PCI to support logging the PCI::Device name and address using dmesgln_pci. Previously, PCI::Device did not store the device name. All devices inheriting from PCI::Device now use dmesgln_pci where they previously used dmesgln.
36 lines
890 B
C++
36 lines
890 B
C++
/*
|
|
* Copyright (c) 2021, Liav A. <liavalb@hotmail.co.il>
|
|
*
|
|
* SPDX-License-Identifier: BSD-2-Clause
|
|
*/
|
|
|
|
#pragma once
|
|
|
|
#include <AK/Types.h>
|
|
#include <Kernel/Bus/PCI/Device.h>
|
|
#include <Kernel/Graphics/Definitions.h>
|
|
#include <Kernel/Graphics/Intel/NativeDisplayConnector.h>
|
|
#include <Kernel/PhysicalAddress.h>
|
|
#include <LibEDID/EDID.h>
|
|
|
|
namespace Kernel {
|
|
|
|
class IntelNativeGraphicsAdapter final
|
|
: public GenericGraphicsAdapter
|
|
, public PCI::Device {
|
|
|
|
public:
|
|
static LockRefPtr<IntelNativeGraphicsAdapter> initialize(PCI::DeviceIdentifier const&);
|
|
|
|
virtual ~IntelNativeGraphicsAdapter() = default;
|
|
|
|
virtual StringView device_name() const override { return "IntelNativeGraphicsAdapter"sv; }
|
|
|
|
private:
|
|
ErrorOr<void> initialize_adapter();
|
|
|
|
explicit IntelNativeGraphicsAdapter(PCI::Address);
|
|
|
|
LockRefPtr<IntelNativeDisplayConnector> m_display_connector;
|
|
};
|
|
}
|