freebsd / drm-kmod-firmware

KMS firmware components for graphics/kms-firmware port
Other
22 stars 17 forks source link

Can we get the RDNA3 firmware? #29

Closed lin72h closed 7 months ago

lin72h commented 7 months ago

Since the drm-61-kmod ports already in the ports tree, I want to test the RDNA3 GPU(7900 XT) on my FreeBSD-15-Current desktop, can you update the the gc11* bin from the linux-fimware repo

Thanks

mekanix commented 7 months ago

As I have exact same card, I could test this if I could. For now I can confirm that amdgpu panics the kernel, but before that there's a message about missing gc11* file. If I figure out how, I will write PR for a missing firmware, but I would sure appreciate help on how to do that properly. Thank you!

lin72h commented 7 months ago

@mekanix hi I'm also to new to this code base, If the maintainer could help that would be very helpful, in the mean while, I think it's a about convert the bin format(from the linux-firmware repo) to ko format.

lin72h commented 7 months ago

@evadot wow that's quick, as aways think you

mekanix commented 7 months ago

Thank you for the fast response. I still get a missing firmware message drmn0: could not load firmware image 'amdgpu/psp_13_0_0_sos.bin'. Can we also get psp13* blobs, please?

evadot commented 7 months ago

Thank you for the fast response. I still get a missing firmware message drmn0: could not load firmware image 'amdgpu/psp_13_0_0_sos.bin'. Can we also get psp13* blobs, please?

Oups, seems I've forgot some firmwares, will fix this today.

evadot commented 7 months ago

It's hard to follow which card generation needs which firmware, could you both post the pci-id of your card and the list of firmware it loads/tries to load ?

Thanks.

mekanix commented 7 months ago

This is portion of my pciconf -lv

vgapci0@pci0:67:0:0:    class=0x030000 rev=0xcc hdr=0x00 vendor=0x1002 device=0x744c subvendor=0x1002 subdevice=0x1002
    vendor     = 'Advanced Micro Devices, Inc. [AMD/ATI]'
    device     = 'Navi 31 [Radeon RX 7900 XT/7900 XTX]'
    class      = display
    subclass   = VGA

As for the firmware, I can't tell you but one at a time because that's where it breaks. If you think it's easier for you to tell me how to add all the firmware that the driver is asking for, I'll be happy to send PR for it.

mekanix commented 7 months ago

I think I made some progress. The "trick" was using tag 20230625. I made it load psp_* blob, but now it is missing another one. Let me try and trace all of those files and send PR. Maybe the GPU won't work, but at least all firmware will be in place.

evadot commented 7 months ago

Please tell me if everything is present now, and then I'll update the port again.

mekanix commented 7 months ago

With #30 I successfully loaded the driver and I'm enjoying the view. Thank you so much!

evadot commented 7 months ago

Port updated. I would love if you could patch fwget so it will install the right packages based on your PCI-ID.

mekanix commented 7 months ago

I waited for pkgs to become available and I've created https://github.com/freebsd/freebsd-src/compare/main...mekanix:freebsd-src:fwget. As I've never heard of fwget before, I have to ask did I do it right? It does download the right firmware, but should it be on one line, multiple lines but single addpkg invocations or it's good like this? Also, should I send PR here or on reviews.freebsd.org? Thank you!

evadot commented 7 months ago

I waited for pkgs to become available and I've created freebsd/freebsd-src@main...mekanix:freebsd-src:fwget. As I've never heard of fwget before, I have to ask did I do it right? It does download the right firmware, but should it be on one line, multiple lines but single addpkg invocations or it's good like this? Also, should I send PR here or on reviews.freebsd.org? Thank you!

One addpkg is good enough, and yes please create a review on phabricator :)

mekanix commented 7 months ago

Review created for everyone interested.