Bug 268394 - graphics/drm-510-kmod: AMD Ryzen 7950X's integrated GPU not supported (Raphael)
Summary: graphics/drm-510-kmod: AMD Ryzen 7950X's integrated GPU not supported (Raphael)
Status: Open
Alias: None
Product: Ports & Packages
Classification: Unclassified
Component: Individual Port(s) (show other bugs)
Version: Latest
Hardware: Any Any
: --- Affects Only Me
Assignee: freebsd-x11 (Nobody)
URL:
Keywords: needs-qa
Depends on:
Blocks:
 
Reported: 2022-12-15 13:30 UTC by Jonathan Vasquez
Modified: 2024-02-05 12:23 UTC (History)
5 users (show)

See Also:


Attachments
pciconf -vl (11.90 KB, text/plain)
2022-12-15 13:30 UTC, Jonathan Vasquez
no flags Details
dmesg (linux) (128.05 KB, text/plain)
2022-12-17 14:36 UTC, Jonathan Vasquez
no flags Details
lspci (linux) (33.92 KB, text/plain)
2022-12-17 14:36 UTC, Jonathan Vasquez
no flags Details
uname (linux) (125 bytes, text/plain)
2022-12-17 14:36 UTC, Jonathan Vasquez
no flags Details
full gnome desktop screenshot (423.67 KB, image/png)
2022-12-17 14:36 UTC, Jonathan Vasquez
no flags Details
gnome info screenshot (93.05 KB, image/png)
2022-12-17 14:37 UTC, Jonathan Vasquez
no flags Details
crash core 0 (117.26 KB, text/plain)
2022-12-17 14:37 UTC, Jonathan Vasquez
no flags Details
crash core 1 (118.33 KB, application/x-troff-man)
2022-12-17 14:38 UTC, Jonathan Vasquez
no flags Details

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Vasquez 2022-12-15 13:30:32 UTC
Created attachment 238818 [details]
pciconf -vl

Hello,

It seems that the integrated GPU on my AMD Ryzen 7950X isn't supported on FreeBSD. I may have done something wrong but I've tried drm-510-kmod, and even tweaking the kernel driver and adding the chips' pci information (hail mary lol), but that just lead to an instant kernel panic upon loading the customized module haha.

Below is the info:

vgapci1@pci0:19:0:0:    class=0x030000 rev=0xc1 hdr=0x00 vendor=0x1002 device=0x164e subvendor=0x1043 subdevice=0x8877
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Raphael'
    class      = display
    subclass   = VGA

jon@leslie:~ $ uname -a

FreeBSD leslie 13.1-STABLE FreeBSD 13.1-STABLE #4 stable/13-n253282-50f61166f7b9: Thu Dec 15 07:42:59 EST 2022     root@leslie:/usr/obj/usr/src/amd64.amd64/sys/GENERIC amd64

I decided to get a dedicated card (AMD Radeon 6900 XT) since someone on the FreeBSD forum was able to demonstrate that it works for them using the amdgpu driver w/ the firmware coming from: graphics/gpu-firmware-amd-kmod FLAVORS=sienna_cichlid. But it would be nice for the integrated GPU to be supported.

Thank you!
Comment 1 Emmanuel Vadot freebsd_committer freebsd_triage 2022-12-17 10:27:53 UTC
Can't even find this PCI id in linux master branch so it will be a while before it will be supported in FreeBSD.
Comment 2 Jonathan Vasquez 2022-12-17 14:35:47 UTC
Hey Emmanuel,

I tested the APU just now on Fedora 37 and it works perfectly fine (even on Wayland). I've attached the linux lspci, dmesg, and uname info, and also two screenshots of GNOME fully running on it.

We can see the following information from the lspci output for the gpu components (first is the dedicated 6900 XT card, second is the integrated raphael gpu):


03:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Navi 21 [Radeon RX 6900 XT] (rev c0) (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Device 04fe
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort+ <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 169
	IOMMU group: 15
	Region 0: Memory at f800000000 (64-bit, prefetchable) [size=16G]
	Region 2: Memory at fc00000000 (64-bit, prefetchable) [size=256M]
	Region 4: I/O ports at f000 [size=256]
	Region 5: Memory at fca00000 (32-bit, non-prefetchable) [size=1M]
	Expansion ROM at fcb00000 [disabled] [size=128K]
	Capabilities: <access denied>
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu


13:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Raphael (rev c1) (prog-if 00 [VGA controller])
	Subsystem: ASUSTeK Computer Inc. Device 8877
	Control: I/O+ Mem+ BusMaster+ SpecCycle- MemWINV- VGASnoop- ParErr- Stepping- SERR- FastB2B- DisINTx+
	Status: Cap+ 66MHz- UDF- FastB2B- ParErr- DEVSEL=fast >TAbort+ <TAbort- <MAbort- >SERR- <PERR- INTx-
	Latency: 0, Cache Line Size: 64 bytes
	Interrupt: pin A routed to IRQ 76
	IOMMU group: 25
	Region 0: Memory at fc20000000 (64-bit, prefetchable) [size=256M]
	Region 2: Memory at fc30000000 (64-bit, prefetchable) [size=2M]
	Region 4: I/O ports at d000 [size=256]
	Region 5: Memory at fc900000 (32-bit, non-prefetchable) [size=512K]
	Capabilities: <access denied>
	Kernel driver in use: amdgpu
	Kernel modules: amdgpu

I've also attached a crash dump that only occurs if I try to start sddm while the HDMI cable is connected and outputting to the motherboard's HDMI slot (the raphael gpu), if I switch the HDMI cable to the dedicated card, it doesn't crash. I'm guessing this is because it's not supported yet so it may expected behavior in this current state.
Comment 3 Jonathan Vasquez 2022-12-17 14:36:05 UTC
Created attachment 238869 [details]
dmesg (linux)
Comment 4 Jonathan Vasquez 2022-12-17 14:36:15 UTC
Created attachment 238870 [details]
lspci (linux)
Comment 5 Jonathan Vasquez 2022-12-17 14:36:27 UTC
Created attachment 238871 [details]
uname (linux)
Comment 6 Jonathan Vasquez 2022-12-17 14:36:48 UTC
Created attachment 238872 [details]
full gnome desktop screenshot
Comment 7 Jonathan Vasquez 2022-12-17 14:37:03 UTC
Created attachment 238873 [details]
gnome info screenshot
Comment 8 Jonathan Vasquez 2022-12-17 14:37:51 UTC
Created attachment 238874 [details]
crash core 0
Comment 9 Jonathan Vasquez 2022-12-17 14:38:02 UTC
Created attachment 238875 [details]
crash core 1
Comment 10 Loïc Bartoletti freebsd_committer freebsd_triage 2023-07-05 12:31:37 UTC
I can confirm ryzen Raphael is not supported. If i m not wrong it requires at least 5.18 

Moreover trying to kldload amdgpu from main branch (2023-07-05) freeze the system.
Comment 11 Jonathan Vasquez 2023-07-05 14:01:39 UTC
This is correct Lois :).

Due note, I am using my dedicated AMD Radeon 6900 XT perfectly fine on 13.2-RELEASE. But having Raphael support (in the future) is a pre-cursor to try and attempt a GPU passthrough (for gaming on a Windows 10 guest) solution with bhyve on this machine.

https://xyinn.org/md/freebsd/amd_radeon_6900_xt
Comment 12 Jonathan Vasquez 2023-07-05 14:27:13 UTC
Loïc* :D
Comment 13 Bryan Clark 2023-10-15 19:18:34 UTC
Hello,

Similar issue for AMD Ryzen 7900 work PC/server. Integrated graphics does not appear to be supported. Would like to access graphical UI on PC directly and Bhyve VM UIs.

sixdonuts@magenta:~ % pciconf -lv|grep -B4 VGA
vgapci0@pci0:15:0:0:    class=0x030000 rev=0xc4 hdr=0x00 vendor=0x1002 device=0x164e subvendor=0x1458 subdevice=0xd000
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Raphael'
    class      = display
    subclass   = VGA
sixdonuts@magenta:~ %

sixdonuts@magenta:~ % uname -a
FreeBSD magenta 13.2-RELEASE FreeBSD 13.2-RELEASE releng/13.2-n254617-525ecfdad597 GENERIC amd64
sixdonuts@magenta:~ %

Thank you!
Comment 14 chris.torek 2024-02-05 12:23:13 UTC
It looks like the Raphael support was new in Linux 5.18, and the latest FreeBSD 14 variant is based off 5.15 (ports/graphics/drm-515-kmod).  The new code makes use of generic "ip_versions", eliminating a lot of special-cases for particular chipsets, but it's rather complex.

There's a 6.1 port (drm-61-kmod) but it's marked 15.0-only. If it can be backported to 14.0, that might work.  I haven't started any sort of attempt to do that myself.