Thanks to collaboration between Collabora and Google's Chrome OS team, Android is now able to interface with the mainline Linux graphics stack.
Android doesn't use DRM APIs for communicating with graphics hardware but rather their own Hardware Composer (HWC) API. But there is now a working "drm_hwcomposer" shim for interface with the mainline Linux graphics stack through Mesa and libdrm.
This new drm_hwcomposer shim paired with recent advancements to Linux DRM drivers around fencing support in Linux 4.10+, Android is able to run with the mainline graphics drivers with SurfaceFlinger still using the HWC API. The fence support has allowed them to now support the HWC2 API too, which is used by Android 7.0+.
This allows Android to now boot using the Freedreno driver stack, but should also work for other mainline kernel graphics stacks. The drm_hwcomposer code is staged in the Chromium OS tree.
More details on this progress for using mainline Linux drivers with Android can be found viathis blog post
by Collabora's Robert Foss.
Read the full article here by Phoronix