display:高通display overview

57 篇文章 93 订阅
9 篇文章 5 订阅

ViG     pipe –For video and graphics
RGB   pipe –For graphics
DMA   pipe –For graphics and rotation

这些pipe会在sdm对图像做出决策后对应不同的image。

高通的display overview原文档部分贴出

什么是overlay

  1. Overlay(覆盖)是一种数字视频的显示技术,它允许数字信号不经过显示芯片(GPU)处理,而直接通过显存输出到显示器屏幕上。Overlay显示模式最大的用途在于优化视频播放。
  2. 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\mdss
  Source surface process
  – mdss_mdp_overlay.c
  – mdss_mdp_pipe.c

Layer Mixer
 mdss_mdp_ctl.c

Destination Surface Processor (DSP)
 mdss_mdp_intf_cmd.c
 mdss_mdp_intf_video.c
 mdss_mdp_intf_writeback.c
 mdss_mdp_rotator

Display peripheral interface
 mdss_dsi.c
 mdss_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。

 

 
 

 

 

  • 6
    点赞
  • 67
    收藏
    觉得还不错? 一键收藏
  • 2
    评论
评论 2
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值