Author Topic: Graphics Card install  (Read 13637 times)

meklort

  • Newbie
  • *
  • Posts: 12
  • Karma: +9/-0
    • View Profile
    • GitHub
Re: Graphics Card install
« Reply #45 on: December 04, 2019, 06:19:14 am »
Code: [Select]
No outputs definitely connected, trying again...
This isn't a POWER problem, this is an AMD GPU driver / hardware problem.  We're going to need a lot more info including the monitor model etc. -- last time I saw this you had to flip DisplayCore on or off, but Navi may require DisplayCore to operate at all.  If the latter is the case, you'll need to contact AMD support to get the driver fixes.
Yes, agreed, it's a problem with the driver (again, I'm assuming it's only a driver issues on ppc64le and not x86_64, but that's only an assumption) as it's not even detecting that there's anything that a monitor could be plugged into.
Note that I did test with amdgpu.dc=1 and amdgpu.dc=0 and there was no change, however my understanding is that navi only works it enabled like you said

Do you know the best way to contact AMD about this? I can run through the appropriate channels to try to get the support improved.
« Last Edit: December 04, 2019, 06:21:10 am by meklort »

MauryG5

  • Hero Member
  • *****
  • Posts: 544
  • Karma: +15/-1
    • View Profile
Re: Graphics Card install
« Reply #46 on: December 04, 2019, 06:46:23 am »
no I personally no, since you are more competent in the matter, see if you can understand how to communicate these problems to them. What I would like to understand instead is, AMD only develops for X86 as a rule, how do you request drivers for Power? Also on the site there are only those for X86 ... Maybe they release the source code because they are open source and then someone then develops the drivers for Power or what?

MauryG5

  • Hero Member
  • *****
  • Posts: 544
  • Karma: +15/-1
    • View Profile
Re: Graphics Card install
« Reply #47 on: December 04, 2019, 12:31:38 pm »
but instead I was also thinking about the procedure that Raptor published on Wiki but I didn't understand. This is the configuration of the Xorg.conf file, the procedure that allows you to activate the graphics card via Xorg you can post it in detail as you did with that of the petitboot? I would like to understand if it is possible through that to activate the GPU ...

madscientist159

  • Raptor Staff
  • *****
  • Posts: 47
  • Karma: +10/-0
    • View Profile
Re: Graphics Card install
« Reply #48 on: December 04, 2019, 08:42:31 pm »
Code: [Select]
No outputs definitely connected, trying again...
This isn't a POWER problem, this is an AMD GPU driver / hardware problem.  We're going to need a lot more info including the monitor model etc. -- last time I saw this you had to flip DisplayCore on or off, but Navi may require DisplayCore to operate at all.  If the latter is the case, you'll need to contact AMD support to get the driver fixes.
Yes, agreed, it's a problem with the driver (again, I'm assuming it's only a driver issues on ppc64le and not x86_64, but that's only an assumption) as it's not even detecting that there's anything that a monitor could be plugged into.
Note that I did test with amdgpu.dc=1 and amdgpu.dc=0 and there was no change, however my understanding is that navi only works it enabled like you said

Do you know the best way to contact AMD about this? I can run through the appropriate channels to try to get the support improved.

To be honest I'd be very, very surprised if there was a ppc64le specific bug in the AMD display detection.  That code is all straight C, and the bit count and endianness both match x86 exactly.

Probably the first step is for anyone seeing this problem on Navi on POWER to try the exact same kernel version on some old / borrowed x86 system with the same card and monitor.  If that also shows the same problem, at least when reported to the kernel bugtracker the devs won't immediately assume it's a POWER bug. :)

meklort

  • Newbie
  • *
  • Posts: 12
  • Karma: +9/-0
    • View Profile
    • GitHub
Re: Graphics Card install
« Reply #49 on: December 04, 2019, 11:32:55 pm »
This issue is due to Navi display support only being enabled for X86.
See here: https://github.com/torvalds/linux/blob/v5.4/drivers/gpu/drm/amd/display/Kconfig#L23
And here: https://github.com/torvalds/linux/blob/v5.4/drivers/gpu/drm/amd/display/dc/calcs/Makefile#L27
And here: https://github.com/torvalds/linux/blob/v5.4/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c#L629

Basically, before this will work the following needs to happen:
Either the DC code needs to be modified to use integer math instead of floating point math or
  • The kernel_fpu_begin / kernel_fpu_end APIs need to be added for POWER (currently only supported on x86 and s390)
  • The KConfig files need to be updated to enable POWER in addition to X86
  • The Makefiles need to be modified to not assume x86 (and sse / sse2)
« Last Edit: December 05, 2019, 06:31:56 am by meklort »

madscientist159

  • Raptor Staff
  • *****
  • Posts: 47
  • Karma: +10/-0
    • View Profile
Re: Graphics Card install
« Reply #50 on: December 05, 2019, 12:09:22 am »
This issue is due to Navi display support only being enabled for X86.
See here: https://github.com/torvalds/linux/blob/v5.4/drivers/gpu/drm/amd/display/Kconfig#L23
And here: https://github.com/torvalds/linux/blob/v5.4/drivers/gpu/drm/amd/display/dc/calcs/Makefile#L27
And here: https://github.com/torvalds/linux/blob/v5.4/drivers/gpu/drm/amd/display/dc/calcs/dcn_calcs.c#L629

Basically, before this will work the following needs to happen:
Either the DC code needs to be modified to use integer match instead of floating point math or
  • The kernel_fpu_begin / kernel_fpu_end APIs need to be added for POWER (currently only supported on x86 and s390)
  • The KConfig files need to be updated to enable POWER in addition to X86
  • The Makefiles need to be modified to not assume x86 (and sse / sse2)

