当前位置:网站首页>我所理解的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框架图:
边栏推荐
- centos8安装mysql8.0.22教程
- Installation du tutoriel MySQL 8.0.22 par centos8
- Gee series: Unit 4 data import and export in Google Earth engine
- Basic use of form
- Fabric. JS gradient
- Fabric. JS iText set italics manually
- With an amount of $50billion, amd completed the acquisition of Xilinx
- 正则表达式总结
- Lingyunguang rushes to the scientific innovation board: the annual accounts receivable reaches 800million. Dachen and Xiaomi are shareholders
- 2022-2-14 learning xiangniuke project - section 23, section 5, development login and exit functions
猜你喜欢
数理统计与机器学习
Innovation never stops -- the innovation process of nvisual network visualization platform for Excel import
all3dp. All Arduino projects in com website (2022.7.1)
2022-2-14 learning xiangniuke project - Section 7 account setting
“簡單”的無限魔方
mysql事务和隔离级别
在线音乐播放器app
A collection of commonly used plug-ins for idea development tools
Storage of data
测试 - 用例篇
随机推荐
Brew install * failed, solution
Sliding window on the learning road
Yyds dry inventory what is test driven development
2022-2-14 learning xiangniuke project - Section 6 displays login information
正则表达式总结
软件测试 - 概念篇
Gee series: unit 8 time series analysis in Google Earth engine [time series]
Installation du tutoriel MySQL 8.0.22 par centos8
"Original, excellent and vulgar" in operation and maintenance work
“简单”的无限魔方
小程序跳装到公众号
centos8安装mysql8.0.22教程
Technologists talk about open source: This is not just using love to generate electricity
来啦~ 使用 EasyExcel 导出时进行数据转换系列新篇章!
Gee: create a new feature and set corresponding attributes
Principle and implementation of parallax effect
h5跳小程序
软件测试答疑篇
kmp思想及模板代码
Small and medium-sized projects to achieve certification and authorization of hand filter