pain and redemption on the linux desktop linux graphics...

26
Pain and Redemption on the Linux Desktop Keith Packard Linux Graphics Principal Engineer [email protected] 200821

Upload: others

Post on 02-Jun-2020

14 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Pain and Redemption on the Linux DesktopKeith Packard

Linux Graphics Principal [email protected]

2008‒2‒1

Page 2: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Pain and Redemption on the Linux Desktop

What would make us happy

1 Pain and Redemption on the Linux Desktop

Page 3: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Pain and Redemption on the Linux Desktop

What would make us happyHow sad we are today

2 Pain and Redemption on the Linux Desktop

Page 4: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Pain and Redemption on the Linux Desktop

What would make us happyHow sad we are todayWhere the ice cream can be found

3 Pain and Redemption on the Linux Desktop

Page 5: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Features of a Happy Desktop

Fully composited (♥♥♥ compiz ♥♥♥)No tearingIntegrated video, 3D, 2D APIsFlicker-free bootFast user switchingHotplug everywhereLower powerFaster. Everywhere.Reducing root code

4 Pain and Redemption on the Linux Desktop

Page 6: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Where Are We NowThe long and winding road…

Page 7: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Composted Desktop

2D: Stylin'Textured video works greatOverlay video cannot work3D: not so much

6 Pain and Redemption on the Linux Desktop

Page 8: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Tear Free

3D onlyEndangers kittens

7 Pain and Redemption on the Linux Desktop

Page 9: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

API Integration

Video cannot draw to pixmapsVideo sometimes uses overlays3D cannot draw to/from pixmaps2D cannot draw to/from texturesMajor loss here.

8 Pain and Redemption on the Linux Desktop

Page 10: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Flicker-free Booting

Hardware Logo screenGrubKernel messagesKernel console font settingFlash to blackFlash to backlight offFlash to solid colorFlash to GDM login

9 Pain and Redemption on the Linux Desktop

Page 11: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Fast User Switching

VT switch is so prettyLimited to one 3D session at a time

10 Pain and Redemption on the Linux Desktop

Page 12: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Hotplug Everywhere

Video output switching works finallyCannot resize framebufferOne framebuffer per GPU. GPU limits max width.

11 Pain and Redemption on the Linux Desktop

Page 13: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Lower power

Framebuffer Compression2D spins on GPU3D melts CPU, has inefficient compilerVideo uses small piece of GPU

12 Pain and Redemption on the Linux Desktop

Page 14: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Faster

Render needs to be acceleratedVideo needs MC accel at least3D GLSL compiler is primitive

13 Pain and Redemption on the Linux Desktop

Page 15: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

X Security Issues

Entire X server runs as rootX server maps all I/O portsX server maps graphics cardNo longer directly configures PCI (yay!)

14 Pain and Redemption on the Linux Desktop

Page 16: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

How Do We Get To Oz?Follow the yellow brick road…

Page 17: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Compositing 3D Applications

Eliminate shared back/depth buffersCreate per-window back/depth buffersSwap buffers to window redirection bufferDRI2 demo already done by KRH

16 Pain and Redemption on the Linux Desktop

Page 18: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Syncronizing to Retrace

2D application/compositing mgr conventionsXvPutImage needs to use DRM buffer swapAIGLX needs to use DRM buffer swapNothing going on here

17 Pain and Redemption on the Linux Desktop

Page 19: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Integrated drawing APIs

Video: XvPutImage to pixmap. Abondon overlays3D: GLX draw to X pixmaps. X reference GLX texturesTTM-based 2D driver on a branch

18 Pain and Redemption on the Linux Desktop

Page 20: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Flicker Free Boot

DRM-based mode settinggraphical console on top of DRMhandwaving for correct default modeDRM stuff is on a branch

19 Pain and Redemption on the Linux Desktop

Page 21: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Fast user switching

Multiple DRM mastersMultiple frame buffers in DRMCode is in Fedora, not upstream yet

20 Pain and Redemption on the Linux Desktop

Page 22: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Resize framebuffer

Move to EXAFinish TTM transitionFix 3D driver to actually checkEric says this requires us to abandon existing DRI apps

21 Pain and Redemption on the Linux Desktop

Page 23: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Shatter: multiple framebuffers

Spilt screen across framebuffersMultiple clip lists for each windowMultiple back/depth-buffers for each window for 3DAjax has some ideas and a bit of code

22 Pain and Redemption on the Linux Desktop

Page 24: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Lower power

DRM-based 2D driversXvMC support extended to non-MPEG formatsJbarnes hacking on more LVDS power savingZhenyu has XvMC for 915 and 965Airlied has DRM 2D drivers.

23 Pain and Redemption on the Linux Desktop

Page 25: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Faster

Pervasive Render accelerationEric and Carl have 965 going much better

24 Pain and Redemption on the Linux Desktop

Page 26: Pain and Redemption on the Linux Desktop Linux Graphics ...mirror.linux.org.au/pub/linux.conf.au/2008/slides/165-intel-gfx.pdf · Grub Kernel messages Kernel console font setting

Security

Kernel mode settingDRM-based 2D drawingX server runs as 'nobody'Jbarnes and Airlied have demos working

25 Pain and Redemption on the Linux Desktop