前往小程序,Get更优阅读体验!
立即前往
首页
学习
活动
专区
工具
TVP
发布
社区首页 >专栏 >【分享】在MPSoC ZCU106单板的HDMI-Tx上基于eglfs_kms的运行QT应用程序

【分享】在MPSoC ZCU106单板的HDMI-Tx上基于eglfs_kms的运行QT应用程序

作者头像
hankfu
发布2021-09-26 11:15:23
1.8K0
发布2021-09-26 11:15:23
举报
文章被收录于专栏:hankhankhank

在MPSoC ZCU106单板的HDMI-Tx上基于eglfs_kms的运行QT应用程序

按照在MPSoC上运行基于eglfs_kms的QT应用程序, 可以在MPSoC ZCU106单板的DP上基于eglfs_kms的运行QT应用程序。按照在VCUTRD 2020.1 里设置HDMI-TX显示QT界面, 可以在MPSoC ZCU106单板的HDMI-Tx上基于X11的运行QT应用程序。在HDMI-Tx上,基于eglfs_kms的运行QT应用程序,遇到了下列两个错误。

错误1

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/var/volatile/tmp/runtime-root'
Setting framebuffer size is only available with DRM atomic API
Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.
Could not queue DRM page flip on screen HDMI1 (Invalid argument)
Could not queue DRM page flip on screen HDMI1 (Invalid argument)

错误2

QStandardPaths: XDG_RUNTIME_DIR not set, defaulting to '/var/volatile/tmp/runtime-root'
Framebuffer size format is invalid.
Attribute Qt::AA_ShareOpenGLContexts must be set before QCoreApplication is created.
Failed to commit atomic request (code=-22)

基于在VCUTRD 2020.1 里设置HDMI-TX显示QT界面做更改后,执行下列命令,可以在MPSoC ZCU106单板的DP上基于eglfs_kms的运行QT应用程序。其中的display_device和 connector_id,需要根据单板更改。display_device一般是类似a0070000.v_mix的格式,可以通过“dmesg | grep v_mix”查到。connector_id,可以在“modetest -D display_device”的输出里查找, 也可以根据检查Linux DRM显示设备ID的脚本 得到。

update-alternatives --install /usr/lib/libMali.so.9.0 libmali /usr/lib/wayland/libMali.so.9.0 90

echo Y > /sys/module/xlnx_mixer/parameters/mixer_primary_enable

modetest -D $display_device -s $connector_id:1920x1080-60@AR24

killall Xorg
cat /run/kms.conf

export QT_QPA_PLATFORM="eglfs"
export QT_QPA_EGLFS_KMS_ATOMIC=1
export QT_QPA_EGLFS_INTEGRATION="eglfs_kms"
export QT_QPA_EGLFS_KMS_CONFIG="/run/kms.conf"
export QT_QPA_EGLFS_DEBUG="1"
export QT_QPA_EGLFS_FORCE888=1

# chmod +x /run/qt5everywheredemo-1.0/QtDemo
# /run/qt5everywheredemo-1.0/QtDemo

ls -l /usr/share/examples/opengl/
/usr/share/examples/opengl/cube/cube
/usr/share/examples/opengl/textures/textures

如果运行失败,有时执行“ctrl+c”还不能退出QT应用程序cube和textures,还需要执行命令“kill -9 ”, 或者“killall -9 cube”,才能让其退出。

上述的/run/kms.conf内容如下:

{
  "device": "/dev/dri/card1",
  "hwcursor": false,
  "pbuffers": true,
  "outputs": [
    {
      "name": "HDMI",
      "mode": "1920x1080"
    }
  ]
}
本文参与 腾讯云自媒体分享计划,分享自作者个人站点/博客。
原始发表:2021-09-16 ,如有侵权请联系 cloudcommunity@tencent.com 删除

本文分享自 作者个人站点/博客 前往查看

如有侵权,请联系 cloudcommunity@tencent.com 删除。

本文参与 腾讯云自媒体分享计划  ,欢迎热爱写作的你一起参与!

评论
登录后参与评论
0 条评论
热度
最新
推荐阅读
目录
  • 在MPSoC ZCU106单板的HDMI-Tx上基于eglfs_kms的运行QT应用程序
领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档