Hardware(Monitor + VideoCard)
查看系统当前工作的硬件列表息: lshw
查看系统当前支持的硬件列表: tree /sys/dev
查看系统当前工作的硬件列表: tree /dev
查看系统当前支持的module/driver:
lsmod
awk '{ print $1 }' /proc/modules
查看系统当前工作的module/driver: lspci -v
查看显示器信息: xrandr
查看当前支持的显卡列表和驱动列表信息:
gpu-manager
aticonfig --list-adapters
查看当前工作的显卡列表:
aticonfig --list-adapters
aticonfig --px-list-active-gpu
aticonfig --pxl
X11-X windows system
X server + X clients(xlib, x-dm/x-lm, x-wm, x-apps)
Linux/X11 显卡配置(Xorg配置/usr/share/X11/xorg.conf.d + /etc/X11/xorg.conf)
系统会默认载入内核模块和驱动,同时X服务器在通过配置文件/etc/X11/xorg.conf再次载入所列module
模块/驱动所在目录为/usr/lib/xorg/modules
Section "Module"
Load "dbe"
Load "extmod"
Load "radeon"
Load "dri"
Disable "fbdev"
EndSection
Section "Device"
Identifier "xxxx video card"
Driver "fbdev"
EndSection
Linux/X11 Video Card Drivers
apm, ati, chips, cirrus, cyrix, fbdev, glide, glint, i128, i740, imstt,
intel, mga, neomagic, nv, openchrome, r128, radeon, rendition, savage,
s3virge, siliconmotion, sis, sisusb, sunbw2, suncg14, suncg3, suncg6,
sunffb, sunleo, suntcx, tdfx, trident, tseng, vesa, vmware, voodoo, wsfb
xgi, xgixp...
开源通用驱动
xserver-xorg-video-fbdev framebuffer
xserver-xorg-video-vesa vesa
开源专用驱动
xserver-xorg-video-nouveau nvidia
xserver-xorg-video-ati ati
xserver-xorg-video-amdgpu amd/ati
xserver-xorg-video-intel intel
开源其他驱动
xserver-xorg-video-radeon amd/radeon,同ati
xserver-xorg-video-vmware vmvare vm
xserver-xorg-video-qxl kvm,qemu vm
闭源专用驱动
AMDGPU-PRO amd: ati
fglrx amd:radeon firegl
Nvidia
Linux/X11 Input Device Driver
acecad, citron, elographics, evdev, fpit, joystick, kbd, mousedrv, mutouch,
penmount, synaptics, vmmouse, void, wacom.
Linux/X11 Desktop Environment
window manager + basic applications + themes/icons/cursors/fonts + widgets/controls + xlib/sdk
Linux/X11 Desktop Environment Themes
tool: tweak-tool
data: /usr/share/themes and ~/themes
Rendering and Display
1.rendering(渲染):将UI绘制出来,以一定的格式,保存在buffer中
a)2D的点、线、面等绘图,例如,“通过一个for循环,生成一个大小为640x480、格式为RGB888、
填充颜色为红色的矩形框”,就是一个2D rendering的例子。
b)3D渲染。
c)图片、视频等多媒体解码。
d)字体渲染,例如直接从字库中抽出
2.displaying(送显):将保存在buffer中的UI数据,显示在display device上, 并以image buffer的形
式返回给应用程序
2D/X11 application Rendering
Application(app + toolkits like gtk+/qt)<---->
Service(X Server + 2D Driver)<---->
Kernel(OS<->KMS Module)<---->
Hardware(Display Buffers:Display Controllers+Display Panels)
3D/OpneGL application Rendering
Application(app + opengl)---->
Service(X Server + GLX/DRM Lib)----> or Service(OpenGL DRI Driver)---->
Kernel(OS<->DRM Modules)---->
Hardware(GPU+Graphics Memory)---->
----> Application
----> Service(X Server)
----> Hardware(Display Buffers:Display Controllers+Display Panels)
Displaying(回显)
display controllers取Display Buffers交给display panels显示
(display controllers取Display Buffers至系统内存处理)
DRI
Direct Rendering Infrastructure
DRI是一个软件架构,用来协调linux kernel,X windows系统,3D图形硬件以及OpenGL渲染引擎之间
的工作, 由一系列的软件模块组成
DRM
Direct Rendering Module, a subsystem of the Linux kernel, interfaces with the GPUs of modern
video cards. DRM exposesan API that user-space programs can use to send commands and data to the
GPU, and to perform operations such as configuring the mode setting of the display
负责管理显卡(graphics card), 包括显卡芯片(GPU)及显存(graphics memory), 同时大部分也实现
了KMS的功能
KMS
Kernel Mode Setting, a method for setting display resolution and depth in the kernel space
rather than user space
负责显示模式(display mode)的设置,包括屏幕分辨率(resolution)、颜色深的(color depth)、屏幕刷
新率(refresh rate)等
Display Output Pipeline
CRTCs: CRT controllers, scanout engine of the display controller
Connectors: physical connector (VGA, DVI, FPD-Link, HDMI, DisplayPort, S-Video...)
Encoders: the hardware block to ncode the video mode timing signal from the CRTC
using a format suitable for the intended connector
Planes: a plane is not a hardware block but a memory object containing a buffer from
which a scanout engine (a CRTC) is fed. The framebuffer is called the primary plane.