mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 16:18:12 +00:00
Kernel: Move all Graphics-related code into Devices/GPU directory
Like the HID, Audio and Storage subsystem, the Graphics subsystem (which handles GPUs technically) exposes unix device files (typically in /dev). To ensure consistency across the repository, move all related files to a new directory under Kernel/Devices called "GPU". Also remove the redundant "GPU" word from the VirtIO driver directory, and the word "Graphics" from GraphicsManagement.{h,cpp} filenames.
This commit is contained in:
parent
31a7dabf02
commit
9ee098b119
69 changed files with 167 additions and 167 deletions
|
@ -1,70 +0,0 @@
|
|||
/*
|
||||
* Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
|
||||
*
|
||||
* SPDX-License-Identifier: BSD-2-Clause
|
||||
*/
|
||||
|
||||
#include <Kernel/Graphics/Intel/Plane/DisplayPlane.h>
|
||||
#include <Kernel/Memory/PhysicalAddress.h>
|
||||
|
||||
namespace Kernel {
|
||||
|
||||
IntelDisplayPlane::IntelDisplayPlane(Memory::TypedMapping<PlaneRegisters volatile> plane_registers_mapping)
|
||||
: m_plane_registers(move(plane_registers_mapping))
|
||||
{
|
||||
}
|
||||
|
||||
IntelDisplayPlane::ShadowRegisters IntelDisplayPlane::shadow_registers() const
|
||||
{
|
||||
SpinlockLocker locker(m_access_lock);
|
||||
return m_shadow_registers;
|
||||
}
|
||||
|
||||
ErrorOr<void> IntelDisplayPlane::set_horizontal_active_pixels_count(Badge<IntelDisplayConnectorGroup>, size_t horizontal_active_pixels_count)
|
||||
{
|
||||
SpinlockLocker locker(m_access_lock);
|
||||
m_horizontal_active_pixels_count = horizontal_active_pixels_count;
|
||||
return {};
|
||||
}
|
||||
ErrorOr<void> IntelDisplayPlane::set_vertical_active_pixels_count(Badge<IntelDisplayConnectorGroup>, size_t vertical_active_pixels_count)
|
||||
{
|
||||
SpinlockLocker locker(m_access_lock);
|
||||
m_vertical_active_pixels_count = vertical_active_pixels_count;
|
||||
return {};
|
||||
}
|
||||
ErrorOr<void> IntelDisplayPlane::set_horizontal_stride(Badge<IntelDisplayConnectorGroup>, size_t horizontal_stride)
|
||||
{
|
||||
SpinlockLocker locker(m_access_lock);
|
||||
m_horizontal_stride = horizontal_stride;
|
||||
return {};
|
||||
}
|
||||
ErrorOr<void> IntelDisplayPlane::set_aperture_base(Badge<IntelDisplayConnectorGroup>, PhysicalAddress aperture_start)
|
||||
{
|
||||
SpinlockLocker locker(m_access_lock);
|
||||
m_aperture_start.set(aperture_start.get());
|
||||
return {};
|
||||
}
|
||||
ErrorOr<void> IntelDisplayPlane::set_pipe(Badge<IntelDisplayConnectorGroup>, PipeSelect pipe_select)
|
||||
{
|
||||
SpinlockLocker locker(m_access_lock);
|
||||
m_pipe_select = pipe_select;
|
||||
return {};
|
||||
}
|
||||
|
||||
bool IntelDisplayPlane::is_enabled(Badge<IntelDisplayConnectorGroup>)
|
||||
{
|
||||
SpinlockLocker locker(m_access_lock);
|
||||
return m_shadow_registers.control & (1 << 31);
|
||||
}
|
||||
|
||||
ErrorOr<void> IntelDisplayPlane::disable(Badge<IntelDisplayConnectorGroup>)
|
||||
{
|
||||
SpinlockLocker locker(m_access_lock);
|
||||
// Note: We use the shadow register so we don't have the already set
|
||||
// settings being lost.
|
||||
m_shadow_registers.control &= ~(1 << 31);
|
||||
m_plane_registers->control = m_shadow_registers.control;
|
||||
return {};
|
||||
}
|
||||
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue