How we wound up with Linux's kernel mode setting ('KMS')
utcc.utoronto.ca
utcc.utoronto.ca
That was when the bell tolled for X11 (yes, yes, is still tolling), as there was enough OS support to kill of UMS which was really just a mechanism to keep binary drivers a safe distance from the kernel. With key components open sourced, the Linux graphics stack has been reorganising like some sort of enormous mudslide with ripples and aftershocks that keep flowing out today 15 years later. KMS was one part of that.
At some point Nvidia, the last interesting closed source holdout & throwback to a bygone era, will cave and open source their damn driver and we can close the book on one of the most interesting episodes in the history of the open source movement.
I think it's too strong to say UMS was just a mechanism to keep binary drivers out of the kernel. As far as I know, XFree86 was doing UMS from its beginnings in the early 1990s, which was well before graphics vendors were paying attention to Linux or other free Unixes. There were probably a whole host of reasons that XFree86 used UMS, including that it wanted to be portable across the free Unixes (and not need to coordinate releases with any of them).
(I'm the author of the linked-to article.)
I also think that the widespread availability of EDID was a big factor in the change: what good does it do for the kernel to switch to graphics mode if it then requires extensive configuration before it can output anything useful? There may have been earlier interests in moving more graphics output control into the kernel, but manual scanline configuration would have prohibited deployment at large-scale anyway.
Indeed, nVidia open sourced the kernel portion of their drivers a few weeks ago.
https://github.com/NVIDIA/open-gpu-kernel-modules
This is, at least for now, a somewhat limited release (only supports Turing and newer, only really tested for Tesla etc., which shows where the paint point is), and not mainlined (yet? Probably the long-term goal).
It's my understanding that this was more like an added shim layer in the kernel, and that it just communicates to the (still proprietary) code now in firmware. In other words the blob moved, but it's still there, just shimmed. Maybe somebody with more knowledge of this codebase can weigh in?
Certainly this pattern of responding to pressure to open source code by shimming the blob is quite common. It's very common in network gear that runs Linux, for example.
There's a very important difference: that firmware runs in a separate processor, which assuming a working IOMMU (and that firmware has to assume a working IOMMU, since the IOMMU is controlled by the main processor), can only influence the GPU itself. Having all the code running in the main processor be open has a large benefit, and gives a lot of control back to the user. It also allows for faster evolution of the platform (for instance: the whole EGLStream vs GBM debate would be less of an issue if the kernel code was open), and even completely replacing the main processor itself (for instance, does the proprietary NVIDIA driver have a RISC-V version of its blob?).
The userspace driver is where most of the secret magic is on any GPU, it's in charge of building the command buffers that are submitted. All the work to translate GL/Vulkan/Direct3D takes place in the userspace driver, and it's the majority of the codebase by far. The kernel driver being open-source means most of the hardware-communication stuff is upstream.
A combination of firmware and hardware interpret the command buffers and run the rest of the GPU pipeline. Firmware is used for power/clock management, managing the on-board GPU cache, queue balancing, running the front-end, and various other bits & bobs. None of this would replace any Linux or Windows driver code, it replaces dedicated hardware.
I once put this exact argument to a network vendor's rep at a conference, after they'd introduced a really thin shim like this, with some fanfare. You know what his answer was, live on stage for all to hear?
"but it's open source"
If open sourcing proprietary code is the goal, as it has always been mine, then this sort of thing is very much a step backwards.
This also opens the door for any other kernel (like the BSD's) to speak to Nvidia's firmware without needing to do any reverse engineering. As well as gets Nvidia out of the way in terms of adopting new stacks like DRM-KMS. They are just no longer a blocker on that now since that's all handled by the now open source "shim" (which is still more than a shim)
Its a step backwards too, because the firmware is now signed and therefore unmodifiable, but that was a problem before the recent code release too.
I hope so but I don't think it's likely. It's all about money, and it seems like for them there's no benefit and only downsides, such as making it easier for other companies to sue over patent infringements, make it a little easier to clone "their" technologies, having to rearrange their development processes etc. (All of these things would be good for the world, my question is why it would be good for Nvidia.) Also I don't think they really feel any pain at the moment. They've got their shim.
But perhaps they paved the way somehow for KMS to be successful.
When it comes to linux GPUs, AMDs Open Source Driver strategy paid off, because I bought mine explicitly because of their great linux support.
Basically the kernel needs KMS because it want to log things in a readable way during boot etc.
And sure you could argue it's not the kernel doing the logging but e.g. systemd, but it's also not the kernel doing the graphics but your graphics driver. It's just the kernel coordinating it.
What I don’t remember was the reception to KMS from this same group of folks. I think there were similar concerns but my memory is fuzzy here. Does anyone remember some details?
Windows NT 4.0 migrated GDI into the kernel, maybe that’s what you’re referring to.
But KMS is not a graphics engine or display driver nor “moving the graphics subsystem in the kernel.” These are not at all comparable. KMS enhances system stability by allowing better modularization.
As for “the same group of folks” there is always the know-nothing peanut gallery on sites like Phoronix and Reddit, and to a just a slightly lesser extent, here. They will say whatever dumb uninformed crap they want.
Certainly I always found it scandalous that MS did that GUI stuff in the kernel, even if the NT desktop was unusually smooth as a result. Remember this was at a time when MS was positioning NT as a server OS as well, a server OS with desktop GUI crap in the kernel.
Ah hell, I'm still disgusted by it.