高通android display subsystem

    xiaoxiao2021-03-25  90

    MDSS:Multimedia Display Sub-system

    Display driver包括:

    SurfaceFlinger,Hardware Composer(HWC),以及overlayFramebufferMIPI DSI驱动

    系统架构

    MDSS 1.0显示子系统

    Soure Surface Processor(ViG, RGB,DMA-SSPA)---格式转换和质量提升(video, graphics 等)Layer Mixer(LM)--混合外表面Destination Surface Processor(DSPP)---根据面板特性进行转换,校正和调整Write-Back/Rotation(WB)---回写到内存,如果需要还可以旋转Display interface--时序生成器,和外部显示设备对接

    图:显示外设

    图:MIPI DSI

    图:DSI接口

    DSI控制器支持MIPI联盟DSI规范DSI控制器包括一个高速时钟lane,一或者多个数据lane,每lane使用低压差分信号线实现。两种模式控制DSI外设:command和video模式

    软件架构

    android显示子系统

    android framework--表面纹理和SurfaceFlingerHALs--overlay,graphic alloction,以及hardware composerPrimary panel interface--MIPI DSIExternal display--WFDMDP core--MDP drivers,overlay pipe management,clocks/power/performancePost processing和color management--CABL, color conversion等

    图:3D和2D显示引擎

    MDSS软件驱动

    mdss_fb.c 顶层IOCTL/native framebuffer接口mdss_mdp.c --MDP(Mobile Development Platforms)资源,包括时钟/中断/bus-bw/powermdss_mdp_overlay.c--Overlay/DMA 顶层APImdss_mdp_ctl.c--将(LM,DSPP,Ping-pong,interface)硬件集群mdss_mdp_pipe.c--SRC pipe相关处理 mdss_mdp_intf_cmd.c/mdss_mdp_intf_video.c/mdss_mdp_intf_writeback.c--MDP面板接口处理mdss_mdp_pp.c--后处理相关实现mdss_mdp_rotator.c--旋转API(overlay_set, overlay_playinterface)

    图:MDSS驱动架构

    源码布局

    软件目录架构--用户空间

    SurfaceTexture--frameworks/native/libs/guiSurfaceFlinger--frameworks/native/services/surfaceflingerOverlay HAL--hardware/qcom/display/liboverlayGraphics alloc--hardware/qcom/display/libgrallocHardware composer--hardware/qcom/display/libwcomposer

    软件目录架构--驱动

    MDSS驱动--kernel/drivers/video/msm/mdss

    源表面处理,mdss_mdp_overlay.c,mdss_mdp_pipe.c。

    Layer Mixer--mdss_mdp_ctl.cDestination 表面处理(DSP)

    mdss_mdp_intf_cmd.c,mdss_mdp_intf_video.c,mdss_mdp_intf_writeback.c,mdss_mdp_rotator.c

    显示外设接口

    mdss_dsi.c,mdss_dsi_host.c,

    软件接口架构-驱动和用户空间

    标准安卓架构

    FBIOGET_VSCREENINFO-获取framebuffer设备信息FBIOPUT_VSCREENINFO-写入framebuffer设备信息FBIOBLANK-打开关闭framebuffer(对应显示on/of)FBIOPAN_DISPLAY--用新图片跟新framebuffer

    高通增加的命令

    MSMFB_OVERLAY_GET--获得overlay pipe/rotator信息MSMFB_OVERLAY_SET--设置overlay pipe/rotator参数MSMFB_OVERLAY_UNSET--关闭pipe/rotatorMSMFB_OVERLAY_PLAY_ENABLE--使能overlay跟新MSMFB_OVERLAY_PLAY--将buffer排队到pipe上MSMFB_OVERLAY_PLAY_WAIT--等待vsync信号MSMFB_CURSOR--硬件cursor支持MSMFB_SET_LUT--CABL的伽马表设置MSMFB_HISTOGRAM--获取直方图MSMFB_HISTOGRAM_START--开始直方图MSMFB_HISTOGRAM_STOP--停止直方图

    一个bug

     kgsl workqueue of WQ_UNBOUND,surface flinger等待超时,进入dump

    +++ b/drivers/gpu/msm/kgsl.c @@ -4394,7 +4394,9 @@ int kgsl_device_platform_probe(struct kgsl_device *device) PM_QOS_DEFAULT_VALUE); - device->events_wq = create_workqueue("kgsl-events"); + device->events_wq = alloc_workqueue("kgsl-events", + WQ_UNBOUND | WQ_MEM_RECLAIM, 1); + //device->events_wq = create_workqueue("kgsl-events");

    转载请注明原文地址: https://ju.6miu.com/read-18287.html

    最新回复(0)