高通hypervisor display的架构
下面这张图是高通文档上能看到的对于高通hypervisor的display显示框架,但是关于QNX和LA侧是如何交互的,好像没有找到相关的文档介绍。
正好最近遇到了一些和display相关的问题,趁着这个档口稍微研究了下QNX和LA侧两边是怎么交互的
Hypervisor Display架构部分细节解析
下图是对前面那张图的细节补充
1,所有LA侧的APP与显示相关的调用最终都会交由SurfaceFlinger处理
2,SurfaceFlinger会最终调用android.hardware.graphics.composer@2.4-service服务
3,android.hardware.graphics.composer@2.4-service服务会调用GPU&DRM&Qcom的一些列库文件(很遗憾这些库相当一大部分源码是不开源的)
4,libdrm库调用open/ioctl等函数会经过lib_drm_fe库的转接,当然lib_drm_fe会做很多其他适配的工作
5,lib_drm_fe会调用内核HGSL驱动中的hab通信接口与QNX侧的wfd_be服务进行通信
6,wfd_be服务会解析接收到的LA侧的数据包
7,根据数据包中的命令类型调用不同的openwfd接口,需要注意的是,这里的接口是做了一层转换的,举个例子wfdEnumerateDevices_Host,这个接口会进行转换之后真正调用wfdEnumerateDevices函数
8,所有的操作都执行完成之后,如果有必要会唤醒wfd_be的commit&vsync现场,通知openwfd刷新画面
更细节的框图:
Surfaceflinger backtrace
这个backtrace是刚好有个和display相关的问题复现的时候的backtrace,比较难得的能抓到整个surfaceflinger block住的状态
msmnile_gvmq:/ # debuggerd -b 423
debuggerd -b 423
----- pid 423 at 2023-01-15 19:27:49 -----
Cmd line: /vendor/bin/hw/android.hardware.graphics.composer@2.4-service
ABI: 'arm64'
"composer@2.4-se" sysTid=423
#00 pc 000000000009b0f4 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 0000000000057de0 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 0000000000097bbc /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::IPCThreadState::getAndExecuteCommand()+172) (BuildId: d9c65f1690822c418040f1143712be80)
#03 pc 000000000009918c /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::IPCThreadState::joinThreadPool(bool)+96) (BuildId: d9c65f1690822c418040f1143712be80)
#04 pc 000000000000a1c4 /vendor/bin/hw/android.hardware.graphics.composer@2.4-service (main+380) (BuildId: 7e1ed405d730e4909758105094182804)
#05 pc 00000000000499fc /apex/com.android.runtime/lib64/bionic/libc.so (__libc_init+108) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
"Binder:423_1" sysTid=476
#00 pc 000000000009b0f4 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 0000000000057de0 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 0000000000047a0c /apex/com.android.vndk.v30/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+296) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#03 pc 0000000000047bfc /apex/com.android.vndk.v30/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#04 pc 00000000000484b8 /apex/com.android.vndk.v30/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+60) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#05 pc 000000000006ff80 /apex/com.android.vndk.v30/lib64/libbinder.so (android::PoolThread::threadLoop()+24) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#06 pc 00000000000154d0 /apex/com.android.vndk.v30/lib64/libutils.so (android::Thread::_threadLoop(void*)+260) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#07 pc 0000000000014d94 /apex/com.android.vndk.v30/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#08 pc 00000000000afecc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#09 pc 0000000000050408 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
"Binder:423_2" sysTid=477
#00 pc 000000000009b0f4 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 0000000000057de0 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 0000000000047a0c /apex/com.android.vndk.v30/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+296) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#03 pc 0000000000047bfc /apex/com.android.vndk.v30/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#04 pc 00000000000484b8 /apex/com.android.vndk.v30/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+60) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#05 pc 000000000006ff80 /apex/com.android.vndk.v30/lib64/libbinder.so (android::PoolThread::threadLoop()+24) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#06 pc 00000000000154d0 /apex/com.android.vndk.v30/lib64/libutils.so (android::Thread::_threadLoop(void*)+260) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#07 pc 0000000000014d94 /apex/com.android.vndk.v30/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#08 pc 00000000000afecc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#09 pc 0000000000050408 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
"HWC_UeventThrea" sysTid=530
#00 pc 000000000009c1b4 /apex/com.android.runtime/lib64/bionic/libc.so (__ppoll+4) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 000000000005a3c0 /apex/com.android.runtime/lib64/bionic/libc.so (poll+92) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 0000000000004a98 /apex/com.android.vndk.v30/lib64/libhardware_legacy.so (uevent_next_event+84) (BuildId: 0ce074f6b680597fc37aded2a96805a4)
#03 pc 0000000000027b98 /vendor/lib64/hw/hwcomposer.msmnile.so (sdm::HWCUEvent::UEventThread(sdm::HWCUEvent*)+212) (BuildId: 6ca7495298a58781238d1b65a06601a9)
#04 pc 00000000000340b0 /vendor/lib64/hw/hwcomposer.msmnile.so (void* std::__1::__thread_proxy<std::__1::tuple<std::__1::unique_ptr<std::__1::__thread_struct, std::__1::default_delete<std::__1::__thread_struct> >, void (*)(sdm::HWCUEvent*), sdm::HWCUEvent*> >(void*)+40) (BuildId: 6ca7495298a58781238d1b65a06601a9)
#05 pc 00000000000afecc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#06 pc 0000000000050408 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
"DRMFE_EventList" sysTid=543
#00 pc 000000000009b0f8 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+8) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 0000000000057de0 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 0000000000002698 /vendor/lib64/libuhab.so (habmm_socket_recv+104) (BuildId: e82477cd90bbe46d4a48faaf5486a0e4)
#03 pc 000000000001e8c4 /vendor/lib64/lib_drm_fe.so (user_os_utils_recv+216) (BuildId: ad7158dd9eba42d5bc2e156cebb4bf0a)
#04 pc 00000000000196e8 /vendor/lib64/lib_drm_fe.so (event_listener+312) (BuildId: ad7158dd9eba42d5bc2e156cebb4bf0a)
#05 pc 00000000000afecc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#06 pc 0000000000050408 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
"SDM_EventThread" sysTid=550
#00 pc 000000000009c1b4 /apex/com.android.runtime/lib64/bionic/libc.so (__ppoll+4) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 000000000005a3c0 /apex/com.android.runtime/lib64/bionic/libc.so (poll+92) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 000000000007a534 /vendor/lib64/libsdmcore.so (sdm::HWEventsDRM::DisplayEventHandler()+216) (BuildId: c80e3f1cd75b3f23581f923f1170aeea)
#03 pc 00000000000798cc /vendor/lib64/libsdmcore.so (sdm::HWEventsDRM::DisplayEventThread(void*)+12) (BuildId: c80e3f1cd75b3f23581f923f1170aeea)
#04 pc 00000000000afecc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#05 pc 0000000000050408 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
"HwBinder:423_1" sysTid=561
#00 pc 000000000009b0f4 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 0000000000057de0 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 0000000000097bbc /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::IPCThreadState::getAndExecuteCommand()+172) (BuildId: d9c65f1690822c418040f1143712be80)
#03 pc 000000000009918c /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::IPCThreadState::joinThreadPool(bool)+96) (BuildId: d9c65f1690822c418040f1143712be80)
#04 pc 00000000000a83b0 /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::PoolThread::threadLoop()+24) (BuildId: d9c65f1690822c418040f1143712be80)
#05 pc 00000000000154d0 /apex/com.android.vndk.v30/lib64/libutils.so (android::Thread::_threadLoop(void*)+260) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#06 pc 0000000000014d94 /apex/com.android.vndk.v30/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#07 pc 00000000000afecc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#08 pc 0000000000050408 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
"HwBinder:423_2" sysTid=562
#00 pc 000000000009c1b4 /apex/com.android.runtime/lib64/bionic/libc.so (__ppoll+4) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 000000000005a3c0 /apex/com.android.runtime/lib64/bionic/libc.so (poll+92) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 000000000001896c /vendor/lib64/lib_drm_fe.so (drm_sync_wait_fe+68) (BuildId: ad7158dd9eba42d5bc2e156cebb4bf0a)
#03 pc 0000000000013648 /vendor/lib64/lib_drm_fe.so (drm_crtc_wait_for_fence_fe+360) (BuildId: ad7158dd9eba42d5bc2e156cebb4bf0a)
#04 pc 0000000000014280 /vendor/lib64/lib_drm_fe.so (drm_atomic_prepare_commit_fe+220) (BuildId: ad7158dd9eba42d5bc2e156cebb4bf0a)
#05 pc 0000000000014c10 /vendor/lib64/lib_drm_fe.so (drm_atomic_complete_commit_fe+236) (BuildId: ad7158dd9eba42d5bc2e156cebb4bf0a)
#06 pc 00000000000158d4 /vendor/lib64/lib_drm_fe.so (drm_mode_atomic_commit_fe+912) (BuildId: ad7158dd9eba42d5bc2e156cebb4bf0a)
#07 pc 000000000000f0a0 /vendor/lib64/lib_drm_fe.so (drmioctl_fe+864) (BuildId: ad7158dd9eba42d5bc2e156cebb4bf0a)
#08 pc 0000000000007298 /vendor/lib64/libdrm.so (drmIoctl+104) (BuildId: 9db896bc552bb813f81c52df388f1f55)
#09 pc 0000000000011230 /vendor/lib64/libdrm.so (drmModeAtomicCommit+816) (BuildId: 9db896bc552bb813f81c52df388f1f55)
#10 pc 000000000002b020 /vendor/lib64/libsdedrm.so (sde_drm::DRMAtomicReq::Commit(bool, bool)+156) (BuildId: 259c96354001f6853b4a7359dc6b1b62)
#11 pc 00000000000703e0 /vendor/lib64/libsdmcore.so (sdm::HWDeviceDRM::AtomicCommit(sdm::HWLayers*)+140) (BuildId: c80e3f1cd75b3f23581f923f1170aeea)
#12 pc 000000000006ffe8 /vendor/lib64/libsdmcore.so (sdm::HWDeviceDRM::Commit(sdm::HWLayers*)+120) (BuildId: c80e3f1cd75b3f23581f923f1170aeea)
#13 pc 0000000000074bbc /vendor/lib64/libsdmcore.so (sdm::HWPeripheralDRM::Commit(sdm::HWLayers*)+436) (BuildId: c80e3f1cd75b3f23581f923f1170aeea)
#14 pc 0000000000035b80 /vendor/lib64/libsdmcore.so (sdm::DisplayBase::Commit(sdm::LayerStack*)+364) (BuildId: c80e3f1cd75b3f23581f923f1170aeea)
#15 pc 0000000000040e14 /vendor/lib64/libsdmcore.so (sdm::DisplayBuiltIn::Commit(sdm::LayerStack*)+340) (BuildId: c80e3f1cd75b3f23581f923f1170aeea)
#16 pc 000000000004253c /vendor/lib64/hw/hwcomposer.msmnile.so (sdm::HWCDisplay::CommitLayerStack()+396) (BuildId: 6ca7495298a58781238d1b65a06601a9)
#17 pc 0000000000049e58 /vendor/lib64/hw/hwcomposer.msmnile.so (sdm::HWCDisplayBuiltIn::Present(int*)+496) (BuildId: 6ca7495298a58781238d1b65a06601a9)
#18 pc 000000000002a9f0 /vendor/lib64/hw/hwcomposer.msmnile.so (sdm::HWCSession::PresentDisplay(hwc2_device*, unsigned long, int*)+544) (BuildId: 6ca7495298a58781238d1b65a06601a9)
#19 pc 000000000000b8f0 /vendor/bin/hw/android.hardware.graphics.composer@2.4-service (android::hardware::graphics::composer::V2_1::passthrough::detail::HwcHalImpl<android::hardware::graphics::composer::V2_4::hal::ComposerHal>::presentDisplay(unsigned long, int*, std::__1::vector<unsigned long, std::__1::allocator<unsigned long> >*, std::__1::vector<int, std::__1::allocator<int> >*)+68) (BuildId: 7e1ed405d730e4909758105094182804)
#20 pc 00000000000173f8 /vendor/bin/hw/android.hardware.graphics.composer@2.4-service (android::hardware::graphics::composer::V2_1::hal::ComposerCommandEngine::executePresentDisplay(unsigned short)+104) (BuildId: 7e1ed405d730e4909758105094182804)
#21 pc 0000000000016484 /vendor/bin/hw/android.hardware.graphics.composer@2.4-service (android::hardware::graphics::composer::V2_1::hal::ComposerCommandEngine::executeCommand(android::hardware::graphics::composer::V2_1::IComposerClient::Command, unsigned short)+236) (BuildId: 7e1ed405d730e4909758105094182804)
#22 pc 0000000000014e54 /vendor/bin/hw/android.hardware.graphics.composer@2.4-service (android::hardware::graphics::composer::V2_1::hal::ComposerCommandEngine::execute(unsigned int, android::hardware::hidl_vec<android::hardware::hidl_handle> const&, bool*, unsigned int*, android::hardware::hidl_vec<android::hardware::hidl_handle>*)+136) (BuildId: 7e1ed405d730e4909758105094182804)
#23 pc 0000000000012a18 /vendor/bin/hw/android.hardware.graphics.composer@2.4-service (android::hardware::graphics::composer::V2_1::hal::detail::ComposerClientImpl<android::hardware::graphics::composer::V2_1::IComposerClient, android::hardware::graphics::composer::V2_1::hal::ComposerHal>::executeCommands(unsigned int, android::hardware::hidl_vec<android::hardware::hidl_handle> const&, std::__1::function<void (android::hardware::graphics::composer::V2_1::Error, bool, unsigned int, android::hardware::hidl_vec<android::hardware::hidl_handle> const&)>)+108) (BuildId: 7e1ed405d730e4909758105094182804)
#24 pc 000000000002803c /apex/com.android.vndk.v30/lib64/android.hardware.graphics.composer@2.2.so (android::hardware::graphics::composer::V2_2::BnHwComposerClient::_hidl_executeCommands_2_2(android::hidl::base::V1_0::BnHwBase*, android::hardware::Parcel const&, android::hardware::Parcel*, std::__1::function<void (android::hardware::Parcel&)>)+528) (BuildId: 1ed6665f715cc1e48077f38fd2225c9c)
#25 pc 0000000000041e30 /apex/com.android.vndk.v30/lib64/android.hardware.graphics.composer@2.4.so (android::hardware::graphics::composer::V2_4::BnHwComposerClient::onTransact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+600) (BuildId: d21eaf84de0eeb98a1488c8f69b0d718)
#26 pc 0000000000093fac /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::BHwBinder::transact(unsigned int, android::hardware::Parcel const&, android::hardware::Parcel*, unsigned int, std::__1::function<void (android::hardware::Parcel&)>)+68) (BuildId: d9c65f1690822c418040f1143712be80)
#27 pc 0000000000097f44 /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::IPCThreadState::getAndExecuteCommand()+1076) (BuildId: d9c65f1690822c418040f1143712be80)
#28 pc 000000000009918c /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::IPCThreadState::joinThreadPool(bool)+96) (BuildId: d9c65f1690822c418040f1143712be80)
#29 pc 00000000000a83b0 /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::PoolThread::threadLoop()+24) (BuildId: d9c65f1690822c418040f1143712be80)
#30 pc 00000000000154d0 /apex/com.android.vndk.v30/lib64/libutils.so (android::Thread::_threadLoop(void*)+260) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#31 pc 0000000000014d94 /apex/com.android.vndk.v30/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#32 pc 00000000000afecc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#33 pc 0000000000050408 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
"SDM_EventThread" sysTid=598
#00 pc 000000000009c1b4 /apex/com.android.runtime/lib64/bionic/libc.so (__ppoll+4) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 000000000005a3c0 /apex/com.android.runtime/lib64/bionic/libc.so (poll+92) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 000000000007a534 /vendor/lib64/libsdmcore.so (sdm::HWEventsDRM::DisplayEventHandler()+216) (BuildId: c80e3f1cd75b3f23581f923f1170aeea)
#03 pc 00000000000798cc /vendor/lib64/libsdmcore.so (sdm::HWEventsDRM::DisplayEventThread(void*)+12) (BuildId: c80e3f1cd75b3f23581f923f1170aeea)
#04 pc 00000000000afecc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#05 pc 0000000000050408 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
"SDM_EventThread" sysTid=600
#00 pc 000000000009c1b4 /apex/com.android.runtime/lib64/bionic/libc.so (__ppoll+4) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 000000000005a3c0 /apex/com.android.runtime/lib64/bionic/libc.so (poll+92) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 000000000007a534 /vendor/lib64/libsdmcore.so (sdm::HWEventsDRM::DisplayEventHandler()+216) (BuildId: c80e3f1cd75b3f23581f923f1170aeea)
#03 pc 00000000000798cc /vendor/lib64/libsdmcore.so (sdm::HWEventsDRM::DisplayEventThread(void*)+12) (BuildId: c80e3f1cd75b3f23581f923f1170aeea)
#04 pc 00000000000afecc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#05 pc 0000000000050408 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
"Binder:423_3" sysTid=10830
#00 pc 000000000009b0f4 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 0000000000057de0 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 0000000000047a0c /apex/com.android.vndk.v30/lib64/libbinder.so (android::IPCThreadState::talkWithDriver(bool)+296) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#03 pc 0000000000047bfc /apex/com.android.vndk.v30/lib64/libbinder.so (android::IPCThreadState::getAndExecuteCommand()+24) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#04 pc 00000000000484b8 /apex/com.android.vndk.v30/lib64/libbinder.so (android::IPCThreadState::joinThreadPool(bool)+60) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#05 pc 000000000006ff80 /apex/com.android.vndk.v30/lib64/libbinder.so (android::PoolThread::threadLoop()+24) (BuildId: 4e678e29aecf2b6af558fbad12d0a468)
#06 pc 00000000000154d0 /apex/com.android.vndk.v30/lib64/libutils.so (android::Thread::_threadLoop(void*)+260) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#07 pc 0000000000014d94 /apex/com.android.vndk.v30/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#08 pc 00000000000afecc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#09 pc 0000000000050408 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
"HwBinder:423_3" sysTid=10831
#00 pc 000000000009b0f4 /apex/com.android.runtime/lib64/bionic/libc.so (__ioctl+4) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#01 pc 0000000000057de0 /apex/com.android.runtime/lib64/bionic/libc.so (ioctl+156) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#02 pc 0000000000097bbc /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::IPCThreadState::getAndExecuteCommand()+172) (BuildId: d9c65f1690822c418040f1143712be80)
#03 pc 000000000009918c /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::IPCThreadState::joinThreadPool(bool)+96) (BuildId: d9c65f1690822c418040f1143712be80)
#04 pc 00000000000a83b0 /apex/com.android.vndk.v30/lib64/libhidlbase.so (android::hardware::PoolThread::threadLoop()+24) (BuildId: d9c65f1690822c418040f1143712be80)
#05 pc 00000000000154d0 /apex/com.android.vndk.v30/lib64/libutils.so (android::Thread::_threadLoop(void*)+260) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#06 pc 0000000000014d94 /apex/com.android.vndk.v30/lib64/libutils.so (thread_data_t::trampoline(thread_data_t const*)+412) (BuildId: 302a93d93d50a20e71c051933fe98b5f)
#07 pc 00000000000afecc /apex/com.android.runtime/lib64/bionic/libc.so (__pthread_start(void*)+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
#08 pc 0000000000050408 /apex/com.android.runtime/lib64/bionic/libc.so (__start_thread+64) (BuildId: 8d0a10271eef02de6c33b788fec2db37)
----- end 423 -----
相关概念补充
有关commit:
在OpenWFD或者其他图形系统中,"commit"的概念通常指的是将一系列的更改或更新应用到图形系统,使得这些更改在屏幕上可见。
在你对系统做了一系列的更改后,例如更改了图形对象的属性,或者更改了绘制命令,这些更改在内存中进行,但并不会立即反映到屏幕上。这是因为立即更新屏幕会导致屏幕频繁刷新,这会消耗大量的系统资源,并且可能导致屏幕闪烁。因此,你可以在内存中做所有的更改,然后在完成所有更改后,通过调用"commit"操作,将这些更改一次性应用到屏幕上。
在OpenWFD中,有一个API函数叫做"wfdDeviceCommit",它的功能就是执行这个"commit"操作。当你调用这个函数时,所有之前对设备做的更改(例如设置设备属性或者更改端口模式)都会被应用,这些更改将会在下一次屏幕刷新时可见。
这种"commit"机制在许多图形系统中都很常见,包括OpenWFD和Wayland等,它们都使用这种机制来优化屏幕更新和减少资源使用。
有关vsync:
"VSync"是"垂直同步"的缩写,这是一种在计算机图形中常见的技术,用于解决屏幕撕裂(screen tearing)问题。屏幕撕裂是当计算机的图形处理器(GPU)输出的帧率超过显示器的刷新率时,一帧的上半部分和下半部分不同步,导致画面看起来像是被撕裂了一样。
垂直同步技术通过同步GPU的帧输出速度和显示器的刷新率来避免屏幕撕裂。具体来说,当启用VSync时,GPU会等到显示器完成一次完整的垂直刷新(从上到下更新所有像素)后,才开始渲染下一帧。这样可以确保在显示器每次刷新时,只有一帧数据被发送到显示器,避免了屏幕撕裂。
然而,垂直同步也有一些缺点。由于GPU需要等待显示器完成刷新,如果GPU的渲染速度非常快,这可能会导致GPU的性能没有得到充分利用。此外,如果GPU的帧率低于显示器的刷新率,用户可能会感觉到画面卡顿。因此,垂直同步是否启用,以及如何配置垂直同步,往往取决于具体的应用需求和硬件性能。文章来源:https://www.toymoban.com/news/detail-644011.html
在OpenWFD中,可能有相关的API或设置用于控制垂直同步,但具体的实现和使用可能会根据不同的OpenWFD实现和硬件配置有所不同。文章来源地址https://www.toymoban.com/news/detail-644011.html
到了这里,关于高通hypervisor display框架解析的文章就介绍完了。如果您还想了解更多内容,请在右上角搜索TOY模板网以前的文章或继续浏览下面的相关文章,希望大家以后多多支持TOY模板网!