9 ms·
Writing an open source GPU driver without the hardware
- wmf 5y agoAnd it's already time to start on the Mali-G610/710 for the RK3588.
- deleted 5y ago[deleted]
- panny 5y agoThis is going to be great news for new MediaTek chromebooks coming out in June with 2016 MacBook level cpu performance. rk3399 was just barely usable with a lightweight window manager. I may even pick up one of the 8192s in the meantime if a distro like arch linux arm starts supporting it. Great work from Alyssa and everyone else at Collabora.
- my123 5y agomt8192 is already buyable for me, that said mt8195 is a significant bump over that: https://www.mediatek.com/products/products/tablets/mediatek-kompanio-1380 https://www.mediatek.com/products/products/tablets/mediatek-... Hopefully that reaches retail quite soon.
- pabs3 5y agoAlyssa has also been working on Apple M1 GPU drivers too: https://rosenzweig.io/blog/asahi-gpu-part-1.html https://rosenzweig.io/blog/asahi-gpu-part-1.html https://rosenzweig.io/blog/asahi-gpu-part-2.html https://rosenzweig.io/blog/asahi-gpu-part-2.html https://rosenzweig.io/blog/asahi-gpu-part-3.html https://rosenzweig.io/blog/asahi-gpu-part-3.html https://rosenzweig.io/blog/asahi-gpu-part-4.html https://rosenzweig.io/blog/asahi-gpu-part-4.html
- panny 5y agoI'm not excited about M1 at all, tbh. I'd rather have a corebooting chromebook, even with the performance differences.
- atty 5y agoAs someone who never touches drivers or hardware directly, these sorts of stories are just wild to me, I love reading them. Congrats to Alyssa and the team; as usual, a very interesting write up and impressive work.
- GeekyBear 5y agoI really enjoy Alyssa's writing style.
- zakki 5y agoDoes it mean we can have open source nvidia gpu driver as well?
- pabs3 5y agoThe open source nouveau driver has existed for years, the problems with it are mainly caused by nvidia; not releasing signed firmware for use by nouveau, not releasing specifications etc.
- xvilka 5y agoWhat about writing a tool to extract that signed firmware from the proprietary drivers and just using it? I think with some additional reverse engineering it's probably possible to automate this, assuming NVIDIA will not start changing the drivers specifically to fight this.
- zozbot234 5y agoPeople might actually start doing similar things if nVidia starts dropping support in their proprietary driver for cards that can't otherwise be usefully supported by nouveau. At that point, it'll be easy to rely on the observation that such actions are necessary for interoperability, hence justified as fair use. Not sure if we're at that point just yet.
- nyanpasu64 5y agoNvidia cards below the 800 series are unsupported by the 495 driver, which adds support for GBM, which is necessary for most Wayland compositors to have hardware acceleration. I'd say we're basically at that point.
- zozbot234 5y agoThe actual firmware issues seem to have started with the Maxwell series, which apparently still gets proper support. Nouveau might behave badly with lower-series cards, but not due to lack of signed firmware.
- wanderer_ 5y agoLinux magic, mucking about in the kernel, M1 compatibility hacking, this writeup has got it all! Unfortunately, having read this, I feel rather stupid.
- solarkraft 5y agoI clicked the link to check out whether the article was written by Alyssa and - yep! Damn GPU wizard. Thanks a lot to Alyssa, Collabora and everyone else involved for the amazing work!
- miohtama 5y agoThis is amazing work. But what’s the motivation? I understand in 90s Linux was a niche and we had to write our own drivers. But today Linux runs on 2B devices - shouldn’t hw vendors to write their own drivers today? Why try to even support open source for non-co-operative hw companies - just stick with “good” hw companies?
- zozbot234 5y agoBy and large, HW vendors are writing hacked-together, barely-functional drivers that only work on a heavily patched "downstream" fork of a single version of the kernel code. This is for proper support that can actually be merged in the mainline kernel and maintained for the foreseeable future.
- miohtama 5y agoWhy would anyone pay for it?
- zozbot234 5y agoBecause it gets rid of an especially nasty sort of technical debt. It makes that piece of hardware useful with reliable, up-to-date versions of the kernel.
- wmf 5y agoI imagine Collabora has embedded Linux customers who prefer to use an upstream kernel rather than some kind of Android blob kludge.
- solarkraft 5y agoThere's enough of a business demand for it. What surprises me is that this leads to (presumably) smaller customers paying Collabora to do it instead of the SoC manufacturer just providing a usable driver.
- dj_mc_merlin 5y agoHow the fuck?
- asciimov 5y agoI've got a CS degree and of all the things that I studied, including OS design, nothing gives me that feeling of black magic like Kernel hacking and driver building. It's like being told your gonna learn how to draw an owl you start with some ovals and then you have a completed owl. Low level stuff has always been interesting to me, I just have no clue how one would even get started with it, or who would even pay me to work on it.
- kupopuffs 5y agoWell, continue classes and your studying. Have you implemented semaphores?
- ensan 5y agoWhat does implementing semaphores have to with this? When it comes to writing firmwares or an OS, nothing can substitute for hands-on experience with actual hardware.
- shukantpal 5y agoSemaphores are important when adding support for SMT in an OS kernel.
- user-the-name 5y agoLikewise, nails are important when building a house, but you do not learn how to build a house by studying nails.
- kupopuffs 5y agothis is a terrible analogy. I learned implementing sempahores when building a kernel. It's absolutely required to learn, a necessary step to building the "house"
- Galanwe 5y agoThe easiest way to get started is to just write a driver for whatever simple device you have. It may be easier if you do some electronics as a hobby since you can create the devices yourself with simple enough protocols. It gives you a good understanding of how the hardware works at a basic level. There are thousands of tutorials out there on how to get started writing simple drivers, as well as the excellent book "Linux device drivers". I don't do _complex_ drivers, but I've been able to write simple ones for my DIY electronic devices (keyboards, sensors, ...) and even a reverse engineered one for my BOSS RC5 guitar pedal.
- jancsika 5y agoSo fun to read! Question wrt: > If Linux doesn’t know a clock or power domain is used by the GPU, it’ll turn off the GPU inadvertently. If you know the name and ID of the GPU, is there a command from the terminal to tell Linux to turn the thing back on?
- csense 5y agoWhy is it that closed source drivers are the norm rather than the exception for hardware companies? People need to buy your hardware to use your drivers. Meaning driver development is a cost. The revenue comes from hardware sales. You're usually offering the driver to the public for free on your website anyway. Why not simply open source it? If you open source your driver, community developers could potentially give you free help -- e.g. porting to Linux, getting into the mainline kernel, fixing bugs.
- zeusk 5y agoBecause of two reasons - driver can reveal internal workings of their “proprietary” hardware - they use driver features to further differentiate their hardware product But really it’s just old tradition and paranoia.
- tlamponi 5y ago> - driver can reveal internal workings of their “proprietary” hardware Every, somewhat solid, HW engineer from the competition will be able to still grasp those inner workings from a proprietary driver and the HW itself. In the end they cannot just copy (most) things over due to facing potential legal issues, no matter if the driver is foss or proprietary. > - they use driver features to further differentiate their hardware product > But really it’s just old tradition and paranoia Agreeing here, albeit AMD and Intel seem to have (somewhat) grasped that it doesn't need to be that way.
- rock_hard 5y agoIt’s a mindset issue Sure, sometimes there is special sauce in the drivers too But mostly it’s just culture. Hardware companies also don’t like cloud software…because they think on prem is safer or whatever
- est31 5y agoAny company that is going to negotiate with a cloud company, or that is going to compete with a cloud company, should avoid using any services from that cloud company. Otherwise you risk giving them access to strategy papers, or even internal communication about strategies or negotiation limts. Cloud companies are some of the biggest customers of hardware companies like AMD. Eventually they will come to a point where they negotiate.
- kanaffa12345 5y agoif you're interested in this you might be interested in https://github.com/jbush001/NyuziProcessor https://github.com/jbush001/NyuziProcessor