当前位置:网站首页>我所理解的DRM显示框架
我所理解的DRM显示框架
2022-07-02 05:47:00 【Croxd】
什么是DRM:
DRM全称是DirectRenderingManager,是linux主流的一种显示框架,支持多图层合成,为用户图层提供统一的API(libdrm),来访问GPU,实现统一管理。它是为了解决多个程序对video card访问协同资源使用而产生的。DRM可以简单的分成三个模块:
- libdrm:它是一个库,向上层提供通用的 API,是对底层各种 ioctl 的接口进行封装,用来进行图像显示和图像处理。 当然用 drm 的 ioctl 或者是用 framebuffer 来操作显示图像也可以。
- GEM:内存管理,主要负责显示buffer的分配和释放、显存的共享和处理CPU、GPU内存同步
- KMS:Kernel Mode Setting,用于更新画面和参数的设置,完成显卡的配置,和对硬件gpu操作进行了一层接口的封装。可以抽象为:Framebuffer、CRTC、Plane、Encoder、Connector等模块。
DRM框架图:

KMS框架组成:
- Framebuffer:一块内存区域,用于存储显示的图像数据,驱动和应用层都可以访问,并且保存分辨率、色彩模式(yuv、rgb)等信息。
- Crtc:显示控制,如用于display timings,resolution等配置,扫描读取Framebuffer的数据,在叠加Plane的内容传输给 Encoder。在vop(Video Output Processor)里,也就是lcdc控制器。
- Plane:和Framebuffer一样是一块内存,是一块硬件图像层,一个图像层由一个或者多个plane组成。手机不同界面的叠加就是这个原理。有三种类型的plane:
- DRM_PLANE_TYPE_PRIMARY: 主要图层,显示背景或者图像内容
- DRM_PLANE_TYPE_OVERLAY: 用于显示叠加、缩放
- DRM_PLANE_TYPE_CURSOR: 用于显示鼠标
- Encoder:编码器,将接收到的数据转化成不同的信号:mipi、edp、vga等。
- Connector:具体外部接口,如edp, hdmi, mipi等,连接到物理显示输出设备,存储着输出设备的相关信息,如:EDID、视频模式等。
一般的流程是用户将显示的数据填充在Framebuffer,然后通过libdrm接口通知VOP设备,(crtc)vop驱动将 Framebuffer 和 plane 的数据叠加然后转换成标准的LCDC timing时序,然后通过 Encoder 转化成具体mipi、edp、vga等信号,到Connector显示输出。
KMS框架图:

边栏推荐
- Cambrian was reduced by Paleozoic venture capital and Zhike shengxun: a total of more than 700million cash
- Thread pool overview
- Grbl software: basic knowledge of simple explanation
- Visual studio import
- Generate QR code
- Alibaba: open source and self-developed liquid cooling data center technology
- Gee series: Unit 3 raster remote sensing image band characteristics and rendering visualization
- 460. LFU cache bidirectional linked list
- Visual Studio導入
- Fabric. JS gradient
猜你喜欢

Lingyunguang rushes to the scientific innovation board: the annual accounts receivable reaches 800million. Dachen and Xiaomi are shareholders

The Hong Kong Stock Exchange learned from US stocks and pushed spac: the follow-up of many PE companies could not hide the embarrassment of the world's worst stock market
![Gee series: Unit 5 remote sensing image preprocessing [GEE grid preprocessing]](/img/1e/cf0aa09c2fce2278386f12eae4a6cd.jpg)
Gee series: Unit 5 remote sensing image preprocessing [GEE grid preprocessing]

【pyinstaller】_ get_ sysconfigdata_ name() missing 1 required positional argument: ‘check_ exists‘

brew install * 失败,解决方法

数理统计与机器学习

idea开发工具常用的插件合集汇总

Minimum value ruler method for the length of continuous subsequences whose sum is not less than s

kmp思想及模板代码
![Gee series: unit 10 creating a graphical user interface using Google Earth engine [GUI development]](/img/78/a17034d4b77d5c0dbe741f84a8ecd7.jpg)
Gee series: unit 10 creating a graphical user interface using Google Earth engine [GUI development]
随机推荐
h5跳小程序
Practice C language advanced address book design
Centos8 installation mysql8.0.22 tutorial
Lantern Festival gift - plant vs zombie game (realized by Matlab)
Online English teaching app open source platform (customized)
brew install * 失败,解决方法
Brew install * failed, solution
Generate QR code
Gee series: Unit 5 remote sensing image preprocessing [GEE grid preprocessing]
Alibaba: open source and self-developed liquid cooling data center technology
centos8安装mysql8.0.22教程
Yyds dry inventory what is test driven development
The Hong Kong Stock Exchange learned from US stocks and pushed spac: the follow-up of many PE companies could not hide the embarrassment of the world's worst stock market
Visual Studio導入
all3dp. All Arduino projects in com website (2022.7.1)
Appnuim environment configuration and basic knowledge
How to change the IP address of computer mobile phone simulator
TypeScript的泛型和泛型约束
软件测试答疑篇
OLED12864 液晶屏