display的一些学习记录

发布于:2025-04-18 ⋅ 阅读:(27) ⋅ 点赞:(0)

收集的SDM的log:

01-01 00:00:15.311   933   933 I SDM     : Creating Display HW Composer HAL
01-01 00:00:15.311   933   933 I SDM     : Scheduler priority settings completed
01-01 00:00:15.311   933   933 I SDM     : Configuring RPC threadpool
01-01 00:00:15.311   933   933 I SDM     : Configuring RPC threadpool...done!
01-01 00:00:15.311   933   933 I SDM     : Registering AidlComposer as a service
01-01 00:00:15.311   933   933 I SDM     : Creating AidlComposer extensions(QtiComposer3Client) service
01-01 00:00:15.313   933   933 I SDM     : HWCSession::Register: Set uevent listener = 0xb400007354823010
01-01 00:00:15.313   933   933 I SDM     : HWCSession::Init: builtin_powermode_override: 0
01-01 00:00:15.313   933   933 I SDM     : HWCSession::Init: DISABLE_VIRTUAL_DISPLAY: 1
01-01 00:00:15.313   933   933 I SDM     : HWCSession::Init: disable_get_screen_decorator_support: 1
01-01 00:00:15.335   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties ACTIVE
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties MODE_ID
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties OUT_FENCE_PTR
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties VRR_ENABLED
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties input_fence_timeout
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties output_fence
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties output_fence_offset
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties capabilities
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties ACTIVE
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties MODE_ID
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties OUT_FENCE_PTR
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties VRR_ENABLED
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties input_fence_timeout
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties output_fence
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties output_fence_offset
01-01 00:00:15.336   933   933 E SDM     : DRMCrtc::ParseProperties: DRMCrtc::ParseProperties capabilities
01-01 00:00:15.336   933   933 I SDM     : HWInfoDRM::Init: Failed to acquire DRMMaster instance 1
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWPlanesInfo: Adding DMA Pipe : Id 60, master_pipe_id : Id 0 block_sec_ui: 0 hw_block_mask: 0x1
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWPlanesInfo: Adding DMA Pipe : Id 64, master_pipe_id : Id 0 block_sec_ui: 0 hw_block_mask: 0x1
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWPlanesInfo: Adding DMA Pipe : Id 68, master_pipe_id : Id 0 block_sec_ui: 0 hw_block_mask: 0x2
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Max plane width = 16384
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Max cursor width = 128
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Max plane upscale = 1
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Max plane downscale = 1
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Has Decimation = 1
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Max Blending Stages = 2
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Has Source Split = 1
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Has QSEED3 = 1
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Has UBWC = 1
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Has Concurrent Writeback = 1
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Has Src Tonemap = 2
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Max Low Bw = 9600000
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Max High Bw = 9600000
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Max Pipe Bw = 4500000 KBps
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: MaxSDEClock = 412500000 Hz
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Clock Fudge Factor = 1.050000
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: Prefill factors:
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: 	Tiled_NV12 = 0
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: 	Tiled = 0
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: 	Linear = 0
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: 	Scale = 0
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: 	Fudge_factor = 0
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWResourceInfo: 	ib_fudge_factor = 0.000000
01-01 00:00:15.337   933   933 I SDM     : HWInfoDRM::GetHWRotatorInfo: V4L2 Rotator: Count = 0, Downscale = 0, Min_downscale = 2.000000,Downscale_compression = 0, Max_line_width = 0
01-01 00:00:15.337   933   933 I SDM     : PipeAllocDrm::Init: Smart DMA: Enabled
01-01 00:00:15.337   933   933 I SDM     : PipeAllocDrm::Init: Pipe Priority Order: Disabled
01-01 00:00:15.337   933   933 I SDM     : PipeAllocDrm::Init: Prefer multirect Disabled
01-01 00:00:15.337   933   933 I SDM     : PipeAllocDrm::Init: pipe->type = 3 Real pipe_id = 60 priority = 0 tonemap = 2
01-01 00:00:15.337   933   933 I SDM     : PipeAllocDrm::Init: pipe->type = 3 Real pipe_id = 64 priority = 1 tonemap = 2
01-01 00:00:15.337   933   933 I SDM     : PipeAllocDrm::Init: pipe->type = 3 Real pipe_id = 68 priority = 2 tonemap = 2
01-01 00:00:15.339   933   933 I SDM     : PipeAllocDrm::Init: Registered  Total Pipes = 3 SDma/virtual_pipes = 0
01-01 00:00:15.339   933   933 I SDM     : PipeAllocDrm::Init: pipe->type=3 Real pipe_id =68
01-01 00:00:15.339   933   933 I SDM     : PipeAllocDrm::Init: pipe->type=3 Real pipe_id =64
01-01 00:00:15.339   933   933 I SDM     : PipeAllocDrm::Init: pipe->type=3 Real pipe_id =60
01-01 00:00:15.341   933   933 I SDM     : HWInfoDRM::GetDisplaysStatus: display:   54-0, connected: true, primary: true
01-01 00:00:15.341   933   933 I SDM     : HWInfoDRM::GetDisplaysStatus: display:   57-0, connected: true, primary: false
01-01 00:00:15.341   933   933 I SDM     : CoreInterface::CreateCore: Open interface handle = 0xb4000073348269f0
01-01 00:00:15.341   933   933 I SDM     : HWInfoDRM::GetMaxDisplaysSupported: Max 2 concurrent displays.
01-01 00:00:15.341   933   933 I SDM     : HWInfoDRM::GetMaxDisplaysSupported: Max 2 concurrent displays of type 0 (BuiltIn).
01-01 00:00:15.341   933   933 I SDM     : HWInfoDRM::GetMaxDisplaysSupported: Max 0 concurrent displays of type 1 (Pluggable).
01-01 00:00:15.341   933   933 I SDM     : HWInfoDRM::GetMaxDisplaysSupported: Max 0 concurrent displays of type 2 (Virtual).
01-01 00:00:15.341   933   933 I SDM     : CPUHint::Init: Invalid CPU Hint Pre-enable Window -1
01-01 00:00:15.342   933   933 I SDM     : HWDeviceDRM::PopulateDisplayAttributes: Display attributes[0]: WxH: 2914x1134, DPI: 200.042160x200.024994, FPS: 60, LM_SPLIT: 0, V_BACK_PORCH: 0, V_FRONT_PORCH: 0, V_PULSE_WIDTH: 0, V_TOTAL: 1134, H_TOTAL: 2914, CLK: 198268KHZ, TOPOLOGY: 1, HW_SPLIT: 0
01-01 00:00:15.342   933   933 I SDM     : HWDeviceDRM::UpdateMixerAttributes: Mixer WxH 2914x1134-0 for Peripheral
01-01 00:00:15.342   933   933 I SDM     : ColorManager::CreateColorManagerProxy: PAV2 version is versions = 0, version = 0 
01-01 00:00:15.344   933   933 W SDM     : DisplayBase::Init: InitColorModes failed for display 54-0
01-01 00:00:15.344   933   933 I SDM     : StrategyImpl::SetIdleTimeoutMs: Idle timeout: active = 70, inactive = 520
01-01 00:00:15.347   933   933 I SDM     : Hdr10PlusModule():35 in the HDR10 Plus module
01-01 00:00:15.347   933   933 I SDM     : Init():118 HDR init done
01-01 00:00:15.347   933   933 I SDM     : HDRIntfClient::GetParameter: Version info is: 2.0
01-01 00:00:15.347   933   933 I SDM     : StrategyImpl::InitializeHdrInfo: HDRLib version = 2.0
01-01 00:00:15.347   933   933 I SDM     : Deinit():130 HDR De-init done
01-01 00:00:15.347   933   933 I SDM     : ColorIntfClient::Init: Init successful
01-01 00:00:15.347   933   933 I SDM     : ResourceImpl::RegisterDisplay: Registering display 54-0 with hw_block 0-0
01-01 00:00:15.347   933   933 I SDM     : Hdr10PlusModule():35 in the HDR10 Plus module
01-01 00:00:15.348   933   933 I SDM     : Init():118 HDR init done
01-01 00:00:15.348   933   933 I SDM     : HDRIntfClient::GetParameter: Version info is: 2.0
01-01 00:00:15.348   933   933 I SDM     : ColorIntfClient::Init: Init successful
01-01 00:00:15.348   933   933 I SDM     : DisplayBase::Init: disable_hw_recovery_dump_ set to 1
01-01 00:00:15.348   933   933 I SDM     : HWEventsDRM::Init: Setup event handler for display 54-0, CRTC 72, Connector 54
01-01 00:00:15.348   933   933 I SDM     : HWEventsDRM::RegisterIdlePowerCollapse: idle power collapse is not supported event
01-01 00:00:15.348   933   933 I SDM     : HWEventsDRM::Init: disable_hw_recovery_ set to 0
01-01 00:00:15.348   933   933 I SDM     : HWCDisplay::UpdateConfigs: num_configs = 1
01-01 00:00:15.348   933   933 I SDM     : HWCDisplay::Init: Display created with id: 0
01-01 00:00:15.348   933   933 W SDM     : HWCDisplay::PopulateColorModes: GetColorModeCount failed, use native color mode
01-01 00:00:15.348   933   933 I SDM     : HWCDisplayBuiltIn::Init: Drop redundant drawcycles 0
01-01 00:00:15.348   933   933 W SDM     : HWCDisplayBuiltIn::Init: File '/sys/class/lcd_bias/secure_mode' could not be opened. errno = 2, desc = No such file or directory
01-01 00:00:15.348   933   933 I SDM     : StrategyImpl::SetIdleTimeoutMs: Idle timeout: active = 70, inactive = 520
01-01 00:00:15.348   933   933 I SDM     : DisplayBase::SetFrameBufferConfig: New framebuffer resolution (2914x1134)
01-01 00:00:15.385   933   933 I SDM     : HWCDisplay::SetFrameBufferResolution: New framebuffer resolution (2914x1134)
01-01 00:00:15.385   933   933 I SDM     : HWCSession::CreatePrimaryDisplay: Create primary display type = 0, sdm id = 54, client id = 0
01-01 00:00:15.387   933   933 I SDM     : HWCColorManager::CreateColorManager: Successfully loaded libsdm-disp-vndapis.so
01-01 00:00:15.389   933   933 I SDM     : HWCSession::StartServices: IDisplayConfig service registration completed.
01-01 00:00:15.390   933   933 I SDM     : Successfully registered AidlComposer as a service
01-01 00:00:15.390   933   933 I SDM     : Registering DisplayConfig AIDL as a service
01-01 00:00:15.390   933   933 I SDM     : Successfully registered DisplayConfig AIDL as a service
01-01 00:00:15.390   933   933 I SDM     : ProcessState initialization completed
01-01 00:00:15.391   933   933 I SDM     : Joining RPC threadpool...
01-01 00:00:15.570   933   933 I SDM     : HWCSession::RegisterCallback: Hotplugging primary...
01-01 00:00:15.570   933   933 I SDM     : HWCSession::RegisterCallback: Handling built-in displays...
01-01 00:00:15.572   933   933 I SDM     : HWCSession::HandleBuiltInDisplays: Create builtin display, sdm id = 57, client id = 1
01-01 00:00:15.572   933   933 I SDM     : CPUHint::Init: Invalid CPU Hint Pre-enable Window -1
01-01 00:00:15.573   933   933 I SDM     : HWDeviceDRM::PopulateDisplayAttributes: Display attributes[0]: WxH: 2000x810, DPI: 196.138992x195.942856, FPS: 60, LM_SPLIT: 0, V_BACK_PORCH: 0, V_FRONT_PORCH: 0, V_PULSE_WIDTH: 0, V_TOTAL: 810, H_TOTAL: 2000, CLK: 97200KHZ, TOPOLOGY: 1, HW_SPLIT: 0
01-01 00:00:15.573   933   933 I SDM     : HWDeviceDRM::UpdateMixerAttributes: Mixer WxH 2000x810-0 for Peripheral
01-01 00:00:15.573   933   933 I SDM     : ColorManager::CreateColorManagerProxy: PAV2 version is versions = 0, version = 0 
01-01 00:00:15.573   933   933 W SDM     : DisplayBase::Init: InitColorModes failed for display 57-0
01-01 00:00:15.573   933   933 I SDM     : StrategyImpl::SetIdleTimeoutMs: Idle timeout: active = 70, inactive = 520
01-01 00:00:15.573   933   933 I SDM     : Init():118 HDR init done
01-01 00:00:15.573   933   933 I SDM     : HDRIntfClient::GetParameter: Version info is: 2.0
01-01 00:00:15.573   933   933 I SDM     : StrategyImpl::InitializeHdrInfo: HDRLib version = 2.0
01-01 00:00:15.573   933   933 I SDM     : Deinit():130 HDR De-init done
01-01 00:00:15.573   933   933 I SDM     : ColorIntfClient::Init: Init successful
01-01 00:00:15.574   933   933 I SDM     : ResourceImpl::RegisterDisplay: Registering display 57-0 with hw_block 1-0
01-01 00:00:15.574   933   933 I SDM     : Init():118 HDR init done
01-01 00:00:15.574   933   933 I SDM     : HDRIntfClient::GetParameter: Version info is: 2.0
01-01 00:00:15.574   933   933 I SDM     : ColorIntfClient::Init: Init successful
01-01 00:00:15.574   933   933 I SDM     : DisplayBase::Init: disable_hw_recovery_dump_ set to 1
01-01 00:00:15.574   933   933 I SDM     : HWEventsDRM::Init: Setup event handler for display 57-0, CRTC 74, Connector 57
01-01 00:00:15.574   933   933 I SDM     : HWEventsDRM::RegisterIdlePowerCollapse: idle power collapse is not supported event
01-01 00:00:15.574   933   933 I SDM     : HWEventsDRM::Init: disable_hw_recovery_ set to 0
01-01 00:00:15.574   933   933 I SDM     : HWCDisplay::UpdateConfigs: num_configs = 1
01-01 00:00:15.574   933   933 I SDM     : HWCDisplay::Init: Display created with id: 1
01-01 00:00:15.574   933   933 W SDM     : HWCDisplay::PopulateColorModes: GetColorModeCount failed, use native color mode
01-01 00:00:15.574   933   933 I SDM     : HWCDisplayBuiltIn::Init: Drop redundant drawcycles 1
01-01 00:00:15.574   933   933 W SDM     : HWCDisplayBuiltIn::Init: File '/sys/class/lcd_bias/secure_mode' could not be opened. errno = 2, desc = No such file or directory
01-01 00:00:15.574   933   933 I SDM     : StrategyImpl::SetIdleTimeoutMs: Idle timeout: active = 70, inactive = 520
01-01 00:00:15.574   933   933 I SDM     : DisplayBase::SetFrameBufferConfig: New framebuffer resolution (2000x810)
01-01 00:00:15.574   933   933 I SDM     : HWCDisplay::SetFrameBufferResolution: New framebuffer resolution (2000x810)
01-01 00:00:15.574   933   933 I SDM     : HWCSession::HandleBuiltInDisplays: Builtin display created: sdm id = 57, client id = 1
01-01 00:00:15.574   933   933 I SDM     : HWCSession::HandleBuiltInDisplays: Hotplugging builtin display, sdm id = 57, client id = 1
01-01 00:00:15.574   933   933 I SDM     : HWCSession::RegisterCallback: Handling pluggable displays...
01-01 00:00:15.574   933   933 I SDM     : HWCSession::HandlePluggableDisplays: Handling hotplug...
01-01 00:00:15.574   933   933 I SDM     : HWCSession::HandlePluggableDisplays: Handling hotplug... Done.
01-01 00:00:15.597   933  1075 I SDM     : HWCDisplay::GetColorModeCount: Supported color mode count = 1
01-01 00:00:15.598   933  1075 I SDM     : HWCDisplay::GetColorModes: Color mode = 0 is supported
01-01 00:00:15.601   933   933 I SDM     : HWCDisplay::GetColorModeCount: Supported color mode count = 1
01-01 00:00:15.601   933   933 I SDM     : HWCDisplay::GetColorModes: Color mode = 0 is supported
01-01 00:00:15.602   933  1075 I SDM     : HWCDisplay::GetRenderIntentCount: mode: 0 supported rendering intent count = 1
01-01 00:00:15.602   933  1075 I SDM     : HWCDisplay::GetRenderIntents: Color mode = 0 is supported with render intent = 0
01-01 00:00:15.658   933  1075 I SDM     : HWCDisplay::GetRenderIntentCount: mode: 0 supported rendering intent count = 1
01-01 00:00:15.658   933  1075 I SDM     : HWCDisplay::GetRenderIntents: Color mode = 0 is supported with render intent = 0
01-01 00:00:15.669   933  1075 I SDM     : DisplayBase::SetDisplayState: Set state = 1, display 54-0, teardown = 0
01-01 00:00:15.669   933  1075 I SDM     : StrategyImpl::SetIdleTimeoutMs: Idle timeout: active = 70, inactive = 520
01-01 00:00:15.671   933  1075 W SDM     : DisplayBase::SetVSyncState: Can't enable vsync when display 54-0 is powered off!! Defer it when display is active
01-29 19:18:14.305   933  1075 I SDM     : DisplayBuiltIn::Init: DPPS Interface init successfully
01-29 19:18:15.786   933  1075 I SDM     : DisplayBase::SetDisplayState: Set state = 1, display 57-0, teardown = 0
01-29 19:18:15.786   933  1075 I SDM     : StrategyImpl::SetIdleTimeoutMs: Idle timeout: active = 70, inactive = 520

