Sujet : Re: Pi4 to Pi5 migration
De : not (at) *nospam* telling.you.invalid (Computer Nerd Kev)
Groupes : comp.sys.raspberry-piDate : 11. Jun 2024, 09:41:40
Autres entêtes
Organisation : Ausics - https://newsgroups.ausics.net
Message-ID : <66680dc4@news.ausics.net>
References : 1 2 3 4 5 6 7 8 9 10
User-Agent : tin/2.0.1-20111224 ("Achenvoir") (UNIX) (Linux/2.4.31 (i686))
bp@
www.zefox.net wrote:
Computer Nerd Kev <not@telling.you.invalid> wrote:
No the code running on the GPU is all written by Broadcom and Linux
software just talks to that, so nothing needs to be compiled for
the GPU in order to use functionality that's in the stock GPU
firmware. The bottleneck at this point seems to be mainly
application developers adding support for the APIs, but this isn't
an issue with compilers, just the usual limits of time, money, and
willpower.
>
Ok, that clarifies things considerably. Is the API public, at least?
Then folks could experiment.
Broadcom's API is DispmanX, which some programs have used directly,
but libbrcmEGL is their library that presents an OpenGL interface
and is thus easier to adapt software to. Separately the Linux
kernel now has its own drivers, which are used via Mesa. I'm not
sure how the performance compares, but the Mesa drivers are the
popular ones these days.
There's more info about the various APIs indexed here:
https://forums.raspberrypi.com/viewtopic.php?t=317511If you want to do more with the GPU than using the routines
Broadcom's firmware includes, such as support en/decoding other
video codecs, or using it as a co-processor for non-graphics-related
tasks, then free compiler options become limited. That gets
complicated, but it's not much to do with PC-like GPU acceleration
in web browsers, that is already facilitated by Broadcom's
pre-compiled GPU firmware binary which runs on the GPU from
start-up (in fact it's what starts the CPU and Linux up).
Is this to say that if somebody wanted to write a cryptocurrency
miner for the Raspberry Pi VideoCore they'd need Broadcom's help?
Only that it would be easier with Broadcom's help. But there's
enough info about the QPUs available that it should be possible.
Here's an early example of the QPUs being used to run custom
routines:
http://www.aholme.co.uk/GPU_FFT/Main.htmMore recent is this OpenCL implementation which probably makes it
easier to do things like cryptocurrency mining:
https://github.com/doe300/VC4CLhttps://kenny-peng.com/2021/09/14/raspi_zero_opencl.htmlThe QPU processor cores are used along with one of two more
capable VPU processor cores in the VideoCore IV GPU for running
the stock GPU firmware. Broadcom released some documentation on
the QPUs, but information on the VPU is all reverse-engineered or
based on code written by Raspberry Pi developers who obviously have
access to the proprietary docs. So that makes writing an
open-source replacement for Broadcom's GPU firmware very difficult,
but the QPUs can be used for parallel data processing jobs like
crypto mining, and some simple things can be done with the VPUs as
well.
-- __ __#_ < |\| |< _#