05-SA8155 QNX Display框架及代码分析(1)

1. 概述

显示是非常重要的一个模块,人机交互的桥梁。那么SA8155 Hypervisor显示是如何处理的呢。对处理流程非常的好奇O(∩_∩)O哈哈~。

  • 数据流(buffer),如何刷屏
  • 同步机制(Vsync)
  • 帧率控制

TODO

2.OpenWFD

有点复杂,本文不介绍,标准基础的技术,需要专业的人去磨。如下贴两张图。

图1 

图2 

3. 显示框架 

3.1 显示框架如下图

本人理解绘制

  每个WFD Client连接一个显示输出:

        eQDIDisplayID : This is the QDI display ID associated with each port.
                        Should be of type QDI_Display_IDType
                          QDI_DISPLAY_NONE        = 0
                          QDI_DISPLAY_PRIMARY     = 1
                          QDI_DISPLAY_SECONDARY   = 2
                          QDI_DISPLAY_THIRD       = 3
                          QDI_DISPLAY_EXTERNAL    = 4
                          QDI_DISPLAY_EXTERNAL2   = 5
                          QDI_DISPLAY_EXTERNAL3   = 6
                          QDI_DISPLAY_FRAMEBUFFER = 7
  <WFDClient
     ID               = '0x7817'
     eWFDClientType   = '0x7'>
    <WFDPort ID='1'>
      <PortAttribs
        eQDIDisplayID = '3'
        uDisplayNode  = '0'
        ePortType     = '0x7660'
        eZOrderBase   = '0'
      ></PortAttribs>
      <WFDPipeline
        eQDILayerID   = '17'
        eZOrder       = '0'
      ></WFDPipeline>
    </WFDPort>
  </WFDClient>

3.2 Graphics Hypervisor 架构:

4. QNX MDSS(MultiMedia Display Sub System)及WFD相关

核心代码路基:qnx_ap/AMSS/multimedia/display

TODO

5. Bridge Driver/ 配置部分(重点)

常规座舱设计: 

开发板设计:

核心代码路径:qnx_ap/boards/display

5.1 目录架构:

├── adp_star_sda8155
│   ├── config
│   │   ├── graphics_ADP_STAR.conf
│   │   ├── graphics_ADP_STAR_FDN.conf
│   │   ├── graphics_ADP_STAR_GVM.conf
│   │   ├── Makefile
│   │   ├── qcdisplaycfg_ADP_STAR_FDN.xml
│   │   ├── qcdisplaycfg_ADP_STAR_LA_MULTI_DISP.xml  //WFDClient各个显示输出配置
│   │   └── qcdisplaycfg_ADP_STAR.xml
│   └── Makefile
├── common
│   ├── bridge_chip //涉及高可用框架
│   │   ├── client //客户端(API)
│   │   ├── drv //驱动/资源管理器
│   │   ├── Makefile
│   │   ├── plugins //串行解串芯片相关
│   │   └── server //服务端(高可用进程)
│   ├── Makefile
│   └── panels //屏接口配置,以及DSI->DP等转换芯片
│       ├── DANX7625_DP_QC_0
│       ├── DANX7625_DP_QC_1  
│       ├── DANX7625_DP_QC_2 
│       ├── DANX7625_DP_QC_3  
│       ├── DP1_COMMON_QC
│       ├── DP_BOND_COMMON_QC
│       ├── DP_COMMON_MST_QC
│       ├── DP_COMMON_QC
│       ├── DSI_COMMON_QC_0
│       ├── DSI_COMMON_QC_1
│       ├── EDP_COMMON_QC
│       ├── Makefile
│       ├── public
│       ├── SDANX7625x2_DPx2_QC_8155
└── Makefile

Demo板中硬件接口对应的屏驱动文件: 

Display interfacedriver for SA8155 Panel(Demo)
DSI-0DANX7625_DP_QC_0
DSI-1DANX7625_DP_QC_1
DP0DP_COMMON_QC
DP-MSTDP_COMMON_MST_QC
DP1N/A
eDPN/A

TODO

5.2 Bridge Driver(Server/Client)资源管理器

TODO

5.3 转换芯片(DSI->DP)

TODO

5.4 串行解串(Serializer/DeSerializer)

行业两大技术:  

  • Ti的 PDLINK3
  • 美信的 GMSL1/2

PDLINK 代表芯片:DS90UH947--DS90UH948 

                                DS90UH953--DS90UH954

                                DS90UH941--DS90UH981

GMSL2 代表芯片:Max96737--Max96752

                               Max96718--Max96717

                               Max96751--Max96718F

                               Max96745--Max96768

                               Max96789--Max96752F/Max9278

├── common
│   │   ├── plugins  //串行解串相关
│   │   │   ├── DS90UH981Q_QC_0 //TI PDLINK3 UH981
│   │   │   ├── DS90UH983Q_QC_0 //TI PDLINK3 UH983
│   │   │   └── Makefile

 

TODO

5.5 qcdisplaycfg配置

5.5.1 WFDClinet配置:

