running android on the mainline graphics stack
play

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


  1. Running Android on the Mainline Graphics Stack Robert Foss @memcpy_io

  2. Agenda ● Android History ● Android on Mainline ● Current Status ● Big Picture

  3. Android History

  4. Android History Qualcomm diff with mainline, # lines 4000000 3500000 3000000 2500000 2000000 1500000 1000000 500000 0 v3.10 v3.14 v3.18 v4.4 v4.9

  5. Android History ● Android forked the Kernel

  6. Android History ● Android forked the Kernel – Better Graphics stack was needed

  7. Android History ● Android forked the Kernel – Better Graphics stack was needed – Support for low power was lacking

  8. Android History ● Android forked the Kernel – Better Graphics stack was needed – Support for low power was lacking – Support for atomic operations

  9. Android History ● Android forked the Kernel ● Android Atomic Display Framework created

  10. Android History ● Android forked the Kernel ● Android Atomic Display Framework created – Not extensible or generic

  11. Android History ● Android forked the Kernel ● Android Atomic Display Framework created – Not extensible or generic – Only atomic for plane updates

  12. Android History ● Android forked the Kernel ● Android Atomic Display Framework created – Not extensible or generic – Only atomic for plane updates – Not compatible with current ABI

  13. Android History ● Android forked the Kernel ● Android Atomic Display Framework created – Not extensible or generic – Only atomic for plane updates – Not compatible with current ABI – Not upstreamable

  14. Android History ● Android forked the Kernel ● Android Atomic Display Framework created ● Mainline Atomic KMS ABI introduced

  15. Android History ● Android forked the Kernel ● Android Atomic Display Framework created ● Mainline Atomic KMS ABI introduced – Supports the ADF usecases

  16. Android History ● Android forked the Kernel ● Android Atomic Display Framework created ● Mainline Atomic KMS ABI introduced – Supports the ADF usecases – Uses Properties to be generic

  17. Android History ● Android forked the Kernel ● Android Atomic Display Framework created ● Mainline Atomic KMS ABI introduced – Supports the ADF usecases – Uses Properties to be generic – Is now replacing ADF in vendor drivers

  18. Android on Mainline

  19. Android Graphics Stack Apps SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  20. Android Graphics Stack Subtitle Karla regular 28pt Apps The Really Good Stuff ™ SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  21. Android Graphics Stack Subtitle Karla regular 28pt Apps The Really Good Stuff ™ - No really, this is the whole point! SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  22. Android Graphics Stack Subtitle Karla regular 28pt Apps Interface between applications and hardware SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  23. Android Graphics Stack Subtitle Karla regular 28pt Apps SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  24. Android Graphics Stack Subtitle Karla regular Status Bar 28pt Apps SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  25. Android Graphics Stack Subtitle Karla regular Status Bar 28pt Apps Navigation Bar SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  26. Android Graphics Stack Subtitle Karla regular Status Bar 28pt Apps Navigation Bar SurfaceFlinger HWC2 HWC2 Vendor driver Kernel Background

  27. Android Graphics Stack Subtitle Karla regular 28pt Apps SurfaceFlinger speaks HWC to the Composer SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  28. Android Graphics Stack What does the Hardware Composer do?

  29. Android Graphics Stack What does the Hardware Composer do? Get Layers Through HWC API

  30. Android Graphics Stack What does the Hardware Composer do? Get Layers Optimize Through Layers for HWC API Display

  31. Android Graphics Stack What does the Hardware Composer do? Get Layers Optimize Output Through Layers for Layers T o HWC API Display Display HW

  32. Android Graphics Stack Subtitle Karla regular 28pt Apps The non-kernel part of the graphics driver SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  33. Android Graphics Stack Subtitle Karla regular 28pt Apps The non-kernel part of the graphics driver - OpenGL, Vulkan, memory allocator, etc. SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  34. Android Graphics Stack Subtitle Karla regular 28pt Apps The non-kernel part of the graphics driver - OpenGL, Vulkan, memory allocator, etc. SurfaceFlinger - Hardware Composer HWC2 HWC2 Vendor driver Kernel

  35. Android Graphics Stack Subtitle Karla regular 28pt Apps The Linux Kernel SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  36. Mainline Graphics Stack ● Mainline now has good Graphics ABI

  37. Mainline Graphics Stack ● Mainline now has good Graphics ABI ● Google Pixel C shipped using Atomic KMS

  38. Mainline Graphics Stack ● Mainline now has good Graphics ABI ● Google Pixel C shipped using Atomic KMS – Android requires HWC implementation

  39. Mainline Graphics Stack ● Mainline now has good Graphics ABI ● Google Pixel C shipped using Atomic KMS – Android requires HWC implementation – Mesa and the Kernel does not implement it

  40. Mainline Graphics Stack ● Mainline now has good Graphics ABI ● Google Pixel C shipped using Atomic KMS – Android requires HWC implementation – Mesa and the Kernel does not implement it – drm_hwcomposer does!

  41. Mainline Graphics Stack What is the Hardware Composer? Apps SurfaceFlinger HWC2 HWC2 Vendor driver Kernel

  42. Mainline Graphics Stack What is the Hardware Composer? Apps SurfaceFlinger HWC2 } HWC2 Proprietary Vendor driver Kernel

  43. Mainline Graphics Stack What is the Hardware Composer? Apps Apps SurfaceFlinger SurfaceFlinger HWC2 HWC2 HWC2 ??? Vendor driver Kernel Kernel

  44. Mainline Graphics Stack What is the Hardware Composer? Apps Apps SurfaceFlinger SurfaceFlinger HWC2 HWC2 HWC2 drm_hwc Vendor driver Driver Kernel Kernel

  45. Mainline Graphics Stack What is the Hardware Composer? Apps Apps Apps SurfaceFlinger HWC2 SurfaceFlinger SurfaceFlinger drm_hwc HWC2 HWC2 { HWC2 drm_hwc mesa libdrm Vendor driver Driver DRM Kernel Kernel Kernel

  46. Mainline Graphics Stack What is the Hardware Composer? Apps Apps Apps Apps SurfaceFlinger SurfaceFlinger HWC2 HWC2 SurfaceFlinger SurfaceFlinger drm_hwc drm_hwc HWC2 { HWC2 HWC2 drm_hwc mesa libdrm mesa libdrm gralloc Vendor driver Driver DRM DRM Kernel Kernel Kernel Kernel

  47. drm_hwcomposer HWC2

  48. drm_hwcomposer HWC2 ● Android added bufer Fence support

  49. drm_hwcomposer HWC2 ● Android added bufer Fence support – Ensures ordering between operations

  50. drm_hwcomposer HWC2 ● Android added bufer Fence support – Ensures ordering between operations – Synchronizes bufer sharing

  51. drm_hwcomposer HWC2 ● Android added bufer Fence support ● HWC version 2 is improved using Fences

  52. drm_hwcomposer HWC2 ● Android added bufer Fence support ● HWC version 2 is improved using Fences ● Mainline received Fence support

  53. drm_hwcomposer HWC2 ● Android added bufer Fence support ● HWC version 2 is improved using Fences ● Mainline received Fence support ● drm_hwcomposer implemented HWC2

  54. drm_hwcomposer Project Hosting ● Previously hosted within ChromiumOS

  55. drm_hwcomposer Project Hosting ● Previously hosted within ChromiumOS ● Now hosted on Freedesktop.org

  56. drm_hwcomposer Project Hosting ● Previously hosted within ChromiumOS ● Now hosted on Freedesktop.org – Thanks Google: ● Sean Paul ● Puneet Kumar ● Marissa Wall

  57. drm_hwcomposer Project Hosting ● Previously hosted within ChromiumOS ● Now hosted on Freedesktop.org ● GitLab instance on Freedesktop.org soon!

  58. Current Status

  59. Current status Tested platforms

  60. Current status Tested platforms ● iMX6 – GPU: Vivante GC3000

  61. Current status Tested platforms ● Dragonboard 410c – GPU: Adreno 306

  62. Current status Under Development ● HiKey 960 – GPU: Mali G71

  63. Big Picture

  64. Big Picture Merge Android Features

  65. Big Picture Merge Android Features ● A new feature is introduced in Android

  66. Big Picture Merge Android Features ● A new feature is introduced in Android ● Slowly migrated into the kernel

  67. Big Picture Merge Android Features ● A new feature is introduced in Android ● Slowly migrated into the kernel ● This does not to apply to all subsystems

  68. Big Picture Qualcomm v4.9 Diff Merge Android Features 5.00% 5.40% 6.50% 7.10% arch/arm64/ arch/ drivers/clk/ 3.50% drivers/gpu/ 3.30% drivers/media/ drivers/platform/ drivers/power/ drivers/soc/qcom/ include/ 13.40% 11.90% 11.90%

  69. Big Picture Merge Android Features ● A new feature is introduced in Android ● Slowly migrated into the kernel ● This does not to apply to all subsystems ● The dif for drivers seem fairly constant

  70. Big Picture Merge Android Features Qualcomm diff with mainline, # lines 4000000 3500000 3000000 2500000 2000000 1500000 1000000 500000 0 v3.10 v3.14 v3.18 v4.4 v4.9

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend