mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:12:44 +00:00 
			
		
		
		
	Kernel: Simplify graphics initialization somewhat
We use a switch-case statements to ensure we try to find the best suitable driver for a specific graphics card. In case we don't find such, we use the default statement to initialize the graphics card as a generic VGA adapter, if the adapter is VGA compatible. If we couldn't initialize the driver, we don't touch this adapter anymore. Also, GraphicsDevice should not be tied to a PCI::Address member, as it can be theortically be used with other buses (e.g. ISA cards).
This commit is contained in:
		
							parent
							
								
									27fe2b45e5
								
							
						
					
					
						commit
						053a832fac
					
				
					 7 changed files with 94 additions and 84 deletions
				
			
		|  | @ -50,8 +50,7 @@ UNMAP_AFTER_INIT NonnullRefPtr<BochsGraphicsAdapter> BochsGraphicsAdapter::initi | |||
| } | ||||
| 
 | ||||
| UNMAP_AFTER_INIT BochsGraphicsAdapter::BochsGraphicsAdapter(PCI::Address pci_address) | ||||
|     : GraphicsDevice(pci_address) | ||||
|     , PCI::DeviceController(pci_address) | ||||
|     : PCI::DeviceController(pci_address) | ||||
|     , m_mmio_registers(PCI::get_BAR2(pci_address) & 0xfffffff0) | ||||
| { | ||||
|     // We assume safe resolutio is 1024x768x32
 | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Liav A
						Liav A