Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Driving the industry toward upstream first

Driving the industry toward upstream first

Wanting to avoid the Android experience, Google developers always aimed to make their Chrome OS Linux kernels as close to mainline as possible. However, when Chromebooks were first created, Google was left with no choice, the mainline kernel, in some subsystems, still did not have all the functionalities needed by Chromebooks. Hence, similarly to Android, Chrome OS had to develop their own out-of-tree code for the kernel and maintain that for a few different kernel versions.

Luckily, over the last few years a strong and consistent effort has been happening to bring Chromebook devices closer to mainline. It has led to significant improvements that now make it possible to run mainline on Chrome OS devices. And not only Chromebooks, as these significant strides are also improving Arm-based SOCs and other key components of the rich Chromebook hardware ecosystem. In this talk, we will look at how and why upstream support for Chromebooks improved, the current status of various models, and what we expect in the future.

Enric Balletbò i Serra, Collabora

Kernel Recipes

December 22, 2021
Tweet

More Decks by Kernel Recipes

Other Decks in Technology

Transcript

  1. 5 Working upstream is challenging . . . • Time

    and commitment • Many stakeholders • Discussions
  2. 6 . . . but has multiple benefits • Quality

    impact • Less maintenance • Less regressions
  3. 8 Chrome OS • Security is important • Chrome OS

    devices auto-update every ~6 weeks • Devices are supported for ~6 years • Lots of different devices in the field Impossible to maintain a kernel for every device
  4. 9 Chrome OS kernel • Pick LTS kernel every year

    • All devices that year use that kernel • 6–7 branches but not 50 • Switch to a newer kernel version at least once during device lifetime
  5. 10 Doug Anderson, Chrome OS developer at ELC NA 2019

    ~10 years ago there was much angst about ” Android doing all private development” Chrome OS ” tries to not replicate that”
  6. 14 Why upstream is good for Chrome OS • “Free

    code reviews ” • “Free bugfixes ” • Makes uprevs possible “ ” • Makes the system more solid • Starting the next project is easier
  7. 15 Chrome OS - UPSTREAM commits chromeos-4.4 chromeos-4.14 chromeos-4.19 0

    1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
  8. 16 Chrome OS – CHROMIUM commits chromeos-4.4 chromeos-4.14 chromeos-4.19 0

    1000 2000 3000 4000 5000 6000 7000 8000 9000 10000
  9. 17 Why Chrome OS is good for upstream • Provides

    review bandwidth upstream • Merges upstream patches and thus provides extra testing • Requires HW vendors to work with upstream
  10. 18 Contributions by vendor: Mediatek v3.10 v3.12 v3.14 v3.16 v3.18

    v4.0 v4.2 v4.4 v4.6 v4.8 v4.10 v4.12 v4.14 v4.16 v4.18 v4.20 v5.1 v5.3 0 50 100 150 200 250 300
  11. 19 Contributions by vendor: Rockchip v3.10 v3.12 v3.14 v3.16 v3.18

    v4.0 v4.2 v4.4 v4.6 v4.8 v4.10 v4.12 v4.14 v4.16 v4.18 v4.20 v5.1 v5.3 0 50 100 150 200 250 300
  12. 22 Chrome OS Embedded Controller Application Processor EC PD Accelerometer

    Barometer Light Backlight (PWM) Keyboard Lightbar RTC
  13. 23 The PAST The CrOS EC upstream effort • The

    upstream process consisted on: • Squash downstream patches • Split properly between subsystems • Test the patches with a specific device • Submit the patch to the subsystem ML
  14. 24 The PAST The CrOS EC upstream effort • The

    problems: • Driver rework • The abuse of the MFD API subsystem • Test on a specific device
  15. 25 The PRESENT The CrOS EC upstream effort • Most

    CrOS EC drivers are now upstream • New related drivers will go through the upstream first path • Some patches needs some rework
  16. 26 What’s still missing in mainline? drivers/gpu/ drivers/net/ drivers/media/ drivers/pinctrl/

    drivers/platform/ other drivers/ gpu 49.00 % net 24.30 % media 1.40 % pinctrl 1.00 % platform 0.90 % other 23.40 % 4.19 LTS / chromeos-4.19
  17. 27 What’s missing in drivers/gpu? midgard amd i915 msm gpu-other

    other drivers/gpu midgard 9.70 % amd 31.30 % i915 1.40 % msm 1.90 % gpu-other 2.10 %
  18. 28 The Open-source GPU drivers effort • ~10% of the

    differences are unlikely to be upstreamed • There were no good open-source alternative
  19. 29 The Open-source GPU drivers effort • We have now

    Panfrost • Can Chromebooks use Panfrost?