O slideshow foi denunciado.
Utilizamos seu perfil e dados de atividades no LinkedIn para personalizar e exibir anúncios mais relevantes. Altere suas preferências de anúncios quando desejar.

Embedded Recipes 2019 - Making embedded graphics less special

327 visualizações

Publicada em

Traditionally graphics drivers were one of the last hold-outs of proprietary software in an embedded Linux system. This situation is changing with open-source graphics drivers showing up for almost all of the graphics acceleration peripherals on the market right now. This talk will show how open-source graphics drivers are making embedded systems less special, as well as trying to provide an overview of the Linux graphics stack, de-mystifying what is often seen as black magic GPU stuff from outside observers.

Lucas Stach

Publicada em: Software
  • Entre para ver os comentários

Embedded Recipes 2019 - Making embedded graphics less special

  1. 1. https://www.pengutronix.de Making embedded less special With open-source graphics drivers Lucas Stach – l.stach@pengutronix.de
  2. 2. 2/27 About me  Linux kernel and graphics infrastructure hacker at Pengutronix  Maintainer of the Etnaviv kernel driver  Involved with a bunch of other Linux kernel stuff
  3. 3. 3/27 Motivation  How are open-source drivers helping to make the embedded space less special?  How does it all fit together?
  4. 4. 4/27 Scope Nothing but graphics generation and output
  5. 5. 5/27 Key-/Buzzwords  OpenGL  Vulkan  KMS
  6. 6. 6/27 Key-/Buzzwords  OpenGL  Accelerated graphics API  Vulkan  Low-level accelerated graphics API  KMS  Kernel ModeSetting
  7. 7. 7/27 The situation a few years ago  Fat, but GPL compliant kernel drivers  Large, closed source binary userspace libraries  Lots of special, non-standardized interfaces
  8. 8. 8/27 Linux kernel DRM subsystem  Direct Rendering Manager  NOT Digital Rights Management  Standardized interface for display hardware (KMS)  Custom IOCTL interface for graphics accelerators
  9. 9. 9/27 Linux kernel DRM subsystem Display driver Accelerator driver KMS IOCTLs Kernel Userspace
  10. 10. 10/27 Linux kernel DRM subsystem  Why a custom interface for each GPU?  Graphics APIs are huge → not possible to implement in kernelspace  (Not so) Subtle differences in how the hardware works
  11. 11. 11/27 Mesa – swiss army knife of graphics APIs  Implementations for all kinds of graphics APIs  OpenGL  Vulkan  OpenCL  GPU hardware drivers
  12. 12. 12/27 Mesa – swiss army knife of graphics APIs Display driver Accelerator driver KMS IOCTLs Kernel Userspace Mesa OpenGLEGL
  13. 13. 13/27 Mesa – swiss army knife of graphics APIs Gallium Interface DRI2 state tracker OpenGL state tracker radeonsi iris panfrost etnaviv
  14. 14. 14/27 Mesa – swiss army knife of graphics APIs  Some numbers:  imx-drm kernel driver: ~3 kLoc  etnaviv kernel driver: ~9 kLoc  etnaviv userspace driver: ~20 kLoc
  15. 15. 15/27 Mesa – swiss army knife of graphics APIs  Some numbers:  imx-drm kernel driver: ~3 kLoc  etnaviv kernel driver: ~9 kLoc  etnaviv userspace driver: ~20 kLoc  OpenGL state tracker: ~400 kLoc
  16. 16. 16/27 Mesa – swiss army knife of graphics APIs Gallium Interface DRI2 state tracker OpenGL state tracker radeonsi iris panfrost etnaviv
  17. 17. 17/27 Mesa – swiss army knife of graphics APIs Display driver Accelerator driver KMS IOCTLs Kernel Userspace Mesa OpenGLEGL/GBM
  18. 18. 18/27 Mesa – swiss army knife of graphics APIs Display driver Accelerator driver KMS IOCTLs Kernel Userspace Mesa OpenGLEGL/GBM Qt5 EGLFS
  19. 19. 19/27 Wayland  But that‘s still special, isn‘t it?  What if I want more than a single application?
  20. 20. 20/27 Wayland Display driver Accelerator driver KMS IOCTLs Kernel Userspace Mesa OpenGLEGL/ GBM Compositor OpenGLEGL/ Wayland Qt5 Wayland Wayland
  21. 21. 21/27 Wayland  No platform specific code at the application side  Policy can be implemented in a single place  This is like your modern Linux desktop!
  22. 22. https://www.pengutronix.de Questions?
  23. 23. 23/27 Current state - Freedreno  Stable, featureful driver  Supports most Adreno GPU cores  Google investing in development
  24. 24. 24/27 Current state - Etnaviv  Stable GL ES2.0 support  Supports latest available GPU generation  Multiple commercial users investing in development
  25. 25. 25/27 Current state - Lima  Merged into upstream projects  AFAIK mostly a hobby project  Supports older generation Mali GPUs
  26. 26. 26/27 Current state - Panfrost  Fast-paced feature work  Strong developer community  Newer Mali GPUs supported
  27. 27. https://www.pengutronix.de Thanks!

×