mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 15:32:46 +00:00 
			
		
		
		
	 11eee67b85
			
		
	
	
		11eee67b85
		
	
	
	
	
		
			
			Until now, our kernel has reimplemented a number of AK classes to provide automatic internal locking: - RefPtr - NonnullRefPtr - WeakPtr - Weakable This patch renames the Kernel classes so that they can coexist with the original AK classes: - RefPtr => LockRefPtr - NonnullRefPtr => NonnullLockRefPtr - WeakPtr => LockWeakPtr - Weakable => LockWeakable The goal here is to eventually get rid of the Lock* classes in favor of using external locking.
		
			
				
	
	
		
			44 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
			
		
		
	
	
			44 lines
		
	
	
	
		
			1.4 KiB
		
	
	
	
		
			C++
		
	
	
	
	
	
| /*
 | |
|  * Copyright (c) 2022, Liav A. <liavalb@hotmail.co.il>
 | |
|  *
 | |
|  * SPDX-License-Identifier: BSD-2-Clause
 | |
|  */
 | |
| 
 | |
| #pragma once
 | |
| 
 | |
| #include <AK/Try.h>
 | |
| #include <Kernel/Graphics/Bochs/DisplayConnector.h>
 | |
| #include <Kernel/Graphics/Console/GenericFramebufferConsole.h>
 | |
| #include <Kernel/Library/LockRefPtr.h>
 | |
| #include <Kernel/Locking/Spinlock.h>
 | |
| #include <Kernel/Memory/TypedMapping.h>
 | |
| 
 | |
| namespace Kernel {
 | |
| 
 | |
| struct BochsDisplayMMIORegisters;
 | |
| class QEMUDisplayConnector final
 | |
|     : public BochsDisplayConnector {
 | |
|     friend class BochsGraphicsAdapter;
 | |
|     friend class DeviceManagement;
 | |
| 
 | |
| public:
 | |
|     static NonnullLockRefPtr<QEMUDisplayConnector> must_create(PhysicalAddress framebuffer_address, size_t framebuffer_resource_size, Memory::TypedMapping<BochsDisplayMMIORegisters volatile>);
 | |
| 
 | |
|     virtual IndexID index_id() const override;
 | |
| 
 | |
| private:
 | |
|     ErrorOr<void> fetch_and_initialize_edid();
 | |
|     QEMUDisplayConnector(PhysicalAddress framebuffer_address, size_t framebuffer_resource_size, Memory::TypedMapping<BochsDisplayMMIORegisters volatile>);
 | |
| 
 | |
|     virtual bool double_framebuffering_capable() const override { return true; }
 | |
|     virtual ErrorOr<void> set_mode_setting(ModeSetting const&) override;
 | |
|     virtual ErrorOr<void> set_y_offset(size_t y) override;
 | |
|     virtual ErrorOr<void> unblank() override;
 | |
| 
 | |
|     void set_framebuffer_to_big_endian_format();
 | |
|     void set_framebuffer_to_little_endian_format();
 | |
| 
 | |
| private:
 | |
|     Memory::TypedMapping<BochsDisplayMMIORegisters volatile> m_registers;
 | |
| };
 | |
| }
 |