On Wed, Feb 09, 2022 at 12:23:57PM +0200, Matthew Ward wrote:
> >Synopsis:    GPU fails to init, display on at 1024x768
> >Category:    GPU
> >Environment:
>       System      : OpenBSD 7.0
>       Details     : OpenBSD 7.0-current (GENERIC.MP) #321: Tue Feb  8 21:10:57
> MST 2022
>                        
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
> 
>       Architecture: OpenBSD.amd64
>       Machine     : amd64
> 
> >Description:
> Fresh install of -current on the laptop, fw_update recognises the gpu and
> pulls the correct firmware, on booting the error:
> drm:pid0:amdgpu_get_bios *ERROR* Unable to locate a BIOS ROM
> drm:pid0:amdgpu_attachhook *ERROR* Fatal error during GPU init
> efifb0 at mainbus0: 1024x768, 32bpp
> xenodm starts with no problems, can get into cwm and run glxgears at
> around 300fps fullscreen 1080p
> 
> >How-To-Repeat:
> Install lastest snapshot on probook 445 g7

There are quite a few ways to get a video bios in amdgpu.
On a comparable machine (thinkpad t14 gen 1 amd) booted via uefi it
is found in the VFCT ACPI table, but that doesn't show in the acpi
tables in your mail.

Does this patch to limit the size of the shadow region searched
change anything?

If there is an option to toggle CSM/bios support in the system firmware
that would also be worth trying.

Index: sys/dev/pci/drm/amd/amdgpu/amdgpu_bios.c
===================================================================
RCS file: /cvs/src/sys/dev/pci/drm/amd/amdgpu/amdgpu_bios.c,v
retrieving revision 1.6
diff -u -p -r1.6 amdgpu_bios.c
--- sys/dev/pci/drm/amd/amdgpu/amdgpu_bios.c    14 Jan 2022 06:52:59 -0000      
1.6
+++ sys/dev/pci/drm/amd/amdgpu/amdgpu_bios.c    10 Feb 2022 07:13:02 -0000
@@ -318,13 +318,11 @@ free_bios:
 static bool amdgpu_read_platform_bios(struct amdgpu_device *adev)
 {
 #if defined(__amd64__) || defined(__i386__)
-       uint8_t __iomem *bios;
-       bus_size_t size = 256 * 1024; /* ??? */
+       uint8_t __iomem *bios = (u8 *)ISA_HOLE_VADDR(0xc0000);
+       bus_size_t size = 0x1ffff; /* 128K 0xc0000-0xdffff */
 
        adev->bios = NULL;
 
-       bios = (u8 *)ISA_HOLE_VADDR(0xc0000);
-
        adev->bios = kzalloc(size, GFP_KERNEL);
        if (adev->bios == NULL)
                return false;
@@ -554,37 +552,37 @@ static inline bool amdgpu_acpi_vfct_bios
 bool amdgpu_get_bios(struct amdgpu_device *adev)
 {
        if (amdgpu_atrm_get_bios(adev)) {
-               dev_info(adev->dev, "Fetched VBIOS from ATRM\n");
+               dev_warn(adev->dev, "Fetched VBIOS from ATRM\n");
                goto success;
        }
 
        if (amdgpu_acpi_vfct_bios(adev)) {
-               dev_info(adev->dev, "Fetched VBIOS from VFCT\n");
+               dev_warn(adev->dev, "Fetched VBIOS from VFCT\n");
                goto success;
        }
 
        if (igp_read_bios_from_vram(adev)) {
-               dev_info(adev->dev, "Fetched VBIOS from VRAM BAR\n");
+               dev_warn(adev->dev, "Fetched VBIOS from VRAM BAR\n");
                goto success;
        }
 
        if (amdgpu_read_bios(adev)) {
-               dev_info(adev->dev, "Fetched VBIOS from ROM BAR\n");
+               dev_warn(adev->dev, "Fetched VBIOS from ROM BAR\n");
                goto success;
        }
 
        if (amdgpu_read_bios_from_rom(adev)) {
-               dev_info(adev->dev, "Fetched VBIOS from ROM\n");
+               dev_warn(adev->dev, "Fetched VBIOS from ROM\n");
                goto success;
        }
 
        if (amdgpu_read_disabled_bios(adev)) {
-               dev_info(adev->dev, "Fetched VBIOS from disabled ROM BAR\n");
+               dev_warn(adev->dev, "Fetched VBIOS from disabled ROM BAR\n");
                goto success;
        }
 
        if (amdgpu_read_platform_bios(adev)) {
-               dev_info(adev->dev, "Fetched VBIOS from platform\n");
+               dev_warn(adev->dev, "Fetched VBIOS from platform\n");
                goto success;
        }
 

Reply via email to