Mesa for Linux PPC

AmigaOne X1000 platform specific issues related to Linux only.

Re: Mesa for Linux PPC

Postby Srtest » Sun May 15, 2016 4:10 pm

AMD Unleashes Initial AMDGPU Driver Support For GCN 1.0 / Southern Islands GPUs
http://phoronix.com/scan.php?page=news_ ... ental-Code

In addition, the next Mesa appears to be a significant release with important patches for us so the powers that be might want to check it out as the issues doesn't seem to be just about one aspect or driver as we have a non-working 2D acceleration via Glamor, llvmpipe only 64bit userland and maybe on the next release some cards will start to work with Gallium RadeonSI albeit that's a mere speculation at this point.
User avatar
Srtest
 
Posts: 239
Joined: Wed Jun 11, 2014 6:06 pm

Re: Mesa for Linux PPC

Postby xeno74 » Sun May 15, 2016 9:52 pm

Srtest wrote:AMD Unleashes Initial AMDGPU Driver Support For GCN 1.0 / Southern Islands GPUs
http://phoronix.com/scan.php?page=news_ ... ental-Code

In addition, the next Mesa appears to be a significant release with important patches for us so the powers that be might want to check it out as the issues doesn't seem to be just about one aspect or driver as we have a non-working 2D acceleration via Glamor, llvmpipe only 64bit userland and maybe on the next release some cards will start to work with Gallium RadeonSI albeit that's a mere speculation at this point.


Thank you for this information. :-)
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
 
Posts: 2870
Joined: Fri Mar 23, 2012 8:58 am

Re: Mesa for Linux PPC

Postby Srtest » Sun Jul 24, 2016 2:43 am

Upgrading to Mesa 12 nearly destroyed my installation until I managed to switch Xorg to fbdev only.

So if you are running a distro that automatically updates Mesa and you use a SI AMD card (GCN 1.0) either avoid it or switch to fbdev only in the Xorg.conf file before the procedure.
User avatar
Srtest
 
Posts: 239
Joined: Wed Jun 11, 2014 6:06 pm

Re: Mesa for Linux PPC

Postby xeno74 » Sun Jul 24, 2016 5:37 am

Srtest wrote:Upgrading to Mesa 12 nearly destroyed my installation until I managed to switch Xorg to fbdev only.

So if you are running a distro that automatically updates Mesa and you use a SI AMD card (GCN 1.0) either avoid it or switch to fbdev only in the Xorg.conf file before the procedure.


Thank you for the hint.
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
 
Posts: 2870
Joined: Fri Mar 23, 2012 8:58 am

Re: Mesa for Linux PPC

Postby xeno74 » Sun Sep 25, 2016 1:53 pm

Hi All,

I successfully updated Mesa to version 12.0.3 on my Fedora 25 PPC64 Server today.

Code: Select all
Gallium 0.4 on AMD BARTS (DRM 2.45.0 / 4.7.5_A-EON_AmigaONE_X1000_Nemo, LLVM 3)


It works without any problems with my AMD Radeon HD6870.

It was compiled with LLVM 3 and I have found the files radeonsi_dri.so and radeonsi_drv_video.so in the directory /usr/lib64/dri. Maybe you have hardware 3D acceleration with your SI graphics card.

Please test Fedora 25 with your SI Radeon graphics cards (7xxx or higher).

Image

Thanks,

Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
 
Posts: 2870
Joined: Fri Mar 23, 2012 8:58 am

Re: Mesa for Linux PPC

Postby xeno74 » Sun Nov 20, 2016 6:02 pm

Hi All,

I have read an article about hardware 3D acceleration with SI graphics cards on a Talos Secure PowerPC Workstation. They show it in a video.

Link to the article

They use hardware 3D acceleration with some AMD Radeon R9 290 graphics cards. They can use hardware 3D acceleration in a virtual QEMU/KVM machine with GPU passthrough as well.

Very impressive!

They need the following patch:

Code: Select all
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -8596,6 +8596,11 @@
     if (r)
         return r;

