Announcement

Collapse
No announcement yet.

Wanting to learn Vulkan, got a SI pitcairn - what's the best path forward?

Collapse
X
 
  • Filter
  • Time
  • Show
Clear All
new posts

  • Wanting to learn Vulkan, got a SI pitcairn - what's the best path forward?

    I have a Radeon R7 370.
    I've been wanting to learn Vulkan for a while and have been following the amdgpu on SI issue - although I'll admit I don't really understand how AMD's drivers fit together.
    I'm using Mint 18 (64-bit, XFCE).
    I want to stay open source as much as possible.

    I tried compiling 4.9-rc1 yesterday and ended up with very slow graphics and a failure to detect my 2nd monitor. I'm not sure if it's something to do with lacking pitcairn firmware.


    I don't really mind if I get sub-par graphics performance as long as it's usable (say at least 20% of optimal).


    Is it worth trying to get Vulkan running yet? Can I expect to get a working system suitable for learning Vulkan right now?
    If not, what's a good guess as to how long I'll need to wait?
    Should I switch to a different distro? I'd like to keep XFCE.
    Or, would you recommend that I upgrade, say to a RX 470?

    What's my best option at the moment?
    Thanks for your assistance.

  • #2
    I've been wanting to learn Vulkan for a while and have been following the amdgpu on SI issue
    What issue?
    I tried compiling 4.9-rc1 yesterday and ended up with very slow graphics and a failure to detect my 2nd monitor. I'm not sure if it's something to do with lacking pitcairn firmware
    Regular pitcairn firmware works for AMDGPU. If you have the "firmware-linux-nonfree" package you don't need new firmware AFAIK.

    What you could do is compile 4.10-wip, because let me tell you what happened to my 270X. If using 4.9 from last 2 weeks, I'd have the same performance as if DPM state was set to low. But 4.9 from https://cgit.freedesktop.org/~agd5f/...-next-4.10-wip (and the 4.9-wip branch too) performance is VERY GOOD. I'm not sure the commits from the 4.9-wip branch have fully landed on linux-4.9-rc1, but I assume not.

    I don't really mind if I get sub-par graphics performance as long as it's usable (say at least 20% of optimal).
    The AMDGPU Kernel driver is better than Radeon. If you get poor performance then you're using an outdated or a wrong Kernel. See agd5f's repos linked above and chose the 4.10-wip Kernel to compile.
    Is it worth trying to get Vulkan running yet? Can I expect to get a working system suitable for learning Vulkan right now?
    If you use the Radeon kernel driver, it's totally worth it. Don't wait for AMD to opensource their stuff, they're known for taking too much time to do things. Learn current RADV Vulkan on Radeon and please contribute to this project.
    Should I switch to a different distro? I'd like to keep XFCE.
    PPA's for Ubuntu/Debian tend to be good, but I remember seeing a comment here saying that Padoka's LLVM is outdated by two weeks. If you want the absolute latest of everything to work on, go for Arch with the LLVM-SVN and mesa-git repos, and the Kernel mentioned above.
    Or, would you recommend that I upgrade, say to a RX 470?
    If you can keep working on both, that would be terrific.

    What's my best option at the moment?
    IMO, Linux 4.10-wip or amd-staging-4.7, with Arch plus the repos mentioned. The best / most up-to-date and most stable distro, with the latest development from Mesa, Linux, and LLVM.

    Comment


    • #3
      Unfortunately I'm not particularly clued up on kernel configurating. This is the first time I've actually needed to build my own.

      I just tried agd5f's 4.10-wip kernel. Compiled and installed OK AFAICT - although it named itself 4.9.0-rc1+ (is this just due to it simply being based on 4.9 or did I mess up?).
      However, once booted it seems I'm using the llvmpipe software driver.
      Is this a KVM failure? Booting with nomodeset didn't help.

      So I guess my new kernel is borked?



      Is there somewhere that tells me all the build config options I need to change to get SI amdgpu working?

      I started with my config from 4.7 (via make oldconfig).
      I enabled this "Enable amdgpu support for SI parts (DRM_AMDGPU_SI)".
      I need to disable the radeon driver too, right?
      Do I just disable the "ATI Radeon" option? I tried this.



      Originally posted by Amarildo View Post
      Regular pitcairn firmware works for AMDGPU. If you have the "firmware-linux-nonfree" package you don't need new firmware AFAIK.
      I don't have that package in my repos, and google keeps sending me to obscure links that don't seem to have graphics firmware.
      There's no pitcairn in /lib/firmware/amdgpu although there is carrizo, fiji, stoney, tonga, topaz. /lib/firmware/radeon has a handful of PITCAIRN_*.bin files. Is this what I need?



      Originally posted by Amarildo View Post
      If you use the Radeon kernel driver, it's totally worth it. Don't wait for AMD to opensource their stuff, they're known for taking too much time to do things. Learn current RADV Vulkan on Radeon and please contribute to this project.
      I'm getting confused. Don't I want to be using amdgpu for Southern Islands vulkan?

      I know OpenGL fairly well but I haven't written a line of Vulkan yet. Is RADV a good option to _learn_ on in its current state? Will amdgpu on SI be worse? I do tend to use rare features lots in OpenGL.



      I'm feeling like I really need a good newbie explanation of how AMD's drivers work.

      So my program's Vulkan calls can go to RADV, an optional component? of MESA, which is attached to the RADEONSI usermode driver, which is forwarded by LIBDRM_RADEON via DRI to the kernel RADEON driver, which issues commands to the GFX card which does the stuff.
      Alternately I can use the standard? MESA Vulkan implementation, MESA being attached to the RADEONSI usermode driver, which is forwarded by LIBDRM_AMDGPU to the kernel AMDGPU driver, which issues commands to the GFX card which does the stuff.

      I'm sure that doesn't make good sense, and I didn't mention Gallium or AMDGPU-Pro.

      It's a RADView of the MESA from the VULCANo.

      Comment


      • #4
        The radv Vulkan driver *is* the standard Mesa Vulkan implementation; before radv there was no Mesa Vulkan implementation.

        * Vulkan drivers: AMDGPU-PRO's closed source binary, radv in mesa

        * GL drivers - AMDGPU-PRO's closed source binary, core Mesa GL plus radeonsi pipe driver in mesa (radeonsi in turn uses radeon or amdgpu winsys drivers in mesa)

        * libdrm - AMDGPU-PRO's extended libdrm-amdgpu, upstream libdrm-amdgpu, upstream libdrm-radeon

        * kernel drivers - AMDGPU-PRO's extended amdgpu (couple of extra IOCTLs), upstream amdgpu, upstream radeon

        In theory radeon winsys talks to libdrm-radeon and amdgpu winsys talks to libdrm-amdgpu, but in practice I believe radeon winsys bypasses libdrm-radeon frequently and IOCTL's directly into kernel driver.

        There are a few diagrams around showing how the various bits connect together; believe Marek's is the most up-to-date - if I find it I'll post it here
        Test signature

        Comment


        • #5
          Unfortunately I'm not particularly clued up on kernel configurating. This is the first time I've actually needed to build my own.
          No problem, we're here to help
          I just tried agd5f's 4.10-wip kernel. Compiled and installed OK AFAICT - although it named itself 4.9.0-rc1+ (is this just due to it simply being based on 4.9 or did I mess up?).
          I think so, yes. There's nothing I could do to make it display as 4.10.
          However, once booted it seems I'm using the llvmpipe software driver.
          Is this a KVM failure? Booting with nomodeset didn't help.
          I'm not sure what you mean. Did you follow Arch's Wiki to make it use the amdgpu driver?

          So I guess my new kernel is borked?
          I've had problems recently trying to use both 4.9-rc2 and 4.10-wip. Check the "4.9-rc2 launched" thread.
          Is there somewhere that tells me all the build config options I need to change to get SI amdgpu working?
          You only need this to have amdgpu Kernel driver working for SI cards:

          CONFIG_DRM_AMDGPU_SI=y
          I started with my config from 4.7 (via make oldconfig).
          I enabled this "Enable amdgpu support for SI parts (DRM_AMDGPU_SI)".
          I need to disable the radeon driver too, right?
          Do I just disable the "ATI Radeon" option? I tried this.
          No need to disable the Radeon driver because you'll blacklist it via /etc/modprobe.d/

          I don't have that package in my repos, and google keeps sending me to obscure links that don't seem to have graphics firmware.
          There's no pitcairn in /lib/firmware/amdgpu although there is carrizo, fiji, stoney, tonga, topaz. /lib/firmware/radeon has a handful of PITCAIRN_*.bin files. Is this what I need?
          That's alright, I don't have Pitcairn in /lib/firmware/amdgpu/ as well. It uses the same firmware on /lib/firmware/radeon/ I think.

          I'm getting confused. Don't I want to be using amdgpu for Southern Islands vulkan?
          Current RADV (cummunity Open Source Vulkan) is only available for the Radeon KERNEL driver AFAIK. But I need to check this out because some people confuse RadeonSI (mesa stuff) with Radeon the Kernel driver. If I'm wrong then this is a good thing because you'll be able to code for vulkan for both Kernel drivers, Radeon and AMDGPU
          I know OpenGL fairly well but I haven't written a line of Vulkan yet. Is RADV a good option to _learn_ on in its current state? Will amdgpu on SI be worse? I do tend to use rare features lots in OpenGL.
          I'm very positive that OpenGL and Vulkan are two different things. If you learn how to code Vulkan with RADV, I'm very confident that this experience will be valuable once AMD opensources their Vulkan driver. It's like going from C to C#, there won't be many differences.
          I'm feeling like I really need a good newbie explanation of how AMD's drivers work.
          In what regards?
          So my program's Vulkan calls can go to RADV, an optional component? of MESA, which is attached to the RADEONSI usermode driver, which is forwarded by LIBDRM_RADEON via DRI to the kernel RADEON driver, which issues commands to the GFX card which does the stuff.
          I think this is very close to what happens.
          Alternately I can use the standard? MESA Vulkan implementation
          I don't think Mesa already has a Vulkan implementation aside from RADV.

          Comment


          • #6
            Originally posted by Amarildo View Post
            Current RADV (cummunity Open Source Vulkan) is only available for the Radeon KERNEL driver AFAIK. But I need to check this out because some people confuse RadeonSI (mesa stuff) with Radeon the Kernel driver. If I'm wrong then this is a good thing because you'll be able to code for vulkan for both Kernel drivers, Radeon and AMDGPU
            Actually radv only works with the amdgpu kernel driver AFAIK.
            Test signature

            Comment


            • #7
              I had a bit too much of the bleeding edge blues (and it seems I suck at Arch) so I gave up and got an RX 480 instead.

              Amdgpu and RADV are working mostly fine now (it seems better on 4.9-rc3 than 4.8), and I've also managed to write my first vulkan triangle.
              My only issues at the moment are a bit of tearing and that my screen resizes every time I turn off the monitor and doesn't recover when I turn it back on. Other than that it's all good (so far).

              I'm still using Mint 18 XFCE. I'm using paulo-miguel-dias's PPA for mesa. Standard kernel downloads (from ubuntu.com) for 4.8 and 4.9-rc3. agd5f's version didn't seem to work for me.

              Originally posted by bridgman View Post
              There are a few diagrams around showing how the various bits connect together; believe Marek's is the most up-to-date - if I find it I'll post it here
              Maybe this one: https://www.phoronix.com/forums/foru...e-faster/page2.

              Thanks for your helps.

              Comment

              Working...
              X