mirror of
				https://github.com/RGBCube/serenity
				synced 2025-10-31 14:42:44 +00:00 
			
		
		
		
	Kernel/IntelGraphics: Add Generation enum to the Definitions file
This will be used to annotate which Generation is being used for each Intel iGPU we discover.
This commit is contained in:
		
							parent
							
								
									8042ae43c3
								
							
						
					
					
						commit
						e393071a9b
					
				
					 4 changed files with 13 additions and 12 deletions
				
			
		|  | @ -122,7 +122,7 @@ Optional<IntelGraphics::PLLSettings> IntelDisplayConnectorGroup::create_pll_sett | |||
|     return {}; | ||||
| } | ||||
| 
 | ||||
| ErrorOr<NonnullLockRefPtr<IntelDisplayConnectorGroup>> IntelDisplayConnectorGroup::try_create(Badge<IntelNativeGraphicsAdapter>, Generation generation, MMIORegion const& first_region, MMIORegion const& second_region) | ||||
| ErrorOr<NonnullLockRefPtr<IntelDisplayConnectorGroup>> IntelDisplayConnectorGroup::try_create(Badge<IntelNativeGraphicsAdapter>, IntelGraphics::Generation generation, MMIORegion const& first_region, MMIORegion const& second_region) | ||||
| { | ||||
|     auto registers_region = TRY(MM.allocate_kernel_region(first_region.pci_bar_paddr, first_region.pci_bar_space_length, "Intel Native Graphics Registers"sv, Memory::Region::Access::ReadWrite)); | ||||
|     // NOTE: 0x5100 is the offset of the start of the GMBus registers
 | ||||
|  | @ -132,7 +132,7 @@ ErrorOr<NonnullLockRefPtr<IntelDisplayConnectorGroup>> IntelDisplayConnectorGrou | |||
|     return connector_group; | ||||
| } | ||||
| 
 | ||||
| IntelDisplayConnectorGroup::IntelDisplayConnectorGroup(Generation generation, NonnullOwnPtr<GMBusConnector> gmbus_connector, NonnullOwnPtr<Memory::Region> registers_region, MMIORegion const& first_region, MMIORegion const& second_region) | ||||
| IntelDisplayConnectorGroup::IntelDisplayConnectorGroup(IntelGraphics::Generation generation, NonnullOwnPtr<GMBusConnector> gmbus_connector, NonnullOwnPtr<Memory::Region> registers_region, MMIORegion const& first_region, MMIORegion const& second_region) | ||||
|     : m_mmio_first_region(first_region) | ||||
|     , m_mmio_second_region(second_region) | ||||
|     , m_assigned_mmio_registers_region(m_mmio_first_region) | ||||
|  | @ -172,7 +172,7 @@ ErrorOr<void> IntelDisplayConnectorGroup::initialize_connectors() | |||
| 
 | ||||
|     // NOTE: Intel Graphics Generation 4 is pretty ancient beast, and we should not
 | ||||
|     // assume we can find a VBT for it. Just initialize the (assumed) CRT connector and be done with it.
 | ||||
|     if (m_generation == Generation::Gen4) { | ||||
|     if (m_generation == IntelGraphics::Generation::Gen4) { | ||||
|         TRY(initialize_gen4_connectors()); | ||||
|     } else { | ||||
|         VERIFY_NOT_REACHED(); | ||||
|  | @ -232,7 +232,7 @@ ErrorOr<void> IntelDisplayConnectorGroup::set_mode_setting(IntelNativeDisplayCon | |||
|     DisplayConnector::ModeSetting actual_mode_setting = mode_setting; | ||||
|     actual_mode_setting.horizontal_stride = actual_mode_setting.horizontal_active * sizeof(u32); | ||||
|     VERIFY(actual_mode_setting.horizontal_stride != 0); | ||||
|     if (m_generation == Generation::Gen4) { | ||||
|     if (m_generation == IntelGraphics::Generation::Gen4) { | ||||
|         TRY(set_gen4_mode_setting(connector, actual_mode_setting)); | ||||
|     } else { | ||||
|         VERIFY_NOT_REACHED(); | ||||
|  |  | |||
		Loading…
	
	Add table
		Add a link
		
	
		Reference in a new issue
	
	 Liav A
						Liav A