Running Android
- n the Mainline
Graphics Stack
Robert Foss @memcpy_io
Running Android on the Mainline Graphics Stack Robert Foss - - PowerPoint PPT Presentation
Running Android on the Mainline Graphics Stack Robert Foss @memcpy_io Agenda Android History Android on Mainline Current Status Big Picture Android History Android History Qualcomm diff with mainline, # lines 4000000
Robert Foss @memcpy_io
v3.10 v3.14 v3.18 v4.4 v4.9 500000 1000000 1500000 2000000 2500000 3000000 3500000 4000000
Qualcomm diff with mainline, # lines
– Better Graphics stack was needed
– Better Graphics stack was needed – Support for low power was lacking
– Better Graphics stack was needed – Support for low power was lacking – Support for atomic operations
– Not extensible or generic
– Not extensible or generic – Only atomic for plane updates
– Not extensible or generic – Only atomic for plane updates – Not compatible with current ABI
– Not extensible or generic – Only atomic for plane updates – Not compatible with current ABI – Not upstreamable
– Supports the ADF usecases
– Supports the ADF usecases – Uses Properties to be generic
– Supports the ADF usecases – Uses Properties to be generic – Is now replacing ADF in vendor drivers
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
The Really Good Stuff ™
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
The Really Good Stuff ™
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
Interface between applications and hardware
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
Status Bar
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
Navigation Bar Status Bar
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
Navigation Bar Status Bar Background
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
SurfaceFlinger speaks HWC to the Composer
What does the Hardware Composer do?
What does the Hardware Composer do?
Get Layers Through HWC API
What does the Hardware Composer do?
Get Layers Through HWC API Optimize Layers for Display
What does the Hardware Composer do?
Get Layers Through HWC API Optimize Layers for Display Output Layers T
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
The non-kernel part of the graphics driver
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
The non-kernel part of the graphics driver
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
The non-kernel part of the graphics driver
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
The Linux Kernel
– Android requires HWC implementation
– Android requires HWC implementation – Mesa and the Kernel does not implement it
– Android requires HWC implementation – Mesa and the Kernel does not implement it – drm_hwcomposer does!
What is the Hardware Composer?
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
Proprietary
What is the Hardware Composer?
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
Kernel SurfaceFlinger Apps HWC2 ???
What is the Hardware Composer?
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2
What is the Hardware Composer?
Kernel SurfaceFlinger Apps HWC2 drm_hwc Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2 Driver
Kernel SurfaceFlinger Apps HWC2 DRM drm_hwc libdrm mesa
What is the Hardware Composer?
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2 Kernel SurfaceFlinger Apps HWC2 drm_hwc Driver
Kernel SurfaceFlinger Apps HWC2 DRM drm_hwc libdrm mesa
What is the Hardware Composer?
Kernel Vendor driver HWC2 SurfaceFlinger Apps HWC2 Kernel SurfaceFlinger Apps HWC2 drm_hwc Driver Kernel SurfaceFlinger Apps HWC2 DRM drm_hwc mesa gralloc libdrm
HWC2
HWC2
HWC2
– Ensures ordering between operations
HWC2
– Ensures ordering between operations – Synchronizes bufer sharing
HWC2
HWC2
HWC2
Project Hosting
Project Hosting
– Thanks Google:
Project Hosting
Project Hosting
Tested platforms
– GPU: Vivante GC3000
Tested platforms
– GPU: Adreno 306
Tested platforms
– GPU: Mali G71
Under Development
Merge Android Features
Merge Android Features
Merge Android Features
Merge Android Features
5.00% 6.50% 3.50% 13.40% 11.90% 11.90% 3.30% 7.10% 5.40%
Qualcomm v4.9 Diff
arch/arm64/ arch/ drivers/clk/ drivers/gpu/ drivers/media/ drivers/platform/ drivers/power/ drivers/soc/qcom/ include/
Merge Android Features
Merge Android Features
v3.10 v3.14 v3.18 v4.4 v4.9 500000 1000000 1500000 2000000 2500000 3000000 3500000 4000000
Qualcomm diff with mainline, # lines
Merge Android Features
Push industry towards Open Source
Push industry towards Open Source
Push industry towards Open Source
Push industry towards Open Source
Push industry towards Open Source