Kernel Recipes 2017 - Understanding the Linux kernel via ftrace - Steven Rostedt
Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning
-
Upload
anne-nicolas -
Category
Software
-
view
515 -
download
0
Transcript of Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning
![Page 1: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/1.jpg)
State of DRM(graphics driver subsystem, not the other thing)
Daniel Vetter, Intel OTCKernel Recipes 2016, Paris
![Page 2: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/2.jpg)
tl;dr;
world domination progressing according to plan
![Page 3: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/3.jpg)
kerneldoc
● much pretty, such awesome
● sphinx+rst+/scripts/kerneldoc
● https://dri.freedesktop.org/docs/drm/
![Page 4: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/4.jpg)
kerneldoc … for DRM!
● everything atomic, see later● drm_crtc.c split into ~10 files and docs added● and more
![Page 5: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/5.jpg)
dungeons&dragons
● DRI1 legacy drivers still exist● 10+ years of bad UAPI and creative root holes
● now fully hidden behind drm_legacy_*● … and core de-midlayered
![Page 6: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/6.jpg)
IGT gpu tests
● port Intel tests to be generic● starting to get used on many drivers● plus CI systems!● https://dri.freedesktop.org/docs/drm/gpu/drm-
uapi.html#validating-changes-with-igt
![Page 7: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/7.jpg)
userspace requirements
● require open source for any UAPI● https://dri.freedesktop.org/docs/drm/gpu/drm-
uapi.html#open-source-userspace-requirements
![Page 8: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/8.jpg)
atomic display driver
● check/commit semantics● flicker-free commit● because hw● because direct scanout saves power
![Page 9: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/9.jpg)
atomic advances
● 20 drivers and counting, 2-3 more per release● lots of small polish and boiler-plate removal● docs, docs, docs● modular helper library now fully proven
![Page 10: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/10.jpg)
one atomic to rule them all
● drm_hwcomposer, for Android● CrOS&Ozone, using wayland● all the waylands
![Page 11: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/11.jpg)
atomic future
● trouble with some legacy use-cases, cursors● buffer allocation needs more UAPI● benchmark mode
![Page 12: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/12.jpg)
generic fbdev defio
● manual upload display to save memory bw● FBDEV now remapped to KMS● … dirty rectangle still missing for flips
![Page 13: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/13.jpg)
simple display pipeline helper
● simple pipe + 1 connectors● based on atomic, without the complexity● DRM now (strictly) better than FBDEV
![Page 14: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/14.jpg)
fences
● struct completion, but for DMA
● implicit: kernel takes care● explicit: userspace passes fences around
● kernel-internally a struct fence
![Page 15: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/15.jpg)
implicit fencing
● reservation_object on dma_buf● TTM (amd/nouveau) always supported it● support finally rolling out everywhere else● for Linux desktop (both X&Wayland)
![Page 16: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/16.jpg)
explicit fencing
● struct sync_file, exported as an FD
● more control for userspace● less complexity in (vendor tree) drivers needed● for Android
![Page 17: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/17.jpg)
explicit fencing for rendering
● userspace fences fully destaged in 4.9● EGL_ANDROID_native_sync for
msm/freedreno in 4.9 and mesa-next● interaction with implicit fencing is tricky
![Page 18: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/18.jpg)
explicit fencing for atomic KMS
● Google made HWC2 to suit upstream● blocked by embargo, hopefully 4.10● drm_hwcomposer has support● for details attend LPC
![Page 19: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/19.jpg)
rsn Android on upstream*
* without a joke** of a graphics stack
** I'm biased ;-)
![Page 20: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/20.jpg)
rendering?
● 2+1 vendor supported open drivers● 1+1+1 reverse-engineered drivers● plus virtual ones● still dire :(
![Page 21: Kernel Recipes 2016 - Upstream Kernel Graphics is (Finally) Winning](https://reader031.fdocuments.us/reader031/viewer/2022022203/5872de491a28abfa548b4601/html5/thumbnails/21.jpg)
summary
● atomic rules them all● docs, tests and lots of cleanup● closed all major gaps for writing display drivers● cross-driver fence for everyone● even rendering shows some (slow) progress