Register a SA Forums Account here!
JOINING THE SA FORUMS WILL REMOVE THIS BIG AD, THE ANNOYING UNDERLINED ADS, AND STUPID INTERSTITIAL ADS!!!

You can: log in, read the tech support FAQ, or request your lost password. This dumb message (and those ads) will appear on every screen until you register! Get rid of this crap by registering your own SA Forums Account and joining roughly 150,000 Goons, for the one-time price of $9.95! We charge money because it costs us money per month for bills, and since we don't believe in showing ads to our users, we try to make the money back through forum registrations.
 
  • Locked thread
Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

Suspicious Dish posted:

random side-project update

android ships a software libgl called "pixelflinger": https://android.googlesource.com/platform/system/core/+/master/libpixelflinger/

i thought it died out years ago since it was really only meant as a hw bringup kind of thing, but apparently some hardware drivers still use it in a fallback path or something, because i just got a call stack on my android tablet which had pixelflinger in it

apparently it's still a thing, since Android Backstage still has talks about it in 2017.

Suspicious Dish posted:

hi i'm a gpu guy i work on the grpahics at video games and previously i worked on the mali gpu driver to try and make it not suck (i wasnt successful)

oh man, MALI. god that pile of bad decisions never fails to piss me off. quick background for people who don't work with embedded poo poo:

ARM is both an instruction set (really a range of them) and an implementation. Everybody licenses one of their cores in verilog/vhdl source form then buys a bunch of random perhepherals like upgraded memory controllers or sound codecs and mashes them together then poops the whole thing out to a fab like gloflo or samsung. this means there's a lot of very very bad ARM processors out there.

MALI came about because there were approximately 17 billion competing GPU companies selling incompatible modules to ARM. remember the good old days when games only worked on some subset of phones? Qwertycoatl ran into that because their SOCs core wasn't included in a lovely game like mali, tegra or powerVR were.

ARM bought falanx and started shipping MALI with their cores, to start some sort of standardization. Yay, great. Problem: GPUs are memory hungry, and ARM didn't bother with things like "standards for embedded graphics memory access" so every individual SOC has to roll their own memory management.

naturally the place to do this is in the graphics library, not in the graphics driver. there's no such thing as a "MALI" graphics library, because it can't do anything at all because it has no RAM. instead, there's X-brand MALI graphics library, compiled against X-brand bioniC or libC or elibC or whatever they make their BSP against, and you can never upgrade your software unless the SOC vendor deigns to support a design that's not their current one.

to compound this, nearly every lovely SOC has at least one autist on staff who thinks they know all about GPUs because they have a liquid cooled AMD Titan they use for playing shootmans and makes "improvements" to the HDL or driver layer (they are never improvements)

people keep trying to make an open-sores version (LIMA) but the completely fractured nature of the mali landscape and developer-hostile attitude of everyone involved make it super slow going.

OP which mali project were you working on?

Adbot
ADBOT LOVES YOU

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

Suspicious Dish posted:

lol, they never left, buddy. the latest disaster was samsung patching the mali driver to break it for literally everybody in the galaxy s8.
:lol:

Suspicious Dish posted:

nah, mali standardized on UMP a while back, which is a kernel driver that hands out carve-out chunks to the gpu. it's bad, but at least it's standard now.
yeah, my post was already too long. there's still a bunch of per-chip tweaks for whatever reason, which means you need the exact library for your exact SoC and gently caress you if they only build it against kitkat.

Suspicious Dish posted:

the company i was at before paid something to the tune of $200,000 to arm for the source code for their mali 450 utgard driver and my job was to literally just fix bugs and get it to work on the embedded deivce we were shipping.

also the main developer of lima literally put out a blog post to insult me, lol.
was that in the kernel driver or the libutgard-mali.so? I'm assuming the latter since the former is basically forced to be open sores because it's a kernel driver. the part that pisses me off the most is the incompatiblity is entirely due to laziness. they just have an enum for driver operations and change it at a whim on pointlevel releases. it's ridiculously stupid way of doing things. if they ever get dragged kicking & screaming into upstream that poo poo will stop instantly because nobody will let them break existing ABIs.

i guess I should find the best -400 MP4 implementation out there and replace this SOCs garbage kernel driver with theirs and use their libraries. Already had to do it once to get sound working. how garbage is this soc? it has my all-time favorite kernel commit message:

quote:

In A.D. 1582 Pope Gregory XIII found that the existing Julian calendar insufficiently represented reality, and changed the rules about calculating leap years to account for this. Similarly, in A.D. 2013 Rockchip hardware engineers found that the new Gregorian calendar still contained flaws, and that the month of November should be counted up to 31 days instead. Unfortunately it takes a long time for calendar changes to gain widespread adoption, and just like more than 300 years went by before the last Protestant nation implemented Greg's proposal, we will have to wait a while until all religions and operating system kernels acknowledge the inherent advantages of the Rockchip system. Until then we need to translate dates read from (and written to) Rockchip hardware back to the Gregorian format.

Harik
Sep 9, 2001

From the hard streets of Moscow
First dog to touch the stars


Plaster Town Cop

eschaton posted:

lol if you think ABI matters in the Linux world

they probably learned that behavior by watching Linus himself

at least good on them for not buying the "all drivers must be entirely Open Source" bullshit and just implementing a stub for their driver

p. much every driver is the same way, a kernel stub - maybe even mainlined - that basically passes through the binary-only library to the hardware. AMD open-sourced their new openGL/vulkan library version because they don't have anywhere near enough programmers to keep up and want community help.

not sure what the linus crack meant though - if he catches a whiff of the mainline kernel->userspace ABI changing in any way he drops in and releases a thunderous shitstorm down on everyone's head. only way to change something is make a v2, mark v1 as deprecated and add it to the eventual removal schedule. only way around that is if you can demonstrate that v1 hasn't actually worked in years because nobody actually cares about it, and that usually just buys you a warn_once on use and accelerated removal schedule.

outside the kernel nobody at all even tries.

libmali is tied a lot harder to specific kernel builds than anything in desktop linux is, though, due to the ioctl enum being essentially random every point release.

  • Locked thread