News for hackers. Stuff that matters.
Re:Fedora 36: A brave new (DRM/KMS only) world by PragmaticPulp on Sunday April 24, 2022 @03:27PM (#31147393)
Nothing about the Raspberry Pi’s video system is normal.

Basically, disregard everything you’ve learned about KMS from the world of Raspberry Pi. It’s only relevant to the quirkiness of the Raspberry Pi’s half-closed ecosystem.

The F in fkms stands for “fake” because they created a quirky abstraction to fake KMS compatibility. The non-fake driver has been all sorts of problematic but it’s getting better.

But none of this Raspberry Pi specific weirdness should be extrapolated to the KMS/DRM subsystem in general.

Re:Fedora 36: A brave new (DRM/KMS only) world by Syonyk on Sunday April 24, 2022 @03:53PM (#31147690)
> Nothing about the Raspberry Pi’s video system is normal.

Nothing about the Raspberry Pi at all is "normal," and it's a very useful filter for people who have read about the various deep weeds of firmware/OS development and those who have actually gotten their hands dirty on a Pi - because the first group will express admiration about the "open and well documented hardware," and the second group will laugh at the first group and start cursing the various non-and-poorly-documented nonsense that's in the Pis.

They're nice devices, and work well enough, but they are architecturally insane and unlike anything else except the previous Raspberry Pis that were hacked to to make the new ones.

The Pi1/2/3 are more or less an (undocumented) GPU with an ARM core bolted on the side. The GPU boots the system, allows the ARM core some access to the DRAM (not at the same addresses as the GPU sees things, so be sure which version of memory addresses you're looking at), and most of the hardware control is done by asking the GPU to please do this thing for you through the mailbox interfaces. In the same way that userland applications make syscalls into the kernel, the kernel running on a Pi makes syscall-like requests into the GPU to do just about anything.

The reason you see things like "All the interrupts are only ever on a single core" is because the interrupt controllers simply don't allow anything else. The Pi2 BCM2836 interrupt controller feels a little bit like an intern's project, using the BCM2835 bolted on the front as an input for the rest of the hardware. At least the Pi4 finally gets a GIC...

They're fine, sort of... as long as you're OK with the only documentation for some of the hardware being "This Linux driver works with it" and "Well, people have reverse engineered most of it." But they're absolutely insane, architecturally, they're poorly documented, and this doesn't seem widely known.

Re:Fedora 36: A brave new (DRM/KMS only) world by derefr on Sunday April 24, 2022 @04:48PM (#31148194)
Doesn’t sound too insane; sounds like an architecture designed for real-time professing, where you’ve got an “IO processor” that boots the system and handles all the interrupt-heavy work, and an “application processor” that can be solely dedicated to your workload and will only be interrupted by the IO processor if it explicitly asks to be by first making a request to it.

Very similar to previous-gen game consoles, e.g. the Wii U’s “Broadway”

Re:Fedora 36: A brave new (DRM/KMS only) world by froh on Monday April 25, 2022 @03:54AM (#31151654)
Does the pi allow to put own routines straight onto it's "IO processor"?
Re:Fedora 36: A brave new (DRM/KMS only) world by pabs3 on Sunday April 24, 2022 @09:08PM (#31149814)
Hopefully the work done by the LibreRPi folks helps things get a little less weird:

https://github.com/librerpi/ https://gwolf.org/2022/04/how-is-the-free-firmware-for-the-r...

Re:Fedora 36: A brave new (DRM/KMS only) world by Syonyk on Sunday April 24, 2022 @09:51PM (#31150058)
I'm quite familiar with Clever's work. I understand how it's put together at a pretty deep level - and it's still weird. It's not the slightest bit like anything else that is used as a general purpose computer in the layout of "how pieces talk to each other or how they interact with hardware." You can draw some parallels to the ARM Trusted Firmware interfaces if you squint hard enough, but it's still a really weird hardware layout for what it's commonly used for.
Re:Fedora 36: A brave new (DRM/KMS only) world by zozbot234 on Monday April 25, 2022 @01:06AM (#31150908)
"Non- and poorly-documented nonsense" is exceedingly common throughout the embedded hardware ecosystem. The Pi is doing well on a relative scale of freedom and openness, not an absolute one.
Re:Fedora 36: A brave new (DRM/KMS only) world by cagey on Sunday April 24, 2022 @04:23PM (#31147943)
> The Pi1/2/3 are more or less an (undocumented) GPU with an ARM core bolted on the side.

Is the Pi4 any different/better?

Re:Fedora 36: A brave new (DRM/KMS only) world by Syonyk on Sunday April 24, 2022 @06:05PM (#31148752)
I don't know the Pi4 architecture deeply enough to offer an opinion on it, sorry. Ask me in a year or two and I'll likely know it a lot better.
Re:Fedora 36: A brave new (DRM/KMS only) world by KennyBlanken on Monday April 25, 2022 @12:41PM (#31157355)
Well, they fucked up their implementation of USB-PD with a rookie-level mistake, it took ages for them to support booting off USB, the 5V rail is noisy...

Raspberry Pis were initially just a way for the Pi foundation to help Broadcom sell SoCs nobody wants anymore but they still had lots of stock/tooling for. Sort of like "hybrid" bicycles are how bike manufacturers milk more money out of hardtail (non-suspension) MTB frames.

Re:Fedora 36: A brave new (DRM/KMS only) world by monocasa on Sunday April 24, 2022 @08:13PM (#31149507)
It's almost the same overall architecture, just a lot of pieces have been upgraded to be wider and faster, and some peripherals added.
Re:Fedora 36: A brave new (DRM/KMS only) world by runlevel1 on Sunday April 24, 2022 @10:43PM (#31150305)
Are Broadcom's ARM chips that half-baked in general, or are these quirks specific to the ones used in the Raspberry Pi?
Re:Fedora 36: A brave new (DRM/KMS only) world by jancsika on Sunday April 24, 2022 @04:00PM (#31147767)
Ah, thanks for that.

> Basically, disregard everything you’ve learned about KMS from the world of Raspberry Pi. It’s only relevant to the quirkiness of the Raspberry Pi’s half-closed ecosystem.

It's funny, I just posted a comment about being afraid to dig into KMS code for fear a wizard would show up and tell me I'm looking in a wrong or irrelevant place. Luckily, your comment preempts that process.

And also luckily, I've only thrown flags at Chromium provided by other wizards so far. So my ignorance about KMS remains pure. :)

> The non-fake driver has been all sorts of problematic but it’s getting better.

So... are there like two different teams, one Pi-specific 'f', one general 'not f', racing to see whose module will become stable first?

Do both teams stream on Twitch? If not they should.