Lost in GPU support terminology / status

Post Reply
User avatar
mctom
Posts: 442
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 49 times
Been thanked: 42 times
Contact:

Lost in GPU support terminology / status

Post by mctom »

Hi,

So I've been using Armbian Focal XFCE on my N2+ for a while, with no GPU support whatsoever, and then decided to try that "Panfrost" thing everybody's talking about. Cloned it, compiled, installed, and everything went into shambles, the XFCE desktop is unusable at this point. Graphics are garbled beyond recognition.

So I set up Wayfire this morning (a Wayland desktop environment) and I'm genuinely impressed - it works pretty neatly, at least compared to what I saw before. Not that straightforward to configure, but it's so lightweight I felt belly butterflies exploring it. And it's less demanding than Sway.

Anyway, I have troubles following the expert threads in this forum, especially the Panfrost on N2 - no idea what's going on there.

So I wanted to ask for clarification of the following terms: What is Mesa, Panfrost, Mali, DRM, Gallium?
Which of these is in the repos, and which must be compiled manually?
What do I need to set up a Wayfire desktop from the scratch? I prefer Ubuntu base and long term support.
What has better playback and 3D support these days, Wayland or X11?
I strongly prefer Firefox for browsing. Does that influence my choice somehow?

Thanks for your effort in advance!

EDIT: Also, why is there a special kernel necessary to support GPU in N2+? I always though the drivers can be simply installed and removed. How are these kernels different from mainline? Can i compile my own?
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

User avatar
mctom
Posts: 442
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 49 times
Been thanked: 42 times
Contact:

Re: Lost in GPU support terminology / status

Post by mctom »

Code: Select all

mctom@Tomusiomat-ARM:~$ dmesg | grep panfrost | head -n 20
[    3.657412] panfrost ffe40000.gpu: clock rate = 24000000
[    3.657465] panfrost ffe40000.gpu: dev_pm_opp_set_regulators: no regulator (mali) found: -19
[    3.666954] panfrost ffe40000.gpu: mali-g52 id 0x7212 major 0x0 minor 0x0 status 0x0
[    3.666964] panfrost ffe40000.gpu: features: 00000000,13de77ff, issues: 00000000,00000400
[    3.666968] panfrost ffe40000.gpu: Features: L2:0x07110206 Shader:0x00000000 Tiler:0x00000809 Mem:0x1 MMU:0x00002830 AS:0xff JS:0x7
[    3.666972] panfrost ffe40000.gpu: shader_present=0x3 l2_present=0x1
[    3.691577] [drm] Initialized panfrost 1.1.0 20180908 for ffe40000.gpu on minor 0
[   81.735596] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x316e4c0, tail=0x316e4c0
[   81.739850] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x316e4c0, tail=0x316e4c0, sched_job=00000000c7947aa5
[   81.775649] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x30be0c0, tail=0x30be0c0
[   81.779835] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x30be0c0, tail=0x30be0c0, sched_job=00000000b8e0769f
[   81.802941] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x31db4c0, tail=0x31db4c0
[   81.807329] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x31db4c0, tail=0x31db4c0, sched_job=00000000b0d4abc1
[   81.827635] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x30bd8c0, tail=0x30bd8c0
[   81.833886] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x30bd8c0, tail=0x30bd8c0, sched_job=00000000beb91087
[   81.891628] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x31928c0, tail=0x31928c0
[   81.895818] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x31928c0, tail=0x31928c0, sched_job=0000000055c751c9
[   82.350877] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x51bd4c0, tail=0x51bd4c0
[   82.355219] panfrost ffe40000.gpu: gpu sched timeout, js=0, config=0x7300, status=0x51, head=0x51bd4c0, tail=0x51bd4c0, sched_job=00000000d2703730
[   82.764643] panfrost ffe40000.gpu: js fault, js=0, status=INSTR_INVALID_ENC, head=0x31ddcc0, tail=0x31ddcc0
Does that mean I'm using a 2.5 years old version of Panfrost?

Code: Select all

[    3.691577] [drm] Initialized panfrost 1.1.0 20180908 for ffe40000.gpu on minor 0

EDIT: One final question.. :D
Can I have both Wayland Wayfire AND X11 XFCE installed, and selected on the login screen? I think I do have this option now, but can it be done so both options work decently?
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

chewitt
Posts: 126
Joined: Mon Aug 12, 2019 12:27 pm
languages_spoken: english
Has thanked: 1 time
Been thanked: 112 times
Contact:

