mirror of
				https://github.com/torvalds/linux.git
				synced 2025-11-04 10:40:15 +02:00 
			
		
		
		
	drm/amdgpu: Reorder to read EFI exported ROM first
On EFI BIOSes, PCI ROM may be exported through EFI_PCI_IO_PROTOCOL and expansion ROM BARs may not be enabled. Choose to read from EFI exported ROM data before reading PCI Expansion ROM BAR. Signed-off-by: Lijo Lazar <lijo.lazar@amd.com> Reviewed-by: Hawking Zhang <Hawking.Zhang@amd.com> Reviewed-by: Alex Deucher <alexander.deucher@amd.com> Signed-off-by: Alex Deucher <alexander.deucher@amd.com>
This commit is contained in:
		
							parent
							
								
									e69c2dd753
								
							
						
					
					
						commit
						9c081c11c6
					
				
					 1 changed files with 5 additions and 5 deletions
				
			
		| 
						 | 
					@ -431,6 +431,11 @@ bool amdgpu_get_bios(struct amdgpu_device *adev)
 | 
				
			||||||
		goto success;
 | 
							goto success;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
 | 
						if (amdgpu_read_platform_bios(adev)) {
 | 
				
			||||||
 | 
							dev_info(adev->dev, "Fetched VBIOS from platform\n");
 | 
				
			||||||
 | 
							goto success;
 | 
				
			||||||
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (amdgpu_read_bios(adev)) {
 | 
						if (amdgpu_read_bios(adev)) {
 | 
				
			||||||
		dev_info(adev->dev, "Fetched VBIOS from ROM BAR\n");
 | 
							dev_info(adev->dev, "Fetched VBIOS from ROM BAR\n");
 | 
				
			||||||
		goto success;
 | 
							goto success;
 | 
				
			||||||
| 
						 | 
					@ -446,11 +451,6 @@ bool amdgpu_get_bios(struct amdgpu_device *adev)
 | 
				
			||||||
		goto success;
 | 
							goto success;
 | 
				
			||||||
	}
 | 
						}
 | 
				
			||||||
 | 
					
 | 
				
			||||||
	if (amdgpu_read_platform_bios(adev)) {
 | 
					 | 
				
			||||||
		dev_info(adev->dev, "Fetched VBIOS from platform\n");
 | 
					 | 
				
			||||||
		goto success;
 | 
					 | 
				
			||||||
	}
 | 
					 | 
				
			||||||
 | 
					 | 
				
			||||||
	dev_err(adev->dev, "Unable to locate a BIOS ROM\n");
 | 
						dev_err(adev->dev, "Unable to locate a BIOS ROM\n");
 | 
				
			||||||
	return false;
 | 
						return false;
 | 
				
			||||||
 | 
					
 | 
				
			||||||
| 
						 | 
					
 | 
				
			||||||
		Loading…
	
		Reference in a new issue