Everything Great About Upstream Graphics Daniel Vetter, Intel VTT - - PowerPoint PPT Presentation

everything great
SMART_READER_LITE
LIVE PREVIEW

Everything Great About Upstream Graphics Daniel Vetter, Intel VTT - - PowerPoint PPT Presentation

Everything Great About Upstream Graphics Daniel Vetter, Intel VTT @danvet ELC Europe 2019, Lyon 10 or so years ago ... graphics execution manager kernel modesetting drm/i915, drm/radeon fbdev vs drm modesetting proudly


slide-1
SLIDE 1

Everything Great

About

Upstream Graphics

Daniel Vetter, Intel VTT @danvet ELC Europe 2019, Lyon

slide-2
SLIDE 2

10 or so years ago ...

  • graphics execution manager
  • kernel modesetting
  • drm/i915, drm/radeon
  • fbdev vs drm modesetting
  • proudly celebrating OpenGL 2
  • … and a wasteland
slide-3
SLIDE 3

today

  • 10% of the kernel + userspace
  • 54 atomic modeset drivers (and more others)
  • latest OpenGL, GLES, Vulkan
  • smallest kernel driver 246 lines
  • largest kernel driver 2.2M lines
slide-4
SLIDE 4

Case Study: ST7736R

  • hotunplug support
  • full atomic kms + fbdev + legacy kms
  • devm, w/ correct refcounting
  • dma-buf w/ dma-fence support
  • system suspend/resume missing, 2 functions to hook up
  • 243 lines total
slide-5
SLIDE 5

Awesome uapi: Atomic Modeset

  • lots of planes for SoC
  • lots of outputs for desktop
  • blending, writeback, color space conversions, …
  • gracefully handling link failures
  • content protection
  • everything else
slide-6
SLIDE 6

Helpers, Everywhere you look!

  • modular atomic modeset helpers
  • simple display pipe
  • DisplayPort, MIPI, HDMI, EDID
  • self refresh display/damage tracking
  • fbdev emulation
slide-7
SLIDE 7

Atomic: Lessons Learned

  • free standing state structures are great
  • hardware commit phase can't fail
  • modular helpers: flexibility&experimentation
  • decode/encode in the core
  • locking in the core
  • need tests and proper uapi specs
slide-8
SLIDE 8

Case Study: Self-refresh&Manual-upload

  • lots of entry points: fbdev, legacy kms, atomic modeset
  • unified update path with damage helpers
  • partial upload userspace API
  • almost unified enable/disable path with self refresh

helpers

  • handful of driver lines in total
slide-9
SLIDE 9

More Awesome Stuff

  • bridge and panel drivers, components
  • ongoing: bridge state, chaining, more flexibility
  • hot(un)plug fixing
  • more work needed around devm_
slide-10
SLIDE 10

Awesome APIs for Rendering

  • dma_buf, dma_resv, dma_fence for buffer sharing
  • ww_mutex for graph locking problems
  • drm_syncobj, better uAPi for fences
  • drm fourcc + modifiers
slide-11
SLIDE 11

Helpers, Everywhere you render!

  • gpu scheduler
  • TTM refactoring and helperification
  • VRAM helpers, SHMEM helpers, ...
  • batteries included by default
slide-12
SLIDE 12

Awesome Stuff, in Userspace!

  • gallium: GL stack to rule them all
  • gpu compiler troubles settling on NIR
  • r/e tools, better than the real docs
  • Khronos is opening up
slide-13
SLIDE 13

Userspace drivers

  • panfrost, lima, freedreno, etnaviv, vc4/v3d, nouveau
  • even Intel now on board with Iris
  • radv+ACO, one handful hackers vs. AMD
slide-14
SLIDE 14

Open Userspace: Why

  • technical necessary for review/support
  • RDMA, media, … agree
  • upstream customer value: standardization
  • vendor value-add: dual stack
slide-15
SLIDE 15

Shipping

  • dual-stack: upstream kernel w/ either open or proprietary

userspace

  • backport entire subsystem ...
  • … like Android GKI (rsn)
slide-16
SLIDE 16

Testing

  • in-kernel selftests (we need KUnit asap)
  • IGT gpu tests: cross driver userspace testsuite
  • CRC-based validation, writeback under review
  • tests require for all new uapi
slide-17
SLIDE 17

Great Community

  • gitlab everywhere, Mesa3D leading
  • (kernel stuck on infrastructure work)
  • 150 attendees at XDC
  • XDC haz (SoC!) sponsors now!
slide-18
SLIDE 18

Coming Soon

  • dma-buf heaps/ION destaging
  • userspace allocator/modifier negotiations
  • media integration, but how?
slide-19
SLIDE 19

Summary

  • 10'000x scaling: tiny embedded to BIG GPUs
  • batteries included: modular helpers for everything
  • dual-stack in userspace
  • ship/backport entire subsystem