本文主要是介绍display:高通display overview,希望对大家解决编程问题提供一定的参考价值,需要的开发者们随着小编来一起学习吧!
ViG pipe –For video and graphics
RGB pipe –For graphics
DMA pipe –For graphics and rotation
这些pipe会在sdm对图像做出决策后对应不同的image。
高通的display overview原文档部分贴出
什么是overlay
- Overlay(覆盖)是一种数字视频的显示技术,它允许数字信号不经过显示芯片(GPU)处理,而直接通过显存输出到显示器屏幕上。Overlay显示模式最大的用途在于优化视频播放。
-
A hardware overlay is a dedicated area of video memory that can be overlayed on the primary surface. No copy is performed when the overlay is displayed. The overlay operation is performed in hardware, without modifying the data in the primary surface. 一个hardware overlay是一个专门的视频内存区域,可以覆盖在primary surface之上。显示overlay图时不执行复制。overlay操作由硬件执行,不修改在primary surface的数据。The use of hardware overlays for video playback was common in earlier versions of Windows, because overlays are efficient for video content with a high frame rate. Starting in Windows 7, Direct3D 9 supports hardware overlays. This support is intended primarily for video playback, and differs in some respects from earlier DirectDraw APIs: 在早期的Windows版本中,使用硬件覆盖[overlay]进行视频回放是很常见的,因为覆盖[overlay]对于高帧率的视频内容非常有效。从Windows 7开始,Direct3D 9支持硬件覆盖[overlay]。这种支持主要用于视频回放,在某些方面与之前的DirectDraw api有所不同:The overlay cannot be shrunk, mirrored, or deinterlaced. Source color keys and alpha blending are not supported. Overlays can be stretched if the overlay hardware supports it. Otherwise, stretching is not supported. In practice, not all graphics drivers support stretching. Each device supports at most one overlay. Overlay is performed using a destination color key, but the Direct3D runtime automatically selects the color and draws the destination rectangle. Direct3D automatically tracks the position of the window and updates the overlay position whenever the PresentEx is called.
primary surface,在weston的合成逻辑里面,这个就是GPU需要合成的那些surface
特定名词
1.5 Acronyms, abbreviations, and terms
Table 1-1 provides definitions for the acronyms, abbreviations, and terms used in this document.
Table 1-1 Acronyms, abbreviations, and terms
Term Definition
ABGR Alpha Blue Green Red
API Application Programming Interface
APQ Application Processor Qualcomm
ARGB Alpha Red Green Blue
BG Blue Green
BGR Blue Green Red
BGRA Blue Green Red Alpha
CABL Content Adaptive Backlight
CAF C++ Actor Framework
DMA Direct Memory Access
DSI Display Serial Interface
DSP Destination Surface Processor
DSPP Destination Surface Processor Pipes
HAL Hardware Abstraction Layer
HDMI High Definition Multimedia Interface
HWC Hardware Composer
IOCTL Input/Output Control
LM Layer Mixer
LUT Look-Up Table
MDP Mobile Display Processor
MDSS Multimedia Display Sub-System
MIPI Mobile Industry Processor Interface
MSM Mobile Station Modem
PCMN Phase control M/N
RGB Red Green Blue
RGBA Red Green Blue Alpha
SMP Simple Management Protocol
SSPP Source Surface Processor Pipes
SVI Sunlight Visibility Improvement
WB Write back
WFD Wi-Fi Display
2.1 MDSS 1.0 multimedia display subsystem overview
Source Surface Processor (ViG, RGB, DMA - SSPP)
Format conversion and quality improvement for source surfaces (video, graphics, etc.)
源表面(视频、图形等)的格式转换和质量改进Layer Mixer (LM)
Blend and mix source surface together
混合和混合源表面在一起Destination Surface Processor (DSPP)
Conversion, correction, and adjustment based on panel characteristics
根据显示屏特性进行转换、校正和调整Write-Back/Rotation (WB)
Write back to memory
Perform rotation if required
写回存储器
如果需要,进行旋转Display interface
Timing generator and interface connecting the display peripheral
负责时钟信号的生成和连接显示外设的接口
SSPP,没到layer mixer之前的那一段
DSPP,layermixer之后的那一段,不包括显示接口那部分
The DSI controller is implemented to support the MIPI Alliance Standard for Display Serial
Interface (DSI).
The DSI controller includes one high-speed clock lane and one or more data lanes. Each lane
is carried on two wires and uses low-voltage differential signaling.
There are two modes of operations for DSI-compliant peripherals: Command mode and
Video mode
6.1 Android display subsystem
Android frameworks – Surface texture and SurfaceFlinger
HALs – Overlay, graphics allocation, and hardware composer
Primary panel interfaces – MIPI DSI
External display – WFD
MDP core – MDP drivers, overlay pipe management, clocks/power/performance
Post processing and color management – CABL, color conversion, etc.
6.3 MDSS driver software block diagram
mdss_fb → Top-level IOCTL/native framebuffer interface
mdss_mdp.c → MDP resources (clocks/irq/bus-bw/power)
mdss_mdp_overlay → Overlay/DMA top-level API
mdss_mdp_ctl → Controls the hardware abstraction to club the (LM + DSPP + Ping-pong +
interface)
mdss_mdp_pipe → SRC pipe related handling
mdss_mdp_intf_cmd/mdss_mdp_intf_video/mdss_mdp_intf_writeback → MDP panel
interface related handling
mdss_mdp_pp → Postprocessing related implementation
mdss_mdp_rotator → Rotator APIs (overlay_set/overlay_play interface)
mdss_mdp_pp.c → Postprocessing related material
7.1 Software directory structure (userspace)
SurfaceTexture – frameworks\native\libs\gui
SurfaceFlinger – frameworks\native\services\surfaceflinger
Overlay HAL – hardware\qcom\display\liboverlay
Graphics alloc –hardware\qcom\display\libgralloc
Hardware composer – hardware\qcom\display\libhwcomposer
7.2 Software directory structure (driver)
MDSS driver – kernel\drivers\video\msm\mdssSource surface process– mdss_mdp_overlay.c– mdss_mdp_pipe.cLayer Mixermdss_mdp_ctl.cDestination Surface Processor (DSP)mdss_mdp_intf_cmd.cmdss_mdp_intf_video.cmdss_mdp_intf_writeback.cmdss_mdp_rotatorDisplay peripheral interfacemdss_dsi.cmdss_dsi_host.c
8.1 Support for standard IOCTLs of Android
FBIOGET_VSCREENINFO – Gets variable information of framebuffer device
FBIOPUT_VSCREENINFO – Put variable information of framebuffer device
FBIOBLANK – Turns on/off framebuffer device (display on/off)
FBIOPAN_DISPLAY – Updates display/framebuffer device with new image
8.2 Qualcomm added IOCTLs
MSMFB_OVERLAY_GET – Gets overlay pipe/rotator information
MSMFB_OVERLAY_SET – Sets parameters/allocating overlay pipe/rotator
MSMFB_OVERLAY_UNSET – Closes pipe/rotator
MSMFB_OVERLAY_PLAY_ENABLE – Controls overlay update
MSMFB_OVERLAY_PLAY – Queues buffer to pipe
MSMFB_OVERLAY_PLAY_WAIT – Waits for vsync
MSMFB_CURSOR – Hardware cursor support
MSMFB_SET_LUT – Gamma look up table setup for CABL
MSMFB_HISTOGRAM – Reading histogram
MSMFB_HISTOGRAM_START – Starting Histogram
MSMFB_HISTOGRAM_STOP – Stopping Histogram
=================================================================
再来看看android这边给的display框架
整个显示系统的数据流如下图
GPU合成后数据,作为一个特殊的Layer,传给显示硬件。
HWC2是 SurfaceFlinger 用来与专门的窗口合成硬件进行通信。SurfaceFlinger 包含使用 3D 图形处理器 (GPU) 执行窗口合成任务的备用路径,但由于以下几个原因,此路径并不理想:
- 通常,GPU 未针对此用例进行过优化,因此能耗可能要大于执行合成所需的能耗。
- 每次 SurfaceFlinger 使用 GPU 进行合成时,应用都无法使用处理器进行自我渲染,因此应尽可能使用专门的硬件而不是 GPU 进行合成.
HWC专注于优化,智能地选择要发送到叠加硬件的 Surface,以最大限度减轻 GPU 的负载。另一种优化是检测屏幕是否正在更新;如果不是,则将合成委托给 OpenGL 而不是 HWC,以节省电量。当屏幕再次更新时,继续将合成分载到 HWC。
这篇关于display:高通display overview的文章就介绍到这儿,希望我们推荐的文章对编程师们有所帮助!