Embrace the Atomic Display Age LCA 2016, Geelong Daniel Vetter 1 - - PowerPoint PPT Presentation

embrace the atomic display age
SMART_READER_LITE
LIVE PREVIEW

Embrace the Atomic Display Age LCA 2016, Geelong Daniel Vetter 1 - - PowerPoint PPT Presentation

Embrace the Atomic Display Age LCA 2016, Geelong Daniel Vetter 1 Accidents of history userspace mode setting in X, maybe FBDEV just a framebuffer combined with unsuitable accelaration hence DRM 2 7 or 8 years


slide-1
SLIDE 1

1

Embrace the Atomic Display Age

LCA 2016, Geelong Daniel Vetter

slide-2
SLIDE 2

2

Accidents of history

  • userspace mode setting in X, maybe
  • FBDEV just a framebuffer …
  • … combined with unsuitable accelaration
  • hence DRM
slide-3
SLIDE 3

3

7 or 8 years ago … KMS

  • real kernel driver
  • in-kernel memory manager for GPU buffers
  • supporting multiple screens
  • desktop compositing using GL
slide-4
SLIDE 4

4

Problem No. 1

  • 3 displays, only 2 clock generators
  • intermediate state could have 3 different clocks
  • … and your compositor dies
  • avoidable, but atomic switching is better
slide-5
SLIDE 5

5

Why Suddenly Overlays Again?

  • 1080p YUV: ~4.1 MB, 4k RBG: ~33MB per frame
  • 4.1MB + 33MB + 33MB with compositing per frame
  • 4.1MB with overlay
  • … or split screen, UI overlay, …
  • ~ 4.2 GB/s at 60fps for compositing
slide-6
SLIDE 6

6

It's all About Mobile!

  • can't draw&composit entire screen
  • video, because more idle = less power
  • atomic required to avoid tearing
slide-7
SLIDE 7

7

3 years ago … Android's ADF

  • replaced FBDEV + custom hacks horror show
  • only one update queue
  • kept old mistakes like DPMS
  • resurrected old mistakes like midlayers
slide-8
SLIDE 8

8

ADF? Not for Upstream

  • not extensible, not generic
  • only atomic for plane updates
  • complete new subsystem incompatible with existing drivers
  • … and incompatible with existing userspace
slide-9
SLIDE 9

9

Prep Work: Universal Planes

  • merged 2 years ago
  • cursor, primary, overlay planes ...
  • it's all the same
slide-10
SLIDE 10

10

Upstream Atomic ABI

  • partial updates, for backwards compatibility
  • properties as generic transport
  • standardized sets of properties as extensions
  • simple value, object, blob properties
slide-11
SLIDE 11

11

More Upstream Atomic ABI

  • cursor hack to appease X
  • TEST_ONLY for discovery of constraints
  • ALLOW_MODESET flag
slide-12
SLIDE 12

12

Internal Driver Interface

  • standardized properties decoded in core
  • state duplication for partial updates
  • subclassable for private properties
  • check/commit split
slide-13
SLIDE 13

13

Concurrent Updates

  • per-object state structures
  • per-object locks
  • plus magic wait/wound locking

https://lwn.net/Articles/548909/

slide-14
SLIDE 14

14

Say No to Midlayers

  • completely new atomic helper library
  • much more modular
  • strict state transition guarantees for driver hooks
  • implements all legacy IOCTL
  • intermediate plane helpers for smooth conversion of

existing drivers

slide-15
SLIDE 15

15

Just in the Last Few Months

  • suspend/resume helpers
  • atomic fbdev emulation
  • better support for runtime PM in general
  • thousands lines of documentation
slide-16
SLIDE 16

16

Missing & Wanted

  • generic async commit
  • explicit fencing support
  • faster than vblank
  • testsuite, based on i-g-t
  • much extensions: color management, blending, ...
slide-17
SLIDE 17

17

Documentation

  • conversion HOWTO for legacy drivers:

http://blog.ffwll.ch/2014/11/atomic-modeset-support-for-kms-drivers.html

  • design overview on LWN: https://lwn.net/Articles/653071/

https://lwn.net/Articles/653466/

  • DRM DocBook: https://01.org/linuxgraphics/gfx-docs/drm/
  • presentation for driver writers:

http://blog.ffwll.ch/2015/09/xdc-2015-atomic-modesetting-for-drivers.html

slide-18
SLIDE 18

18

One Atomic Display API

DRM atomic core&helper libraries developed by: Ville Syrjälä, Daniel Vetter, Maarten Lankhorst, Ander Conselvan de Oliveira (all Intel), Rob Clark (Redhat), Laurent Pinchart (ideasonboard), Daniel Stone, Gustavo Padovan (all Collabora), Thierry Reding (Nvidia), Sean Paul (Google), Inki Dae (Samsung), ...

slide-19
SLIDE 19

19

To Rule them All

  • drm_hwcomposer for Android
  • Ozone on CrOS
  • weston/wayland
  • xf86-video-modesetting for X
  • FBDEV emulation
slide-20
SLIDE 20

20

And Forever Bind Them

i915 (Intel), tegra (Nvidia), msm (Qualcomm), exynos (Samsung), omap (TI), rockchip, vc4 (Broadcomm), virtio (QEMU), rcar-du (Renesas), fsl-du (Freescale), atmel, ... And more to come with every release!