6.12-rc0/regression/bisected - 9c081c11c621 drm/amdgpu: Reorder to read EFI exported ROM first - breaks connector enumeration and discovery

Yanko Kaneti yaneti at declera.com
Wed Sep 25 15:40:08 UTC 2024


Hello,

This commit in mainline (9c081c11c621) breaks connector enumeration and
discovery for me here so my  PC->HDMI-to-DP->monitor stops showing
anything after amdgpu starts.   Fedora rawhide 6.12 pre rc0 kernels.

There is some
  ...
  amdgpu 0000:0e:00.0: amdgpu: Fetched VBIOS from platform
  amdgpu: ATOM BIOS: 13-CEZANNE-019
  ...
  ... UBSAN splat ....
  kernel: UBSAN: array-index-out-of-bounds in drivers/gpu/drm/amd/amdgpu/../display/dc/resource/dcn21/dcn21_resource.c:1312:29
  ....
  kernel: [drm:amdgpu_dm_init [amdgpu]] *ERROR* KMS: Failed to detect connector
  

Reverting the commit on top of mainline restores the video situation to
normal. Without the UBSAN splat showing up.

  amdgpu 0000:0e:00.0: amdgpu: Fetched VBIOS from ROM BAR
  amdgpu: ATOM BIOS: 13-CEZANNE-019
  ... 
  

  Ryzen 7 5700G  IGP
  Advanced Micro Devices, Inc. [AMD/ATI] Cezanne [Radeon Vega Series / Radeon Vega Mobile Series] [1002:1638] (rev c8) (prog-if 00 [VGA controller])
  Fairly old Gigabyte MB , but with BIOS from March this year.

Regards
- Yanko

On Mon, 2024-08-12 at 10:19 +0530, Lijo Lazar wrote:
> 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 at amd.com>
> ---
>  drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c | 10 +++++-----
>  1 file changed, 5 insertions(+), 5 deletions(-)
> 
> diff --git a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
> index 618e469e3622..42e64bce661e 100644
> --- a/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
> +++ b/drivers/gpu/drm/amd/amdgpu/amdgpu_bios.c
> @@ -431,6 +431,11 @@ bool amdgpu_get_bios(struct amdgpu_device *adev)
>  		goto success;
>  	}
>  
> +	if (amdgpu_read_platform_bios(adev)) {
> +		dev_info(adev->dev, "Fetched VBIOS from platform\n");
> +		goto success;
> +	}
> +
>  	if (amdgpu_read_bios(adev)) {
>  		dev_info(adev->dev, "Fetched VBIOS from ROM BAR\n");
>  		goto success;
> @@ -446,11 +451,6 @@ bool amdgpu_get_bios(struct amdgpu_device *adev)
>  		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");
>  	return false;
>  



More information about the amd-gfx mailing list