Linux Kernel 4.20 released, our contributions

BayLibre has continued our contribution to the Linux community as seen with this new version of Linux Kernel 4.20, released on Sunday, 23rd December 2018.  An excellent summary of this release can be found at KernelNewbies.

Here is a summary of our contributions, organized by SoC family and a summary graph of contributions by developer.

Amlogic SoC family:

  • Added AXG PDM Input support, with Devicetree Nodes
  • Added common “Canvas” provider for DRM Display and upcoming V4L2 Decoder Driver
  • Added support for Serial Number readout from sysfs
  • Various Pinctrl, DRM, Audio and clock fixes

Ti DaVinci SoC Family:

  • fixed a GPIO-related regression present since v4.19
  • Finally killed davinci_clk_reset_assert/deassert()

Misc:

  • Bartosz Golaszewski became co-maintainer of the GPIO sub-system
  • nvmem: Bartosz fixed problems with the nvmem consumer API
  • Still some cleanups from Corentin in Crypto, Network and various other sub-systems
  • Fabien Parent added support for dedicated power supply in ChromeOS’s charger driver

 

 

The Top 3 Innovative Features of the Automotive Grade Linux UCB

Last month the Automotive Grade Linux (AGL) Unified Code Base (UCB) was listed as a CES Innovation Awards Honouree. AGL is a game-changing project for the automotive industry focused on bringing a fully-open software stack to the connected car, and we’re proud to have recently been named one of the top contributing companies. CES innovation awards 2019

AGL provides an operating system, middleware and application, known as the Unified Code Base (UCB), on top of which its nearly 140 member companies can rapidly build stable products. With all of those companies contributing to the project, there are plenty of innovative software features to talk about. Here, in our opinion, are the top 3:

1. Over-the-air (OTA) Updates

Today’s cars are collections of embedded systems, each running their own software stacks. As security issues are uncovered, updates need to be rolled out across fleets of cars as quickly as possible. Plus, with product life-cycles growing longer, software needs to be supported in production for longer and that often means shipping new features to older vehicles.

OTA updates prevent the need to recall cars simply to apply software updates. The ability to apply updates with cars still on the road is a major advantage because recalls inconvenience customers and can lead to reputational damage for manufacturers. They’re also extremely expensive.

As of the Electric Eel release, the AGL UCB includes a software layer for OTA upgrades. AGL uses the OSTree and Aktualizr projects to provide atomic, full file-system upgrades with rollback capability. As OSTree uses the file system to perform updates, it minimizes the network bandwidth and data storage requirements.

2. A Wide Range of Hardware Board Support

One of AGL’s goals for the UCB is to provide a single software platform for the entire automotive industry, and the UCB provides 70-80% of a finished product out of the box. That obviously includes applications, connectivity, and graphics, but it also includes a wide range of hardware board support for vendors such as Renesas, Qualcomm Technologies, Intel, Texas Instrument, NXP and Raspberry Pi.

And developers continue to contribute new support. Initial 64-bit ARM support was merged for the Electric Eel release earlier this year with the addition of the Renesas R-CAR Generation 3. Now, Renesas is working on contributing support for the ARM big.LITTLE architecture which can provide substantial performance improvements and power savings when combined with Energy-Aware Scheduler (EAS) patch series that’s part of the Renesas BSP.

3. Automated Continuous Integration and Testing

AGL is a “code first” project which means that it favors working code over writing lengthy specifications. All of that code has to be tested, and testing quickly and thoroughly is an important part of accelerating time-to-market with AGL’s shared software platform.

AGL has built extensive infrastructure for testing code changes. Defining the architecture of that testing infrastructure is the job of the Continuous Integration and Test (CIAT) expert group who, like all AGL expert groups, meet regularly to plan and coordinate development efforts.

Within the CIAT infrastructure, open-source software projects such as Fuego, LAVA, and Kernel CI provide comprehensive testing and allow every gerrit submission to be built and smoke tested on a range of hardware. But new changes aren’t just tested in isolation: daily snapshots are built and tested to catch any integration issues as early as possible.

We’ve written previously about how BayLibre contributed changes to both Kernel CI and AGL to harness the power of scalable automated testing, and we even housed a temporary Kernel CI backend in our office while the AGL project transitioned to their own instance. To see AGL’s Kernel CI instance in action visit https://kernelci.automotivelinux.org/.

Check out the AGL Booth at CES 2019

These are just some of the technical highlights of the AGL UCB. With over 2000 commits so far in 2018, new features and bug fixes are shipped in every release. If you’re attending CES 2019, January 8-11 in Las Vegas, be sure to check out the AGL Demo Showcase (Westgate Hotel Pavilion, booth 1614) to see the UCB on display.

Hardware Accelerated Video Decoding and System Load Monitoring Demos

In the past few months, BayLibre engineers Maxime Jourdan, Alexandre Bailon and Neil Armstrong showcased two demos to illustrate some of their recent work: fully hardware-accelerated video decoding which was linked to non-intrusive System Load monitoring via JTAG.

While these two demos seem unrelated, the non-intrusive System Load monitoring via JTAG developed by Alexandre Bailon was a good way to prove that the Amlogic Video Decoder driver from Maxime Jourdan and the Amlogic Video Processing Unit graphics output work well together, and that it’s possible to monitor system load without causing video frames to be dropped.

First of all, Maxime Jourdan did a talk at Embedded Recipes 2018 in Paris about his work on developing and upstreaming the Amlogic Video Decoder driver for the Amlogic S905, S905X, S9095D and S9012 SoCs.

You can access the talk here :

And slides at: https://www.slideshare.net/ennael/embedded-recipes-2018-upstream-multimedia-on-amlogic-so-cs-from-fiction-to-reality-maxime-jourdan

Then, Alexandre Bailon and Patrick Titiano spoke about their “libSoCCA” project which gets the real-time statistics of a running system via the well-known JTAG interface without interfering with the system’s execution or requiring any modifications to the code.

The ultimate demonstration was to show, in real-time, the CPU Load and CPU Bus accesses of a Libre Computer AML-S905X-CC system (running the LibreELEC Kodi distribution) with a steady 10% load decoding 50mbps 4K H.264 and 4K H.265 10-bit video samples from the JellyFish Video Bitrate test files http://jell.yfish.us/. And all without changing a single byte of the Linux filesystem or Kodi binaries.

The most interesting fact of this demo is that Kodi doesn’t have any platform-specific code to handle Accelerated Hardware Video decoding, nor does FFmpeg which speaks to the decoder driver.

All of this is made possible thanks to the Linux DRM (Direct Rendering Manager) KMS (Kernel Mode Setting) GBM (Graphics Buffer Management) display support handled in Kodi, and the V4L2 (Video For Linux 2) Memory2Memory Hardware Decoder support from FFmpeg.

With these two graphics subsystems combined, decoded frames from the V4L2 interface can be passed to the DRM Video driver and scaled, blended and displayed. And thanks to the Linux DMA-BUF framework, none of the frames need to be copied.