描述

<!-- WFD Configurations : Used to configure WFD driver -->
<WFDConfig>
  <!-- Client enumeration :
       ID               : Defines a unique value that resembles a client. It must have a prefix of 0x78##;
                          where ## is any unique value for each of the clients.
                          Exception: Client ID 0x78FF must be used for SCREEN.
       eWFDClientType   : Defines the Client Type associated with different clients
                            WFD_CLIENT_TYPE_CLUSTER  = 0x1
                            WFD_CLIENT_TYPE_MONITOR  = 0x2
                            WFD_CLIENT_TYPE_TELLTALE = 0x3
                            WFD_CLIENT_TYPE_RVC      = 0x4
                            WFD_CLIENT_TYPE_LA_GVM   = 0x5
                            WFD_CLIENT_TYPE_LV_GVM   = 0x6
                            WFD_CLIENT_TYPE_SPLASH   = 0x7

    Port enumeration :
      ID                     : Defines the order in which ports are enumerated
                               to client. Starts from '0'

      Port configuration     : Define attributes for each enumerated port.
                           Following attributes to be set
        eQDIDisplayID : This is the QDI display ID associated with each port.
                        Should be of type QDI_Display_IDType
                          QDI_DISPLAY_NONE        = 0
                          QDI_DISPLAY_PRIMARY     = 1
                          QDI_DISPLAY_SECONDARY   = 2
                          QDI_DISPLAY_THIRD       = 3
                          QDI_DISPLAY_EXTERNAL    = 4
                          QDI_DISPLAY_EXTERNAL2   = 5
                          QDI_DISPLAY_EXTERNAL3   = 6
                          QDI_DISPLAY_FRAMEBUFFER = 7
        ePortType     : This defines the type of the port.
                        Should be of type WFDPortType
                          WFD_PORT_TYPE_INTERNAL        = 0x7660
                          WFD_PORT_TYPE_COMPOSITE       = 0x7661
                          WFD_PORT_TYPE_SVIDEO          = 0x7662
                          WFD_PORT_TYPE_COMPONENT_YPbPr = 0x7663
                          WFD_PORT_TYPE_COMPONENT_RGB   = 0x7664
                          WFD_PORT_TYPE_COMPONENT_RGBHV = 0x7665
                          WFD_PORT_TYPE_DVI             = 0x7666
                          WFD_PORT_TYPE_HDMI            = 0x7667
                          WFD_PORT_TYPE_DISPLAYPORT     = 0x7668
                          WFD_PORT_TYPE_DSI             = 0x766A
        eZOrderBase   : Starting Z-order for layers assigned to this port for
                        this client

      Pipeline configuration : Define attributes for each enumerated pipeline
                               within a port. Following attributes to be set
        eQDILayerID : This is the QDI layer ID associated with each pipeline.
                      Should be of type QDI_Layer_IDType
                        QDI_LAYER_ID_OVERLAY1  = 5  - ViG0 (supports YUV content)
                        QDI_LAYER_ID_OVERLAY2  = 6  - ViG1 (supports YUV content)
                        QDI_LAYER_ID_OVERLAY3  = 7  - ViG2 (supports YUV content)
                        QDI_LAYER_ID_OVERLAY4  = 8  - ViG3 (supports YUV content)
                        QDI_LAYER_ID_OVERLAY5  = 9  - ViG4 (ViG0 REC1)
                        QDI_LAYER_ID_OVERLAY6  = 10 - ViG5 (ViG1 REC1)
                        QDI_LAYER_ID_OVERLAY7  = 11 - ViG6 (ViG2 REC1)
                        QDI_LAYER_ID_OVERLAY8  = 12 - ViG7 (ViG3 REC1)
                        QDI_LAYER_ID_DMA1      = 14 - DMA0
                        QDI_LAYER_ID_DMA2      = 15 - DMA1
                        QDI_LAYER_ID_DMA3      = 16 - DMA2
                        QDI_LAYER_ID_DMA4      = 17 - DMA3
                        QDI_LAYER_ID_DMA5      = 18 - DMA4 (DMA0 REC1)
                        QDI_LAYER_ID_DMA6      = 19 - DMA5 (DMA1 REC1)
                        QDI_LAYER_ID_DMA7      = 20 - DMA6 (DMA2 REC1)
                        QDI_LAYER_ID_DMA8      = 21 - DMA7 (DMA3 REC1)
        eZOrder     : Defines the Z-order of each pipeline within the port
                      Should be of type QDI_ZorderType
                        QDI_ZORDER_0  = 0  - bottom layer
                        QDI_ZORDER_1  = 1  - stage 1 layer
                        QDI_ZORDER_2  = 2  - stage 2 layer
                        QDI_ZORDER_3  = 3  - stage 3 layer
                        QDI_ZORDER_4  = 4  - stage 4 layer
                        QDI_ZORDER_5  = 5  - stage 5 layer
                        QDI_ZORDER_6  = 6  - stage 6 layer
                        QDI_ZORDER_7  = 7  - stage 7 layer
                        QDI_ZORDER_8  = 8  - stage 8 layer
                        QDI_ZORDER_9  = 9  - stage 9 layer
                        QDI_ZORDER_10 = 10 - top layer

  Restrictions:
   - Each QDI layer ID can be used inside one WFDPipeline tag only
   - WFDPipeline tags within one eQDIDisplayID tag must have unique eZOrder.
     i.e. Two WFDPipelines cannot have the same eZOrder within the same
     eQDIDisplayID
   - Pipelines that represent different rectangles of the same physical pipe
     must use the same QDI display ID.
     i.e. If DMA0 is used on eQDIDisplayID='1' then DMA4 must also be used on
     eQDIDisplayID='1', even if the pipelines are assigned to different clients
   - RECT1 pipelines cannot be assigned to displays wider than 2048 pixels
  -->