里面透露了很多信息:

1. 两个display其实全是builtin类型,但是初始化时机不一样:

display_qcom\display\composer-aidl\hwc_session.cpp文件的注释里有说明:

  // Create primary display here. Remaining builtin displays will be created after client has set
  // display indexes which may happen sometime before callback is registered.
  status = CreatePrimaryDisplay();

从Log里总结的话,

I SDM     : HWCSession::CreatePrimaryDisplay: Create primary display type = 0, sdm id = 54, client id = 0
  • HWCSession::CreatePrimaryDisplay() 负责初始化主屏(SDM id = 54)

I SDM     : HWCSession::HandleBuiltInDisplays: Create builtin display, sdm id = 57, client id = 1
  • HWCSession::HandleBuiltInDisplays() 后续初始化 cluster 屏(SDM id = 57)

2.目前的配置,我们永远不可能从HWC得到output layer

一来,我已经知道cwb(concurrent writeback)没有enable:

I SDM     : HWInfoDRM::GetHWResourceInfo: Has Concurrent Writeback = 1

二来,Virtual display也是disable掉的:

HWCSession::Init: DISABLE_VIRTUAL_DISPLAY: 1

今天突然一下子反应过来,Virtual Display是依赖于CWB的。所以DISABLE_VIRTUAL_DISPLAY这个是我自己反应过来以后才去寻找证据,得到印证的。

3. 说明之前ScreenRecord只能走GPU合成路径。这个就不用验证了。

4. CRTC和物理display的对应关系:

HWEventsDRM::Init: Setup event handler for display 54-0, CRTC 72, Connector 54
HWEventsDRM::Init: Setup event handler for display 57-0, CRTC 74, Connector 57


网站公告

今日签到

点亮在社区的每一天
去签到