Project Treble (Android O)

This is a misconception: most drivers tend to be open-source. Take a look in the Fairphone Open OS kernel repository and look at the Qualcomm components for yourself. NVIDIA Tegra has their work here, including the kernel side of the GPU driver, an old Allwinner kernel with many drivers etc. etc. The trouble exists mostly with GPU and baseband drivers, where the kernel driver is developed in lock-step with firmware and/or user-space components. Vendors don’t keep the kernel<->user-space interface (API/ABI) stable between driver releases, which causes several problems

  1. The upstream kernel folks are unhappy to accept drivers for which the API hasn’t been thought out, because they don’t want a kernel update to break a system. SoC vendors tend to not care, because android lets them control the user-space/kernel combination.
  2. For new SoC support, vendors tend to copy-paste the old driver, hack it up a bit and call it a day. There’s no thought being poured into driver architecture to support multiple revisions of hardware, incremental feature addition and so forth. This means that when you try to rebase to a new kernel, they need to update a kernel tree for every SoC rather than keep their one well-designed driver in check.
  3. The code they ship as drivers doesn’t go through the layers of independent code quality control put in place by upstream kernel maintainers. This is a source of trivial bugs and problems, especially for the low-budget SoC vendors.

Oh yes, and because the kernel internals do change, you often can’t just copy-paste these open-source drivers into a newer kernel tree and get them running, even if it remains compatible with user-space. In contrast, drivers that live upstream get updated by the person proposing the internal-kernel change, which would give SoC vendors the luxury of compatibility at a low cost.

Qualcomm is doing quite a good job at developing clean upstream open-source drivers. For most devices in the Fairphone’s SoC there already is an upstream open-source driver. This work hasn’t poured back into the Android stratosphere though. I’d like to see that happen :wink:

9 Likes