They created a shim in collaboration with ChromeOS team

Mar 30, 2017 03:51 GMT  ·  By

Collabora's Mark Filion informs Softpedia today about the latest work done by various Collabora developers in collaboration with Google's ChromeOS team to enable mainline graphics on Android.

The latest blog post published by Collabora's Robert Foss reveals the fact that the two teams managed to develop a shim called drm_hwcomposer, which should enable Android's HWC (Hardware Composer) API to communicate with the graphics hardware, including Android 7.0's version 2 HWC API.

Android's SurfaceFlinger, a system service responsible for compositing all the system and application surfaces into a single buffer uses the HWC API. However, at the moment, the HWC API is not supported on the mainline Linux graphics stack. This is where the drm_hwcomposer shim developed by Collabora comes into play.

"Since the mainline kernel graphics stack doesn't offer the HWC API, drm_hwcomposer is introduced to interface with the mainline graphics stack through mesa and libdrm. Before this work drm_hwcomposer only offered the HWC1 API," said Robert Foss.

Now available in the ChromiumOS repository

When Linux kernel 4.10 was released, we told you that ten Collabora developers contributed 39 patches, including fence support that is on par to that of Android. Based on that work, the devs enabled the drm_hwcomposer shim also to support the new HWC2 API used in newer Android versions, such as Nougat.

Specifically, this allows users to boot the Android operating system on the popular DragonBoard 410c single-board computer, running the Freedreno driver. Collabora says that it should also work on any mainline kernel graphics stack enabled GPU, and they've uploaded the drm_hwcomposer work to the upstream ChromiumOS repository.

This work could not be possible without the help of Google's ChromeOS team, and among the projects that had to be modified to enable Android's HWC API to work in the mainline Linux graphics stack, we can mention Mesa, intel-gpu-tools, Linux kernel, libdrm, and, of course, drm_hwcomposer.