AMDGPU Support

Morris Zuss morris at vlen.org
Fri Apr 29 21:21:35 UTC 2022


On 26/04/2022 23:27, Denis 'GNUtoo' Carikli wrote:
> Hi,
>
> Thanks a lot for the test/work!!!
>
> This looks really promising.

I was looking through the LibrePlanet wiki and saw the hardware research 
section, I wasn't sure if people were still trying to work on it. 
Nevertheless, thank you for the assistance and I'm happy to help.

So I changed gfx to gmc, to which the module still doesn't load but 
there was a few additional lines.

Here is the output from dmesg: https://termbin.com/ycc9p

I'm not entirely sure what I'm doing, so I just started picking out 
things in the log and seeing if there were any more of those "r = ..." 
relevant statements.  Searching for "Failed to load MC firmware" only 
brought me to one place which was relevant to my card, which is at 
gmc_v8_0.c:1230

>         if (adev->asic_type == CHIP_TONGA) {
>                 r = gmc_v8_0_tonga_mc_load_microcode(adev);
>                 if (r) {
>                         DRM_ERROR("Failed to load MC firmware!\n");
>                         return r;
>                 }
>         } else if (adev->asic_type == CHIP_POLARIS11 ||
>                         adev->asic_type == CHIP_POLARIS10 ||
>                         adev->asic_type == CHIP_POLARIS12) {
>                 r = gmc_v8_0_polaris_mc_load_microcode(adev);
>                 if (r) {
>                         DRM_ERROR("Failed to load MC firmware!\n");
>                         return r;
>                 }
>         }
I went ahead and added the clean_sed for that section as well. Nothing 
seemed to change from the output of dmesg.

But regardless, here it is: https://termbin.com/5cbm

As another attempt I tried seeing if the gmc_v8_0_hw_init function had 
to do anything with it. Which can be found at gmc_v8_0.c:1266

> static int gmc_v8_0_resume(void *handle)
> {
>         int r;
>         struct amdgpu_device *adev = (struct amdgpu_device *)handle;
>
>         r = gmc_v8_0_hw_init(adev);
>         if (r)
>                 return r;
>
> [...]
>
I replaced the return statement here and there was still nothing 
different in the dmesg output, but it didn't seem like it would work in 
the first place.

This is what my deblob-5.10 script currently looks like: 
https://termbin.com/9oi6

> Your GPU has several processors, and for now many of them require
> nonfree firmwares, so there may be several parts in the code where
> the amdgpu driver needs to be patched.

Is there anything else I should be looking for besides the "r = ..." 
statements? The dmesg output has brought me to amdgpu_kms.c and 
amdgpu_device.c but I couldn't find any relevant statements there.

> As for testing it might be best if you manage to disable somehow the
> login screen (it can been done with systemctl disable lightdm or
> systemctl disable gdm and by rebooting after that).

I'm pulling the logs from within the console so xorg shouldn't be 
interfering with loading the amdgpu module.

-- Morris Zuss
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.fsfla.org/pipermail/linux-libre/attachments/20220429/7500e292/attachment.htm>


More information about the linux-libre mailing list