大家好, 最近移植Qt5.12到海思的3516C平台上,编译和运行测试代码都没有报错(中间有一些报错已经解决了),但是显示不出来窗体界面,不知道什么原因;
使用海思sdk里的sample_hifb例子,例子运行正常,可以显示,但是启动qt程序后,示例代码的界面会被刷掉,但是屏幕上什么也不显示。
显示是基于linuxfb插件,修改插件里的代码加一些打印信息:
xres= 1280
yres = 720
xres_virtual = 1280
yres_virtual = 720
xoffset = 0
yoffset = 0
bits_per_pixel = 16
grayscale = 0
height = 0
width = 0
finfo.line_length: 2560
*******************
[ui]: depth: 16
[ui]: in determineFormat, depth: 15
QLinuxFbScreen::initialize()
mBytesPerLine: 2560
mMmap.size: 16588800
mGeometry: QRect(0,0 1280x720)
mPhysicalSize: QSizeF(325, 183)
不知道和Format有没有关系;
通过查看linuxfb的代码,看到里面并没有修改fb的参数,只要sample_hifb里有修改,sample_hifb启动后,打开了Vo设备,初始化好fb,然后启动qt,就是看不到界面……
大家有没有遇到过这个问题的,帮提一个排除问题的思路,谢谢!
qt交叉编译选项配置:
./configure -prefix /opt/qt5.12-arm/\
-release -opensource -make libs \
-xplatform linux-hisiv500-g++ \
-optimized-qmake \
-pch \
-qt-libjpeg \
-qt-libpng \
-qt-zlib \
-qpa linuxfb \
-no-opengl \
-skip qt3d \
-skip qtcanvas3d \
-skip qtpurchasing \
-no-sse2 \
-no-openssl \
-no-cups \
-no-glib \
-no-iconv \
-no-pch\
-nomake examples \
-nomake tools \
-skip qtvirtualkeyboard \
-tslib \
-I/opt/tslib5/include \
-L/opt/tslib5/lib \
-recheck-all
下面是海思的hifb0信息:
cat /proc/umap/hifb0
layer name :layer_0
Open count :0
Show state :OFF
Start position :(0, 0)
xres, yres :(1280, 720)
xres_virtual, yres_virtual :(1280, 720)
xoffset, yoffset :(0, 0)
fix.line_length :2560
Mem size: :16200 KB
Layer Scale (hw): :NO
ColorFormat: :ARGB1555
Alpha Enable :ON
AlphaChannel Enable :OFF
Alpha0, Alpha1 :0, 255
Alpha Global :255
Colorkey Enable :ON
Colorkey value :0x0
Deflicker Mode: :NONE
Deflicker Level: :AUTO
Filter Mode: :COLOR
Display Buffer mode :triple
Displaying addr (register) :0x8f58a000
display buffer[0] addr :0x8f58a000
display buffer[1] addr :0x8f74c000
displayrect :(1280, 720)
screenrect :(1280, 720)
device max resolution :1280, 720
IsNeedFlip(2buf) :NO
BufferIndexDisplaying(2buf) :0
refresh request num(2buf) :0
switch buf num(2buf) :0
union rect (2buf) :(0,0,0,0)
canavas updated addr :0x0
canavas updated (x, y, w, h) :(0,0,0,0)
canvas width :0
canvas height :0
canvas pitch :0
canvas format :RGB565
IsCompress :NO
Is DDR Dettect :NO
DDR Detect Zones :0
PreMul Enable :OFF