+#ifndef CONFIG_X86
+    DRM_INFO("Resetting CP block to clear GPU load fault\n");
+    cik_gpu_soft_reset(rdev, RADEON_RESET_CP);
+#endif
+
     rdev->accel_working = true;
     r = cik_startup(rdev);
     if (r) {


OK, we know that hardware 3D acceleration works with SI graphics cards. How can we activate it on our NG Amigas?

I know LLVM was a problem in the past. There was a bug in LLVM that meant it wouldn't work on PPC.

Mesa 12.0.3 with LLVM 3 works without any problems with my AMD Radeon HD6870 on Fedora 25 Server PPC64.

Code: Select all
Gallium 0.4 on AMD BARTS (DRM 2.45.0 / 4.7.5_A-EON_AmigaONE_X1000_Nemo, LLVM 3)


I have found the files radeonsi_dri.so and radeonsi_drv_video.so in the directory /usr/lib64/dri. Maybe you have hardware 3D acceleration with your SI graphics card.

Please test Fedora 25 with your SI Radeon graphics cards (7xxx or higher).

@Darren
Do you have further information about hardware 3D acceleration with SI graphics cards?

We use the fbdev (video driver for framebuffer device) for the ubuntu MATE 16.04.1 LTS live DVD for supporting SI graphics cards but maybe we could activate hardware 3D acceleration for SI graphics cards for the live DVD as well.

Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
 
Posts: 2870
Joined: Fri Mar 23, 2012 8:58 am

Re: Mesa for Linux PPC

Postby Srtest » Sun Nov 20, 2016 6:34 pm

xeno74 wrote:Hi All,

I have read an article about hardware 3D acceleration with SI graphics cards on a Talos Secure PowerPC Workstation. They show it in a video.

Link to the article

They use hardware 3D acceleration with some AMD Radeon R9 290 graphics cards. They can use hardware 3D acceleration in a virtual QEMU/KVM machine with GPU passthrough as well.

Very impressive!

They need the following patch:

Code: Select all
--- a/drivers/gpu/drm/radeon/cik.c
+++ b/drivers/gpu/drm/radeon/cik.c
@@ -8596,6 +8596,11 @@
     if (r)
         return r;

+#ifndef CONFIG_X86
+    DRM_INFO("Resetting CP block to clear GPU load fault\n");
+    cik_gpu_soft_reset(rdev, RADEON_RESET_CP);
+#endif
+
     rdev->accel_working = true;
     r = cik_startup(rdev);
     if (r) {


OK, we know that hardware 3D acceleration works with SI graphics cards. How can we activate it on our NG Amigas?

I know LLVM was a problem in the past. There was a bug in LLVM that meant it wouldn't work on PPC.

Mesa 12.0.3 with LLVM 3 works without any problems with my AMD Radeon HD6870 on Fedora 25 Server PPC64.

Code: Select all
Gallium 0.4 on AMD BARTS (DRM 2.45.0 / 4.7.5_A-EON_AmigaONE_X1000_Nemo, LLVM 3)


I have found the files radeonsi_dri.so and radeonsi_drv_video.so in the directory /usr/lib64/dri. Maybe you have hardware 3D acceleration with your SI graphics card.

Please test Fedora 25 with your SI Radeon graphics cards (7xxx or higher).

@Darren
Do you have further information about hardware 3D acceleration with SI graphics cards?

We use the fbdev (video driver for framebuffer device) for the ubuntu MATE 16.04.1 LTS live DVD for supporting SI graphics cards but maybe we could activate hardware 3D acceleration for SI graphics cards for the live DVD as well.

Cheers,
Christian



Do you enable the experimental GCN 1.0 driver on your new kernels? if so then the combintation of amdgpu on the kernel + amdgpu on the user driver level can yield better results (new driver supports SI). Bear in mind that it is not only about the 3D protocol concerning movies and games. The interface itself is more and more Opengl. Take wayland for example and the newer Kde, Qt and KWin as a compositor all work much better when the driver works which is Ogles, Glamor and all that stuff. Another thing is the modesetting driver on the new experimental Xserver 19 is supposed to be better than the software renderer the SI users use.

Edit:

[PATCH] Fix RadeonCopyData bpp=2 case for big-endian
https://lists.freedesktop.org/archives/ ... 03243.html

[PATCH] micro-optimize RADEONCopySwap in radeon_accel.c for powerpc
https://lists.freedesktop.org/archives/ ... 29583.html

Update: installed the new drivers - amdgpu and radeon and tried a few things with the xorg.conf.

Now, amdgpu fails here to initialize. Why? I'm not sure only can say that those new versions enable dri3 by default.

After switching to the "radeon" setting on the xorg.conf file I figured out that glamor no longer poses an issue in loading the driver or failing to accelerate and just loading the software renderer - either way you get to your desktop which is the most important thing. You just need to do a couple of things: 1st, mark # all the lines you added with "dri" or "renderaccel" as you no longer need to circumvent the issue. After that replace under "module" section "glx" with "glamoregl". I learned this from the xorg's log where it says glamor needs to be called directly so I figured because we use a xorg.conf where the system should configure itself automatically, we need to precisely summon it. I'm adding my xorg.conf which loads a software renderer yet doesn't get stuck on the failed glamor. You don't need to enable a previous dri because it just works or to use Amiga user tlotsm's workaround. What exactly works? I don't know.

Next test will be with a new Xserver 19 and the Modesetting driver which on 18 gives a wrong color BE issue. Hope they fixed it. Maybe the new Xserver will have more positive affects because there are guys on the mailing list that insist it is a Xserver issue. Right now the radeon setting + glamoregl (as a module) in the xorg.conf worked.

Those with SI cards (other than myself apparently) can test a modified kernel with GCN 1.0 amdgpu driver and without the radeon modules, while removing all the drivers and trying the amdgpu driver and report back (with and without a xorg.conf file on new Xserver 19 when it is out, which specifically enables glamor). Doing all that on ppc64 with radeonsi instead of amdgpu might produce even better results.

Update 2

Okay! something definitely changed as I'm getting the wrong color issue when trying to use the html5 player inside FF which previously didn't happen and which tlotsm reported on NI cards. I'm trying to figure out what it uses to produce that color issue. Could it be glamor as 2D? doesn't it goes through the same 3D route to produce it (Mesa) ? If I have another result/answer I will update again as it might also they simply changed something in FF 50. Ok false alarm it might be that FF 50 broke BE colors on webgl or whatever it uses to process html5.
Attachments
Xorg.0.log.7z
(3.56 KiB) Downloaded 42 times
xorg.conf.7z
(901 Bytes) Downloaded 46 times
User avatar
Srtest
 
Posts: 239
Joined: Wed Jun 11, 2014 6:06 pm

Re: Mesa for Linux PPC

Postby xeno74 » Mon Nov 21, 2016 8:03 am

Hi Srtest,

Many thanks for testing and for your explanation. I will try to compile an additional RC6 of kernel 4.9 with the GCN 1.0 amdgpu driver and without the radeon driver.
Hans explained me very well our problem with the hardware 3D acceleration on SI graphics cards:

Looks impressive. However, which PowerPC Linux distribution is this with? It's highly likely that it's the little-endian ppc64el distro, which is mentioned on the Talos workstation home page:
https://www.crowdsupply.com/raptor-comp ... orkstation

Most likely, you'd have to switch to a little-endian PowerPC distro. Southern Islands and newer GPUs from AMD are all little-endian. So big-endian systems need to byte-swap *everything* that is transferred to/from the GPU. As driver developer I can tell you that's a big hassle to deal with. AFAIK, the Linux drivers aren't set up to do that. Switching the entire OS to little-endian bypasses this problem entirely because both the CPU and GPU then use the same format.

regard,
Hans


Cheers,
Christian
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
 
Posts: 2870
Joined: Fri Mar 23, 2012 8:58 am

Re: Mesa for Linux PPC

Postby Srtest » Mon Dec 05, 2016 5:31 am

Upgraded to Xserver 1.19 (Warning! you can lose your ability to login or change the installation if your distro hadn't changed the Xserver by itself), and now I'm able to to a "sudo X :1 -configure" which outputs a xorg.conf.new file even without needing to stop the session. When I do that it picks amdgpu in the driver user level because the new driver supports SI cards and is looking for a newer kernel than 4.7 and maybe also the experimental amdgpu kernel driver. I changed the xorg.conf.new from "amdgpu" to "modesetting" because I want to test what is supposed to be a better supported built-in driver to work with the software renderer. I'm getting again the wrong color issue but only on the cursor and not on anything else except some known places (like those needing glamor and 2D). People with SI cards shouldn't try the amdgpu driver because even if the radeon kernel driver works for them in the 4.9 kernel, the amdgpu still doesn't work so even if it is separated from the kernel driver it might cause issues I can't test right now. That is very good news because that means that we have amdgpu for SI even if radeonsi doesn't work and hopefully the kernel gets fixed for all of us.
User avatar
Srtest
 
Posts: 239
Joined: Wed Jun 11, 2014 6:06 pm

Re: Mesa for Linux PPC

Postby xeno74 » Mon Dec 19, 2016 12:57 am

Mesa 13.0.2 is available for ubuntu MATE 17.04 PowerPC:

Image
http://www.amigalinux.org
http://www.supertuxkart-amiga.de

Running Linux on AmigaONEs can require some tinkering.
User avatar
xeno74
 
Posts: 2870
Joined: Fri Mar 23, 2012 8:58 am

PreviousNext

Return to Platform: AmigaOne X1000 - Linux Only

Who is online

Users browsing this forum: No registered users and 7 guests