diff options
-rw-r--r-- | Kernel/Graphics/VirtIOGPU/VirtIOGPU.cpp | 13 | ||||
-rw-r--r-- | Kernel/Graphics/VirtIOGPU/VirtIOGPU.h | 2 |
2 files changed, 2 insertions, 13 deletions
diff --git a/Kernel/Graphics/VirtIOGPU/VirtIOGPU.cpp b/Kernel/Graphics/VirtIOGPU/VirtIOGPU.cpp index e1139632ef..b57c997389 100644 --- a/Kernel/Graphics/VirtIOGPU/VirtIOGPU.cpp +++ b/Kernel/Graphics/VirtIOGPU/VirtIOGPU.cpp @@ -127,20 +127,9 @@ VirtIOGPUResourceID VirtIOGPU::create_2d_resource(VirtIOGPURect rect) return resource_id; } -void VirtIOGPU::ensure_backing_storage(Region& region, size_t buffer_offset, size_t buffer_length, VirtIOGPUResourceID resource_id) +void VirtIOGPU::ensure_backing_storage(Region const& region, size_t buffer_offset, size_t buffer_length, VirtIOGPUResourceID resource_id) { VERIFY(m_operation_lock.is_locked()); - // Allocate backing region - auto& vm_object = region.vmobject(); - size_t desired_num_pages = page_round_up(buffer_offset + buffer_length); - auto& pages = vm_object.physical_pages(); - for (size_t i = pages.size(); i < desired_num_pages / PAGE_SIZE; ++i) { - auto page = MM.allocate_user_physical_page(); - // FIXME: Instead of verifying, fail the framebuffer resize operation - VERIFY(!page.is_null()); - pages.append(move(page)); - } - region.remap(); VERIFY(buffer_offset % PAGE_SIZE == 0); VERIFY(buffer_length % PAGE_SIZE == 0); diff --git a/Kernel/Graphics/VirtIOGPU/VirtIOGPU.h b/Kernel/Graphics/VirtIOGPU/VirtIOGPU.h index 71c6f914ca..3f52fbb94f 100644 --- a/Kernel/Graphics/VirtIOGPU/VirtIOGPU.h +++ b/Kernel/Graphics/VirtIOGPU/VirtIOGPU.h @@ -219,7 +219,7 @@ private: void query_display_information(); VirtIOGPUResourceID create_2d_resource(VirtIOGPURect rect); void delete_resource(VirtIOGPUResourceID resource_id); - void ensure_backing_storage(Region& region, size_t buffer_offset, size_t buffer_length, VirtIOGPUResourceID resource_id); + void ensure_backing_storage(Region const&, size_t buffer_offset, size_t buffer_length, VirtIOGPUResourceID resource_id); void detach_backing_storage(VirtIOGPUResourceID resource_id); void set_scanout_resource(VirtIOGPUScanoutID scanout, VirtIOGPUResourceID resource_id, VirtIOGPURect rect); void transfer_framebuffer_data_to_host(VirtIOGPUScanoutID scanout, VirtIOGPURect const& rect, VirtIOGPUResourceID resource_id); |