News for hackers. Stuff that matters.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by flakiness on Monday June 14, 2021 @03:14AM (#27500123)
The opaque, undocumented nature of mobile GPU is outstanding (not in a good sense).

Intel CPUs are well document both by their documentation or by third party docs (like Patterson-Hennessy.) Although NVIDIA is less document than these CPUs, there are some well-written whitepapers including one for academic conferences. And these are the basis for the textbook coverage.

Compared to that, ARM or Qualcomm GPUs are totally a blackbox. I'd love to learn the specifics of mobile GPUs but there is no clue. I wonder how Collabora folks have figure out the instruction set architecture and other details.

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by KeepingItToasty on Monday June 14, 2021 @10:36AM (#27503055)
'Arm Is Now Backing Panfrost Gallium3D As Open-Source Mali Graphics Driver': https://www.phoronix.com/scan.php?page=news_item&px=Arm-Panf...

I think Arm is providing Collabora with some of the documentation they need to write the graphics driver.

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by flakiness on Monday June 14, 2021 @01:41PM (#27505562)
Wasn't aware of this, but cool move on ARM side! Thanks for the tip!

Looking at the code [1], some of files are indeed copyrighted to ARM. So they are actually providing some data. Also, the linked story mentions that qcom is also providing some support to thee opensource driver. Pardon my ignorance here.

[1] https://gitlab.freedesktop.org/mesa/mesa/-/tree/main/src/pan...

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by CameronNemo on Monday June 14, 2021 @01:19PM (#27505279)
While this is true now, Collabora devs did a lot of reverse engineering with little documentation to get a functional driver, then ARM started to pay attention. For a long time, ARM neglected efforts to develop open source drivers.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by nix23 on Monday June 14, 2021 @05:35AM (#27500792)
I really wished that Intel and AMD took a leading role in ARM, things would be so much more open in the mobile space.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by qwertox on Monday June 14, 2021 @07:06AM (#27501240)
Interesting point of view, this sounds plausible.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by pjmlp on Monday June 14, 2021 @09:47AM (#27502472)
As if they don't have their own commercial agenda, like having used PowerVR SGX545 on their CPUs.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by nix23 on Monday June 14, 2021 @03:44PM (#27507319)
Ah yeah the cheap atom-intel way...
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by CameronNemo on Monday June 14, 2021 @01:19PM (#27505287)
Intel and AMD, which have entirely closed source coprocessors on their chips.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by nix23 on Monday June 14, 2021 @03:41PM (#27507292)
But not drivers.

>entirely closed source coprocessors on their chips

Like every single Arm chip?

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by CameronNemo on Monday June 14, 2021 @03:48PM (#27507390)
What ARM chip has a coprocessor with closed source firmware/OS running on it?
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by someperson on Monday June 14, 2021 @04:40AM (#27500556)
I found this interesting YouTube talk from a few months ago titled "Open drivers for Arm GPUs" from the author of this article: https://www.youtube.com/watch?v=ZYCGVzkSIpg&list=PLZjq3una5S...

The key thing about open-source drivers is they retain compatibility with newer Linux kernels, and receive bug fixes and improvements long after the original vendor has lost interest. This reduces e-waste and allows system integrators (like Google with Chromebooks) to easily maintain their hardware far longer than Broadcom, Qualcomm and ARM itself ever would.

It's great that shipping open-source drivers over the proprietary one is fast becoming the norm not the outlier. And this change is not because of hippie free software ideals, but because of cold-hearted business reasons.

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by IntelMiner on Monday June 14, 2021 @10:25AM (#27502891)
I was surprised to find a while back that Google's now ancient "Nexus 7" tablet is allegedly able to run a mainline Linux kernel!

Unfortunately the one I built and "flashed" to it never booted and I lack the soldering skills to build the modified headphone connector/serial TTL cable thing it needs, so it sits in my drawer unused

I really wish we could get to a better upstream ecosystem with ARM devices but it just never seems to happen

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by megous on Monday June 14, 2021 @02:13PM (#27506087)
You don't need soldering skills, just by a jack with screws.

https://www.aliexpress.com/item/10000133366659.html

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by rjsw on Monday June 14, 2021 @10:30AM (#27502968)
Is the headphone/serial cable the same as those used on Pine64 products ? You may be able to buy one for fairly low cost.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by rjsw on Monday June 14, 2021 @10:28AM (#27502933)
Is Broadcom bad at this ? I thought the VC4 (RPi) DRM code was officially supported by them.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by Narishma on Monday June 14, 2021 @06:20PM (#27509071)
They (or maybe the Raspberry Pi foundation, not exactly sure which) were paying someone to work on the open source Mesa driver. Not sure if that's still the case.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by ncmncm on Monday June 14, 2021 @02:24AM (#27499831)
This is such great work! All praise to Alyssa R. (and to whoever else she credits).
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by Aissen on Monday June 14, 2021 @03:03AM (#27500067)
If I might add: kudos to Collabora, and its customers who were crazy enough to fund this.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by ece on Monday June 14, 2021 @01:17PM (#27505259)
This really makes Samsung Exynos chips with Mali GPUs appealing for Linux use, and hopefully when Exynos with RDNA2 comes out, support will be great there as well. I'm not really seeing Mali GPUs and unlocked bootloader phone options in the US (other than the PinePhone), but I'll have to look more another time. Thanks Collabora!

edit: The Dimensity SoCs also have Mali GPUs, but no US phones options as far as I can see.. https://www.anandtech.com/show/16436/mediatek-announces-dime...

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by rjsw on Monday June 14, 2021 @10:32AM (#27502998)
It would be nice if the Panfrost DRM code could be dual licenced like the Lima stuff.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by pabs3 on Monday June 14, 2021 @01:43AM (#27499645)
It feels like we now have open drivers (at some stage of the development process) for all the relevant GPUs that are sold today, are there any still missing? Even the Apple M1 GPU has reverse engineering work being done on it.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by slezyr on Monday June 14, 2021 @02:03AM (#27499735)
Yes, but not a single open-source driver can make a render with Blender 3D.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by mappu on Monday June 14, 2021 @03:06AM (#27500091)
The default renderer Eevee is a GPU-only renderer that works fine on my RX 570 with the FOSS amdgpu driver.

You can also run Cycles' CUDA backend with ROCm on amdgpu (somewhat..).

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by slezyr on Monday June 14, 2021 @11:50AM (#27504068)
> The default renderer Eevee is a GPU-only renderer that works fine on my RX 570 with the FOSS amdgpu driver.

However, you need Cycles, and not Eevee. They have very significant difference in quality.

https://all3dp.com/2/blender-render-from-eevee-simply-explai...

> You can also run Cycles' CUDA backend with ROCm on amdgpu (somewhat..).

No. No. No, you can't.

They support only some GPUs !!!AND CPUs!!!. No support for RX 5xxx-6xxx XT. They are very picky about the hardware they support.

https://github.com/ROCm/ROCm.github.io/blob/master/hardware....

https://github.com/ROCm/ROCm.github.io/blob/master/hardware....

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by zamadatix on Monday June 14, 2021 @02:49PM (#27506608)
570 is in that list so it seems they can?
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by robert_foss on Monday June 14, 2021 @02:18AM (#27499802)
I assume that's because Blender uses OpenCL?

I think a lot of progress is being made on that front.

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by Kelteseth on Monday June 14, 2021 @02:20AM (#27499818)
Well, they just removed in entirely...

https://code.blender.org/2021/04/cycles-x/

> Deprecation

As part of the new architecture, we are removing some functionality. Most notably:

OpenCL rendering kernels. The combination of the limited Cycles split kernel implementation, driver bugs, and stalled OpenCL standard has made maintenance too difficult. We can only make the kinds of bigger changes we are working on now by starting from a clean slate.

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by zozbot234 on Monday June 14, 2021 @02:48AM (#27499966)
Vulkan Compute shaders (or GLSL compute shaders, if supported by the OpenGL version) should be quite a bit more robust than OpenCL kernels. The main issue w/ shaders compared to OpenCL kernels is some missing features in the former, that will have to be optionally supported via standard extensions.

The programming model is also quite different, so code will have to be rewritten.

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by gspr on Monday June 14, 2021 @06:29AM (#27501045)
I'll piggyback on your comment for a question: I only very recently started getting into the basic of GPGPU coding. I hate vendor lock in, so I started out with OpenCL. I had a good time, but I do understand that more and more of non-CUDA world (however small that may be) is moving away from OpenCL. What are they moving to? Where should one direct one's "compute learning energy" (if one already excludes CUDA or other proprietary solutions)?
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by fsloth on Monday June 14, 2021 @08:29AM (#27501769)
Not OP, but: Unfortunately you need to pick a platform and target that. Which API you use depends on the platform. DirectX, OpenGL, Vulkan and Metal all have compute capability.

So, I think you need to abstract your code at the services level, and provide an implementations for each platform you need to support (the number may be 1 or more than 1).

I think you need to direct your "compute learning" energy at the algorithm level. Numerics and all that. The GPU API:s are just the obtuse implementation detail, but not the meat of the thing.

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by raphlinus on Monday June 14, 2021 @09:05AM (#27502039)
In addition to picking a platform, you also essentially need to pick a generation. Vulkan 1.0 for example is missing subgroups and has lots of other limitations. Vulkan 1.2 on a modern GPU with an updated driver is pretty darned powerful, with an explicit memory model, control over subgroup size, a form of pointers, and a range of scalar datatype sizes (f16 is especially useful for machine learning, commonly having 2x the throughput as f32). It is possible to have multiple versions and select at runtime, but it's an additional complexity that needs to be considered, and can constrain your architecture to accommodate the compatibility modes.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by zozbot234 on Monday June 14, 2021 @10:37AM (#27503062)
> So, I think you need to abstract your code at the services level, and provide an implementations for each platform you need to support (the number may be 1 or more than 1).

There are some cross-platform capabilities via SPIRV-Cross. The LLVM folks are working on MLIR that might provide even better features wrt. a common abstraction layer going forward.

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by gspr on Monday June 14, 2021 @09:39AM (#27502381)
Thanks! That's a bit of a sad state of things :-(
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by 0-_-0 on Monday June 14, 2021 @06:20AM (#27501000)
Do you know what the missing features are? I'm very interested, I'm rewriting code from ocl to vulkan.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by zozbot234 on Monday June 14, 2021 @06:29AM (#27501041)
See https://news.ycombinator.com/item?id=27396634 for a basic intro, but IIRC the main differences involved are (1) support for general pointers in OpenCL, whereas data indirection in compute shaders involves varying levels of messiness, and (2) OpenCL introduces support for some mathematical functions, that is not in Vulkan Compute. (However, note that OpenCL 3.0 has also made many features optional, so the basic featureset may be more comparable as a result.)
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by Doxin on Monday June 14, 2021 @02:30AM (#27499865)
Note that they are not removing GPU rendering. Just the OpenCL kernels. They'll still have NVIDIA and AMD kernels. As long as the open source drivers keep working towards supporting the required features those will eventually work on them.
Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by slezyr on Monday June 14, 2021 @02:36AM (#27499891)
> They'll still have ... and AMD kernels.

Do they? Blender uses OpenCL implementation for AMD GPUs.

Re:Open Source OpenGL ES 3.1 on Mali GPUs with Panfrost by Doxin on Monday June 14, 2021 @02:37AM (#27499899)
Oh did I misremember that? It has been a hot minute since I last owned an AMD card. Apologies for the misinformation.