Good catch.  It's generally considered bad form to use floating point in kernelspace for a number of reasons; this smells a bit more like a move to soft-lock AMD GPUs to AMD CPUs (thankfully one that can be worked around with developer time, but still not a great move).

@mauryg5 I'd return that card if I were you since I'd wager the box didn't mention the drivers only work on x86 (normally having Linux support means the device works anywhere -- I've only ever seen this once before where a device required x86 due to bad quality drivers, and I got a full refund in that case).  Either that or try to get a dev or two interested in fixing up the drivers to be properly compatible, but that might require funding the development or waiting for someone to be personally invested enough to make it happen.
« Last Edit: December 05, 2019, 12:12:30 am by madscientist159 »

MauryG5

  • Hero Member
  • *****
  • Posts: 544
  • Karma: +15/-1
    • View Profile
Re: Graphics Card install
« Reply #51 on: December 05, 2019, 12:54:11 am »
are you even telling me that maybe we will never have adequate support on the 5700s? This is a serious thing though ... honestly I'm not sure now what to do ... I might first try writing to AMD for clarification, who knows if they can give me some advice ... it would be a shame not to be able to use it after spending 500 euro and even if it is returned cmq a great sin ...

SiteAdmin

  • Administrator
  • *****
  • Posts: 23
  • Karma: +6/-0
  • RCS Staff
    • View Profile
Re: Graphics Card install
« Reply #52 on: December 05, 2019, 02:02:07 am »
are you even telling me that maybe we will never have adequate support on the 5700s? This is a serious thing though ... honestly I'm not sure now what to do ... I might first try writing to AMD for clarification, who knows if they can give me some advice ... it would be a shame not to be able to use it after spending 500 euro and even if it is returned cmq a great sin ...

No, it will eventually gain support, but Navi is still new.  The number of Linux developers that have Navi and a non-x86 system are likely not very high.  You could offer to loan the GPU and pay a developer to fix the drivers, or wait until market penetration is high enough that developers can pick up a second hand card on eBay or similar for cheap.  There's no shortcut here; it's either money or time unless you're lucky enough to get AMD to care about their broken drivers.  Our official stance is that a driver broken in this manner shouldn't have been accepted by the kernel maintainers in the first place, or at least marked Experimental.

MauryG5

  • Hero Member
  • *****
  • Posts: 544
  • Karma: +15/-1
    • View Profile
Re: Graphics Card install
« Reply #53 on: December 05, 2019, 03:21:43 am »
tell me exactly where I have to write, the address of the AMD support that takes care of the drivers, I have to tell them that the drivers currently in use have bugs that do not allow the correct functioning, to fix the bugs so that they can use the their 5700 cards without problems ... am I right?

meklort

  • Newbie
  • *
  • Posts: 12
  • Karma: +9/-0
    • View Profile
    • GitHub
Re: Graphics Card install
« Reply #54 on: December 05, 2019, 06:50:02 am »
I've filed a bug report here, feel free to add comments to it:
https://gitlab.freedesktop.org/drm/amd/issues/984

MauryG5

  • Hero Member
  • *****
  • Posts: 544
  • Karma: +15/-1
    • View Profile
Re: Graphics Card install
« Reply #55 on: December 05, 2019, 08:39:27 am »
ok thanks, in any case I'll try to write directly to AMD to let him know this problem, I want to see what they answer me ...

MauryG5

  • Hero Member
  • *****
  • Posts: 544
  • Karma: +15/-1
    • View Profile
Re: Graphics Card install
« Reply #56 on: December 05, 2019, 02:49:29 pm »
I wrote to AMD support, I told them everything, let's see what they answer ... I also said that the drivers currently have problems and that they need to be reviewed, I also said if it would be possible to receive direct support for Power from them, since the OperPower community they almost only buy their cards ... It will be difficult but I try

madscientist159

  • Raptor Staff
  • *****
  • Posts: 47
  • Karma: +10/-0
    • View Profile
Re: Graphics Card install
« Reply #57 on: December 05, 2019, 04:12:35 pm »
I wrote to AMD support, I told them everything, let's see what they answer ... I also said that the drivers currently have problems and that they need to be reviewed, I also said if it would be possible to receive direct support for Power from them, since the OperPower community they almost only buy their cards ... It will be difficult but I try

Thanks partly to meklort's initial tracing of the issue, I was able to put together an initial PoC/RFC patch here:
https://lists.freedesktop.org/archives/amd-gfx/2019-December/043611.html

I don't have a Navi card to test with, so if you are able to apply that patch, recompile, and test, I'd appreciate it.
« Last Edit: December 05, 2019, 04:17:22 pm by madscientist159 »

MauryG5

  • Hero Member
  • *****
  • Posts: 544
  • Karma: +15/-1
    • View Profile
Re: Graphics Card install
« Reply #58 on: December 05, 2019, 04:23:52 pm »
no i'm sorry i'm not able to do this, i don't have the necessary skills unfortunately. If anyone has the same card and is able to do it, it would be really good ...

meklort

  • Newbie
  • *
  • Posts: 12
  • Karma: +9/-0
    • View Profile
    • GitHub
Re: Graphics Card install
« Reply #59 on: December 06, 2019, 07:03:21 pm »
@MauryG5
I was able to test the patch from madscientist159 and with some modifications I have the Radeon 5700 XT running my system. We're still working on cleaning up the patch, but Navi is now working on POWER. once we're further along, I'll test on Fedora 31 instead of Rawhide and hopefully get you a kernel build to try.