On Sat, Dec 10, 2022 at 02:58:04AM -0600, Isaac Nudelman wrote: > >Synopsis: AMDGPU fails to initialize on Navi 21 > >Category: system > >Environment: > System : OpenBSD 7.2 > Details : OpenBSD 7.2 (GENERIC.MP) #758: Tue Sep 27 11:57:54 MDT > 2022 > > dera...@amd64.openbsd.org:/usr/src/sys/arch/amd64/compile/GENERIC.MP > > Architecture: OpenBSD.amd64 > Machine : amd64 > >Description: > 6900 XTXH is enumerated, but DRM fails to init it correctly. System > falls back to llvmpipe (which is not ideal). Card functions correctly under > Windows (there are some occasional graphics driver crashes there, but AMD / > Microsoft are to blame there) and under Linux (used 5.19 -> 6.0.12 and Mesa > git from a few days ago)
> root on sd0a (b48c1009beaa6d30.a) swap on sd0b dump on sd0b > hib block_io biowait error 22 blk 16815284 size 512 This message is from hibernate code, was the machine previously hibernated? > [drm] *ERROR* visible_vram_size 3ff000000 or aper_base_kaddr 0x0 is not > initialized. > [drm] *ERROR* Failed to process memory training! > [drm] *ERROR* sw_init of IP block <psp> failed -22 > drm:pid0:amdgpu_device_init *ERROR* amdgpu_device_ip_init failed > drm:pid0:amdgpu_attachhook *ERROR* Fatal error during GPU init > efifb0 at mainbus0: 2560x1440, 32bpp > wsdisplay0 at efifb0 mux 1: console (std, vt100 emulation), using wskbd0 The output of 'pcidump -v' would be helpful. Try this. Against -current, should apply to 7.2. Index: sys/dev/pci/drm/amd/amdgpu/amdgpu_gmc.c =================================================================== RCS file: /cvs/src/sys/dev/pci/drm/amd/amdgpu/amdgpu_gmc.c,v retrieving revision 1.6 diff -u -p -r1.6 amdgpu_gmc.c --- sys/dev/pci/drm/amd/amdgpu/amdgpu_gmc.c 29 Mar 2022 02:15:51 -0000 1.6 +++ sys/dev/pci/drm/amd/amdgpu/amdgpu_gmc.c 11 Dec 2022 01:44:19 -0000 @@ -709,8 +709,10 @@ void amdgpu_gmc_get_vbios_allocations(st * XXX Workaround for machines where the framebuffer * size reported by the hardware is incorrect. */ - extern psize_t efifb_stolen(); - size = max(size, efifb_stolen()); + if (adev->flags & AMD_IS_APU) { + extern psize_t efifb_stolen(); + size = max(size, efifb_stolen()); + } #endif if (adev->mman.keep_stolen_vga_memory)