参考案例:

  <WFDClient
     ID               = '0x7812' //Client ID,每个显示ID不同(0x7800~0x78FF)
     eWFDClientType   = '0x3'>//Client Type,倒车RVC还是仪表,还是HMI
    <WFDPort ID='1'>//
      <PortAttribs
        eQDIDisplayID = '1'//显示ID,首屏,副屏等
        uDisplayNode  = '0'
        ePortType     = '0x7660'//显示接口类型,DSI/DP/eDP等
        eZOrderBase   = '10'
      ></PortAttribs>
      <WFDPipeline
        eQDILayerID   = '8'
        eZOrder       = '10'
      ></WFDPipeline>
    </WFDPort>
  </WFDClient> 

5.5.2 显示参数配置

  • 分辨率
  • 前后肩
  • 时钟
  • 其他

<Display ID='1'> //显示ID QDI_DISPLAY_PRIMARY 对应 eQDIDisplayID
  <!-- Panel Library:
    cPanelDriverRoot : Directory where the panel driver library is stored
    cPanelName       : Name of the panel driver library
  -->

  <PanelLibrary //屏驱动
    cPanelDriverRoot = '/lib64/'
    cPanelName       = 'DANX7625_DP_QC_0' //DSI->转DP芯片
  ></PanelLibrary>

  <PanelVideoTiming//时序配置
    ePixelFormatType = '3' //格式
    uVisWidth        = '1920'
    uHsyncFrontPorch = '88'
    uHsyncWidth      = '44'
    uHsyncBackPorch  = '148'
    uVisHeight       = '1080'
    uVsyncFrontPorch = '4'
    uVsyncWidth      = '5'
    uVsyncBackPorch  = '36'
    uPixelFreqInHz   = '148500000'
    bDEPolarity      = '0'
  ></PanelVideoTiming> 

  <DSIConfiguration //DSI配置
    cBridgeChipID = 'NATIVE' //是否有BridgeChip(串解器),没有就是NATIVE
    eMapSelect    = '0'
    uNumOfLanes   = '4'// DSI LANE数量
  ></DSIConfiguration>
</Display>

TODO

6.  高可用机制(重要)

高可用机制是汽车电子软件设计的可靠性、稳定性的可靠保障。汽车电子产品尤其是前装,本着可靠性,稳定性第一原则。

TODO

6.1 异常监控 

TODO

6.2 异常定位

TODO

6.3 异常恢复

TODO

6.4 热拔插支持

TODO

7. 总结

综上,对于BSP开发人员来讲,梳理后,感觉不难吧,O(∩_∩)O哈哈~。技术还是那些技术,只不过换了个平台,换了一种实现方式。

  • 18
    点赞
  • 87
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 1
    评论
QNX Display框架是一个用于管理和控制显示设备的框架。根据引用\[1\],在QNX系统中,可以通过命令"screen -c /lib64/graphics.conf"来启动screen服务,该服务通常由startupmanager启动。在源码文件filesets/launcher_scripts/disp.c中可以找到与screen服务相关的源码。引用\[2\]提到,screen服务的初始化依赖于openwfd显示框架,并且要求在wfd服务之后启动。根据引用\[3\],QNX Display框架的相关配置文件和驱动文件可以在adp_star_sda8155和common目录下找到。adp_star_sda8155目录包含了与ADP_STAR显示设备相关的配置文件和驱动文件,而common目录包含了涉及高可用框架、客户端、驱动/资源管理器、串行解串芯片相关、服务端和屏接口配置等内容。 #### 引用[.reference_title] - *1* *2* [QNX SCREEN架构基本介绍](https://blog.csdn.net/kill150/article/details/131190079)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] - *3* [05-SA8155 QNX Display框架代码分析(1)](https://blog.csdn.net/liaochaoyun/article/details/127391509)[target="_blank" data-report-click={"spm":"1018.2226.3001.9630","extra":{"utm_source":"vip_chatgpt_common_search_pc_result","utm_medium":"distribute.pc_search_result.none-task-cask-2~all~insert_cask~default-1-null.142^v91^control,239^v3^insert_chatgpt"}} ] [.reference_item] [ .reference_list ]

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

村里小码农

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值