硬件:RK3588 edp屏幕
软件:openharmony4.0-release
问题:移植display HDI模块后,composer_host进程起不来报错。
# hilog | grep 556
07-15 15:53:14.094 556 621 E C02500/DISP: [Apply:269] plane not enough
07-15 15:53:14.094 556 621 E C02500/DISP: [Commit:42] post composition apply failed
07-15 15:53:14.095 556 621 E C02500/DISP: [SetLayerMaskInfo:344] <private> is not supported
07-15 15:53:14.095 556 621 E C02500/DISP_CMD: 823@OnSetLayerMaskInfo: check failed
07-15 15:53:14.097 556 621 E C02500/DISP: [SetDisplayClientDamage:156] <private> is not supported
07-15 15:53:14.097 556 621 E C02500/DISP_CMD: OnSetDisplayClientDamage, SetDisplayClientDamage error
07-15 15:53:14.105 556 621 E C02500/DISP: [Apply:269] plane not enough
07-15 15:53:14.105 556 621 E C02500/DISP: [Commit:42] post composition apply failed
07-15 15:53:14.105 556 621 E C02500/DISP: [SetLayerMaskInfo:344] <private> is not supported
07-15 15:53:14.105 556 621 E C02500/DISP_CMD: 823@OnSetLayerMaskInfo: check failed
07-15 15:53:14.107 556 621 E C02500/DISP: [SetDisplayClientDamage:156] <private> is not supported
07-15 15:53:14.107 556 621 E C02500/DISP_CMD: OnSetDisplayClientDamage, SetDisplayClientDamage error
07-15 15:53:14.115 556 621 E C02500/DISP: [Apply:269] plane not enough
07-15 15:53:14.115 556 621 E C02500/DISP: [Commit:42] post composition apply failed
07-15 15:53:14.125 556 621 E C02500/DISP: [SetLayerMaskInfo:344] <private> is not supported
07-15 15:53:14.125 556 621 E C02500/DISP_CMD: 823@OnSetLayerMaskInfo: check failed
07-15 15:53:14.127 556 621 E C02500/DISP: [SetDisplayClientDamage:156] <private> is not supported
07-15 15:53:14.127 556 621 E C02500/DISP_CMD: OnSetDisplayClientDamage, SetDisplayClientDamage error
07-15 15:53:14.136 556 621 E C02500/DISP: [Apply:269] plane not enough
07-15 15:53:14.136 556 621 E C02500/DISP: [Commit:42] post composition apply failed
07-15 15:53:14.145 556 621 E C02500/DISP: [SetLayerMaskInfo:344] <private> is not supported
07-15 15:53:14.145 556 621 E C02500/DISP_CMD: 823@OnSetLayerMaskInfo: check failed
07-15 15:53:14.147 556 621 E C02500/DISP: [SetDisplayClientDamage:156] <private> is not supported
07-15 15:53:14.147 556 621 E C02500/DISP_CMD: OnSetDisplayClientDamage, SetDisplayClientDamage error
07-15 15:53:14.158 556 621 E C02500/DISP: [Apply:269] plane not enough
07-15 15:53:14.158 556 621 E C02500/DISP: [Commit:42] post composition apply failed
07-15 15:53:15.556 575 1274 E C01120/BundleMgrService: [bundle_mgr_proxy.cpp(GetParcelableInfos):3698] readParcelableInfo failed
07-15 15:53:15.556 575 1274 E C01120/BundleMgrService: [bundle_mgr_proxy.cpp(QueryExtensionAbilityInfos):2456] fail to obtain extensionInfos
07-15 15:53:15.556 575 1274 W C01510/IPCObjectProxy: 63: handle = 4 destroyed, descriptor: IPCObjectProxy4
07-15 15:53:31.556 580 580 I C02f01/ATMProxy: [GetTokenType]:result from server data = 0
07-15 15:53:31.556 580 722 I C01b00/AccountMgrService: [GetAccountInfo:230]:file /data/service/el1/public/account/-1/account.json not exist, create!
07-15 15:53:34.445 556 621 E C02500/DISP: [SetLayerMaskInfo:344] <private> is not supported
07-15 15:53:34.445 556 621 E C02500/DISP_CMD: 823@OnSetLayerMaskInfo: check failed
07-15 15:53:34.456 556 621 E C02500/DISP: [SetDisplayClientDamage:156] <private> is not supported
07-15 15:53:34.456 556 621 E C02500/DISP_CMD: OnSetDisplayClientDamage, SetDisplayClientDamage error
07-15 15:53:34.468 556 621 E C02500/DISP: [Apply:269] plane not enough
07-15 15:53:34.468 556 621 E C02500/DISP: [Commit:42] post composition apply failed
07-15 15:53:35.114 556 621 E C02500/DISP: [SetLayerMaskInfo:344] <private> is not supported
07-15 15:53:35.115 556 621 E C02500/DISP_CMD: 823@OnSetLayerMaskInfo: check failed
07-15 15:53:35.125 556 621 E C02500/DISP: [SetDisplayClientDamage:156] <private> is not supported
07-15 15:53:35.125 556 621 E C02500/DISP_CMD: OnSetDisplayClientDamage, SetDisplayClientDamage error
07-15 15:53:35.179 556 621 E C02500/DISP: [Apply:269] plane not enough
07-15 15:53:35.179 556 621 E C02500/DISP: [Commit:42] post composition apply failed
07-15 15:53:35.180 556 621 E C02500/DISP: [SetLayerMaskInfo:344] <private> is not supported
07-15 15:53:35.180 556 621 E C02500/DISP_CMD: 823@OnSetLayerMaskInfo: check failed
07-15 15:53:35.188 556 621 E C02500/DISP: [SetDisplayClientDamage:156] <private> is not supported
07-15 15:53:35.188 556 621 E C02500/DISP_CMD: OnSetDisplayClientDamage, SetDisplayClientDamage error
07-15 15:53:35.211 556 621 E C02500/DISP: [Apply:269] plane not enough
07-15 15:53:35.212 556 621 E C02500/DISP: [Commit:42] post composition apply failed
07-15 15:53:38.556 575 1274 I C01510/IPCObjectProxy: 58: handle = 4 create, descriptor: IPCObjectProxy4
07-15 15:54:00.079 556 621 E C02500/DISP: [SetLayerMaskInfo:344] <private> is not supported
07-15 15:54:00.079 556 621 E C02500/DISP_CMD: 823@OnSetLayerMaskInfo: check failed
07-15 15:54:00.091 556 621 E C02500/DISP: [SetDisplayClientDamage:156] <private> is not supported
07-15 15:54:00.091 556 621 E C02500/DISP_CMD: OnSetDisplayClientDamage, SetDisplayClientDamage error
07-15 15:54:00.153 556 621 E C02500/DISP: [Apply:269] plane not enough
07-15 15:54:00.153 556 621 E C02500/DISP: [Commit:42] post composition apply failed
分析:
使用modetest:modetest -D display-subsystem -a -s 208@115:1920x1200 -P 101@115:1920x1200
测试屏幕是可以显示的,说明edp显示驱动移植上了。然后composer_host报错,显示合成这块的修改参考:rk3568开发板4.0 Release版本cpu点屏过程总结_error-Laval社区 (csdn.net),切换为CPU点屏,关闭GPU相关组件,合成代码只修改了hdi_gfx_composition.cpp的内容,想使用hello_composer测试hdi接口,所以CanHandle接口返回True。
修改后,开机发现composer_host报错,然后执行hello_composer命令,composer_host报错重启。从log上看,好像是图层的问题,这块不太了解,请大佬们指点迷津
07-15 15:53:35.179 556 621 E C02500/DISP: [Apply:269] plane not enough,你那边如果用的是社区上的代码(如下),需注意:
if (plane->GetId() != 105)
std::vector<std::shared_ptr<DrmPlane>> DrmDevice::GetDrmPlane(uint32_t pipe, uint32_t type)
{
std::vector<std::shared_ptr<DrmPlane>> planes;
for (const auto &plane : mPlanes) {
if (plane->GetId() != 105)
continue;
if (plane->IsIdle() && ((1 << pipe) & plane->GetPossibleCrtcs()) && (type == plane->GetType())) {
planes.push_back(plane);
}
}
DISPLAY_LOGD("the planes count %{public}zd", planes.size());
return planes;
}