Intel Linux Graphics
Intel Linux Graphics
Why?
Lets figure it out
Fully open-source
Fully upstream
Museum
7 LinuxCon Brazil 2011
10
11
12
13
Trivia 1
Do you know that you can discover a lot about your gfx card generation and features from your kernel?
cat /sys/kernel/debug/dri/0/i915_capabilities
14
Trivia 2
Use the Source, Luke! You can find out a lot about your graphics card by looking at the sources. In kernel/drivers/gpu/drm/i915/i915_drv.c you can find a precise mapping of different cards to their generations and other details.
15
16
The Kernel
So, we have the GPU, but how to use it? The Kernel is the root of everything on a Linux system.
Thanks, Linus!
For Intel Linux Graphics, we have many places in the Kernel The most important are:
Drivers/char/agp/intel-*.[ch] Chipset-specific support Drivers/gpu/drm DRM code Drivers/gpu/drm/i915 i915.ko kernel driver. This is what talks to the hardware.
17
Gives a /dev/dri/ interface for userspace applications to talk to different GPUs in an unified way
Power management
18
Trivia 3
Did you know that Intel Graphics cards have several power and performance-related options?
RC6 deep sleep state. Allows the card not to use any power when idle. Up to 60% battery improvements, according to Phoronix testing.
i915.i915_enable_rc6=1
FBC, Frame Buffer Compression. Allows the card to compress pixel data prior to sending it to the GPU, using less memory bandwidth.
i915.i915_enable_fbc=1
Some are already ON by default, some hopefully will be by the Kernel 3.2 release.
19 LinuxCon Brazil 2011
http://cgit.freedesktop.org/mesa/drm/
20
Trivia 4
Did you know that Intel has a set of tools and utilities for managing, monitoring, and having detailed control over the hardware?
http://cgit.freedesktop.org/xorg/app/intel-gpu-tools/
Intel_gpu_top, test_display, intel_reg_dumper, intel_error_decode, intel_gpu_time Besides intel-gpu-tools, libdrm also has some nice utilities, which are usually not that widely known. Modetest tests different video modes and outputs Kmstest tests Kernel mode setting And many others
21
Trivia 4 - examples
Intel_gpu_top
Intel_reg_dumper
22
Mesa 3D
Open-source implementation of OpenGL API. Developed since 1993 by thousands of contributors. Supports OpenGL 2.1, heading towards OpenGL 3.0 completeness by the end of the year. Supports most GPUs out there. And when it doesnt, it has software rendering. Fully open-source. Doubtless, the best source of information for those wanting to understand how OpenGL works. Has huge regressions testing suite (piglit).
24
Mesa 3D
25
Trivia 5
It is possible to record all the GL operations from Mesa, and use them for analysis later using the APITRACE (https://github.com/apitrace/apitrace) tool.
26
27
Trivia 6
Currently, the officially support Acceleration mode for the 2D rendering is UXA, developed back in 2008.
Earlier this year, Chris Wilson from Intel proposed and implemented a new backend, called SNA (Sandy Bridge New Acceleration, or Snazzy).
Improves Cairo performance by up to 15x in some cases, and 3D games performance by up to 40-60% (depending on the game). Most of the improvements come from optimized batch buffer processing, so 2D operations are carried out together with 3D ones. Previously, those were split and serialized between different rendering rings. Not yet fully stable, but can be used through the --enable-sna compile switch.
28 LinuxCon Brazil 2011
29
Cairo
(No, not the City)
Library for vector graphics-based and device-independent API. A library for 2D drawings over a multitude of backends (xlib, xlib-xrender, xcb, gl, glx, egl, glesv2; png, pdf, ps...) Used by many open-source projects: gtk, firefox, webkit, poppler, and so on. http://cairographics.org
30
Trivia 7
For performance analysis, it is possible to record all the Cairo operations during execution, and analyze them later using the cairo-perf-trace utility.
And it is also possible to compare different Cairo backends (x11, egl, drm, and many others) to see which works better for each case.
31
Wayland
A hot topic in todays Linux graphics world But what is Wayland?
New display-server protocol to allow compositing window managers to communicate between applications and video hardware. It is not a reinvention of X11. It is not X12. It is not a magic silver bullet which will automagically fix all the X11 issues and problems and provide the answer to life, the universe, and everything. (This would be 42, by the way) It is Wayland.
32
Waylands background
Started by Kristian Hgsberg (krh) as a free-time project. Why?
X Window System protocol and architecture came from 1980s, and most of their aspects are not relevant anymore. However, we just cannot drop X due to the number of applications and users out there. So, X wont go away that soon. Really, it wont.
But.
33
34
Thats it.
35
Wayland: why?
So, why Wayland instead of extending X server?
X protocol is big. X architecture is complex. Wayland is tiny. Wayland is simple.
36
Trivia 8
It is possible to mix Wayland applications which run from X Window System with the ones running from the console.
37
Wrapping up
38
39
Contributing
Writing bug reports?
Yes, there are bugs. Yes, there are different bugs. And yes, there are bugs which we are not aware of. And we wont be aware of until you tell us! http://intellinuxgraphics.org/how_to_report_bug.html
40
Contributing 2
Coding and sending patches.
It is all open source! Some Intel employees started this way (Daniel Vetter). You can help on a range of projects! Kernel patches MESA GL extensions Cairo patches Wayland development contributors are welcome!
41
Contributing 3
Testing
We have a great QA team. We have a huge community. We have amazing developers. But we dont have all the combinations of hardware, distributions, versions, and their variations.
42
Contributing 4
Use your creativity!
43
Some exciting news is on the horizon for Intel Linux Graphics. Stay tuned!
44
Legal disclaimer
INFORMATION IN THIS DOCUMENT IS PROVIDED AS IS. NO LICENSE, EXPRESS OR IMPLIED, BY ESTOPPEL OR OTHERWISE, TO ANY INTELLECTUAL PROPERTY RIGHTS IS GRANTED BY THIS DOCUMENT. INTEL ASSUMES NO LIABILITY WHATSOEVER AND INTEL DISCLAIMS ANY EXPRESS OR IMPLIED WARRANTY, RELATING TO THIS INFORMATION INCLUDING LIABILITY OR WARRANTIES RELATING TO FITNESS FOR A PARTICULAR PURPOSE, MERCHANTABILITY, OR INFRINGEMENT OF ANY PATENT, COPYRIGHT OR OTHER INTELLECTUAL PROPERTY RIGHT. Performance tests and ratings are measured using specific computer systems and/or components and reflect the approximate performance of Intel products as measured by those tests. Any difference in system hardware or software design or configuration may affect actual performance. Buyers should consult other sources of information to evaluate the performance of systems or components they are considering purchasing. For more information on performance tests and on the performance of Intel products, reference www.intel.com/software/products. Intels Roadmap Update presentations may contain forward-looking statements and projections. All statements and projections made that are not historical facts are subject to a number of risks and uncertainties, and actual results may differ substantially. Please refer to our recent Earnings Release and Form 10-Q for more information on the Risk Factors that could cause actual results to differ. Intel Core and Intel logo are trademarks of Intel Corporation in the U.S. and other countries. Other names and brands may be claimed as the property of others. Copyright 2011 Intel Corporation.
45