最終更新:2018-08-03 (金) 15:59:01 (2054d)
Linux/ディスプレイドライバ
資料
Linux Graphics Drivers: an Introduction (2012)
Linux Graphics Demystified (2014)
The Linux Graphics Stack
- http://blog.mecheye.net/2012/06/the-linux-graphics-stack/
- http://www.wagavulin.jp/entry/2016/07/19/195955
ドライバの種類
- We often say "the video driver", but actually for a given video card there are three different kinds of drivers:
- https://wiki.ubuntu.com/X/Architecture
DDX (X Window System)
- The 2D video "Device Dependent X" (DDX) driver is what most ordinary 2D client applications use.
- It handles selecting the video mode and resolution, provides 2d and video acceleration, and does the initial setup for DRI. Ex. xserver-xorg-video-radeon.
- xserver-xorg-video-*
Mesa (DRI)
- DRI driver is responsible for programming the 3D hardware.
- Usually DRI drivers use the Mesa state machine.
- In the DRI, the GLX client-side library loads a DRI driver, named radeon_dri.so.
- libgl1-mesa-dri
- グラフィックス・カード専用のドライバを使ってAPI をハードウェア専用のコードに翻訳
- Gallium3D
Linux/DRM (Linuxカーネル)
- DRM is the kernel-side component of the DRI that allows applications direct access to the graphics hardware.
- The DRM is responsible for security and handling resource contention. Ex. radeon.ko
- drivers/gpu/drm
DRI
- X Window Systemでグラフィックハードウェアに安全、効率的に直接アクセスすることが出来るフレームワーク
- Xサーバ/クライアントへの変更、カーネルへの変更(Linux/DRM)を含む
カーネル
Linux/DRM (Direct Rendering Manager)
- GPUにアクセスするためのインターフェース(DRM API)をアプリケーションに提供
KMS
ユーザランド
libdrm
Mesa 3D
- the only free and open-source implementation of OpenGL, OpenGL ES, OpenVG, GLX, EGL and OpenCL.
- ソフトウェアレンダリングも可能
処理の流れ
X Window System
DIX (Device Independent X)
- 共通部分
DDX (Device Dependent X) driver
- another 2D graphics device driver for X.Org Server
X Window System/アクセラレーション
2D
Glamor (2011)
- implements all 2D acceleration via OpenGL
- result: hardware independent7
SNA (2011)
- Sandy Bridge New Acceleration
UXA? (2008)
- not adopted by non-Intel drivers
EXA (2005)
- dedicated to XRender acceleration
XAA (1996)
- simple acceleration of line drawing and fill operations