Re: Lost in GPU support terminology / status

Post by chewitt »

Mesa provides open-source OpenGLES/OpenGL/Vulkan drivers (subject to hardware support, and the drivers being written) for graphics acceleration (not video, graphics). Gallium is the GL module. Panfrost has two parts; a Linux kernel driver and mesa driver, needed for the ARM Mali Bifrost GPU in the Amlogic chip in the N2. DRM is the kernel framework that renders an image prepared by the GPU to an output device (HDMI). "Mali" usually means the ARM closed-source graphics libraries, an alternative to mesa.

The fun part is; applications need to be compiled against mesa OR the ARM mali libs. If you start swapping the graphics subsystem without also swapping the apps, you end up with stuff that isn't compiled agains the right libs and .. it doesn't work. Panfrost is still a little/bit behind the ARM libs in "performance" but now out-performs them for "conformance" to graphics standards. The kernel drivers still need some unmerged patches to be stable, but most of the people building kernels/images have them included. Open-source is also the future, so you should middle-finger the ARM blobs at every opportunity on principle! :)
These users thanked the author chewitt for the post (total 3):
m_ueberall (Fri Apr 30, 2021 11:09 pm) • mctom (Sat May 01, 2021 12:21 am) • harddroid (Tue May 18, 2021 4:34 am)

User avatar
mctom
Posts: 442
Joined: Wed Nov 11, 2020 4:44 am
languages_spoken: english, polish
ODROIDs: N2+, Game Advance, a few XU4
Location: Gdansk, Poland
Has thanked: 49 times
Been thanked: 42 times
Contact:

Re: Lost in GPU support terminology / status

Post by mctom »

Thanks! So just to make sure we're on the same page:

Mesa is a translator from generic software calls into hardware, when supplied with some sort of "recipe" or "dictionary" submodule, a driver, for specific hardware.
Panfrost is a "module", a driver for use with Mesa, that supports Mali Bifrost GPU, among the others. It also needs a Panfrost kernel module to work properly.
DRM is the last stage that pumps spam into the video output port.

So the pipeline, as far as I understand is as follows: SuperTuxKart -> Mesa -> Panfrost -> Mali GPU -> DRM -> HDMI.

Software that is often called "Mali" is a sole equivalent of Mesa + Panfrost + DRM (?), but closed-source, so middle-finger etc. ;)
Oh, and Gallium is just one of the Mesa modules. I asked about it because it kept popping up in logs etc.

There is a bunch of good arguments favoring the open-source alternative, and being an open source contributor myself I'm all in, so let's focus on that from now on.

With Mali out of the way, here's some more questions:

1. Is it possible to have both X11 and Wayland Mesa installed and used, depending on which desktop environment I load?
2. Is this correct to assume that custom kernels delivered for this purpose have just Panfrost kernel module and DRM built in, or is there anything else going on in there?
3. Is high IQ ( :lol: ) and a modest 5 years of experience with Linux enough to try compiling the proper kernel myself, without abusing helpful people too much?
I've got a cluster of SBCs that recently had not much to do, it could be used for that purpose, I think.
4. If (!3), where do these kernels come from? I did hear about tobetter's and chewitt's work, how are they distributed? Can I apt-get one of those?
5. Are the chewitt's and tobetter's kernels going to get obsolete once mainline catches up with their custom patches and fixes?
6. What's the difference between these two? Which one should I choose?
7. How do I obtain Panfrost? Is it about building kernel with Panfrost module included, and then installing Panfrost module for Mesa?
8. What's different in building / installing Panfrost for X11 and Wayland? Or maybe it's the same thing?

Honestly, the reason why I'm not so sure about using one of the premade OSes that are advertised on this forum is that I don't quite understand how does the "custom" OS work in terms of updates. Also, I really would like to try XFCE + Wayfire, a combination which appears to be not supported at all. I'm guessing that soon I'll learn the reason for this. :)

Thanks again! I'm learning here!

Oh, and by the way I think I'm starting to understand what went wrong with my computer. After blindly compiling and installing a Mesa Panfrost driver, I may have mismatched kernel driver now. Or no kernel driver at all. :? However, Wayland works pretty well now, it's X11 that broke beyond repair.
Punk ain't no religious cult, punk means thinking for yourself!

Maintainer of PiStackMon

Post Reply

Return to “General Topics”

Who is online

Users browsing this forum: No registered users and 0 guests