On Sun, Apr 02, 2023 at 11:01:08PM -0400, Thomas Frohwein wrote:
> >Synopsis: GPU acceleration (amdgpu) works with MBR install, but not with
> >GPT install
> >Category: system
> >Environment:
> System : OpenBSD 7.3
> Details : OpenBSD 7.3 (GENERIC.MP) #1125: Sat Mar 25 10:36:29 MDT
> 2023
>
> [email protected]:/usr/src/sys/arch/amd64/compile/GENERIC.MP
>
> Architecture: OpenBSD.amd64
> Machine : amd64
> >Description:
> I installed OpenBSD on a drive in GPT configuration and found out that
> my Vega
> 64 GPU didn't run with acceleration. A look at `glxinfo -B` confirmed that
> llvmpipe was used. Another observation is a background with old(?) framebuffer
> content and colorful vertical stripes in the background of the console after
> amdgpu is invoked.
>
> It was more by accident that I had another install with MBR configuration on
> the same machine where I noticed no such issues. I reinstalled over the
> previous GPT install with MBR again and confirmed that this way, amdgpu is
> working as expected, including full GPU acceleration and with no vertical
> stripe
> artifacts in the console anymore.
>
> I installed again a third time, again with GPT in the installer, and this
> caused the artifacts in the console to appear again and the machine is back to
> using llvmpipe.
>
> The association with a GPT install makes me think this problem might relate to
> what happens with efifb and how it transitions to amdgpu.
>
> I'm attaching dmesg for both GPT and MBR configurations.
>
> >How-To-Repeat:
> <code/input/activities to reproduce the problem (multiple lines)>
>
> I have tried 2 different GPT installs that both led to this problem.
> >Fix:
> Installing OpenBSD with MBR instead of GPT solves the issue and the
> GPU now works as expected.
Can you include pcidump -v output?
Also try this diff and report back on the values shown in dmesg
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.9
diff -u -p -r1.9 amdgpu_gmc.c
--- sys/dev/pci/drm/amd/amdgpu/amdgpu_gmc.c 25 Jan 2023 02:44:50 -0000
1.9
+++ sys/dev/pci/drm/amd/amdgpu/amdgpu_gmc.c 3 Apr 2023 07:35:48 -0000
@@ -675,7 +675,7 @@ void amdgpu_gmc_get_vbios_allocations(st
* size reported by the hardware is incorrect.
*/
extern psize_t efifb_stolen();
- size = max(size, efifb_stolen());
+ printf("\nvbios %x efi %lx\n", size, efifb_stolen());
#endif
if (adev->mman.keep_stolen_vga_memory)