mirror of
https://github.com/RGBCube/serenity
synced 2025-07-27 18:17:45 +00:00
Kernel: Add convenience values to the Memory::Region::Access enum
Instead of `Memory::Region::Access::Read | Memory::Region::AccessWrite` you can now say `Memory::Region::Access::ReadWrite`.
This commit is contained in:
parent
47bdd7c3a0
commit
2cd8b21974
38 changed files with 68 additions and 65 deletions
|
@ -32,7 +32,7 @@ void FrameBufferDevice::create_framebuffer()
|
|||
// Allocate frame buffer for both front and back
|
||||
auto& info = display_info();
|
||||
m_buffer_size = calculate_framebuffer_size(info.rect.width, info.rect.height);
|
||||
m_framebuffer = MM.allocate_kernel_region(m_buffer_size * 2, String::formatted("VirtGPU FrameBuffer #{}", m_scanout.value()), Memory::Region::Access::Read | Memory::Region::Access::Write, AllocationStrategy::AllocateNow);
|
||||
m_framebuffer = MM.allocate_kernel_region(m_buffer_size * 2, String::formatted("VirtGPU FrameBuffer #{}", m_scanout.value()), Memory::Region::Access::ReadWrite, AllocationStrategy::AllocateNow);
|
||||
auto write_sink_page = MM.allocate_user_physical_page(Memory::MemoryManager::ShouldZeroFill::No).release_nonnull();
|
||||
auto num_needed_pages = m_framebuffer->vmobject().page_count();
|
||||
|
||||
|
|
|
@ -17,7 +17,7 @@ namespace Kernel::Graphics::VirtIOGPU {
|
|||
|
||||
GPU::GPU(PCI::Address address)
|
||||
: VirtIODevice(address, "GPU")
|
||||
, m_scratch_space(MM.allocate_contiguous_kernel_region(32 * PAGE_SIZE, "VirtGPU Scratch Space", Memory::Region::Access::Read | Memory::Region::Access::Write))
|
||||
, m_scratch_space(MM.allocate_contiguous_kernel_region(32 * PAGE_SIZE, "VirtGPU Scratch Space", Memory::Region::Access::ReadWrite))
|
||||
{
|
||||
VERIFY(!!m_scratch_space);
|
||||
if (auto cfg = get_config(ConfigurationType::Device)) {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue