I added some debug code to qlinuxfbscreen. cpp to see what the imx driver was returning.
Here's the relevant code:
mDepth = determineDepth(vinfo);
mBytesPerLine = finfo.line_length;
QRect geometry = determineGeometry(vinfo, userGeometry);
mGeometry = QRect(QPoint(0, 0), geometry.size());
mFormat = determineFormat(vinfo, mDepth);
mPhysicalSize = determinePhysicalSize(vinfo, userMmSize, geometry.size());
// mmap the framebuffer
mMmap.size = finfo.smem_len;
uchar *data = (unsigned char *)mmap(0, mMmap.size, PROT_READ | PROT_WRITE, MAP_SHARED, mFbFd, 0);
if ((long)data == -1) {
qErrnoWarning(errno, "Failed to mmap framebuffer");
return false;
}
qDebug() << "QLinuxFbScreen::initialize()";
qDebug() << "mBytesPerLine: " << mBytesPerLine;
qDebug() << "mMmap.size: " << mMmap.size;
qDebug() << "mGeometry: " << mGeometry;
qDebug() << "mPhysicalSize: " << mPhysicalSize;
and here's the ouput:
QLinuxFbScreen::initialize()
mBytesPerLine: 1280
mMmap.size: 33554432
mGeometry: QRect(0,0 320x480)
mPhysicalSize: QSizeF(81, 122)
I don't know what mPhysicalSize is yet. mBytesPerLine is fine as is mGeometry. The size_t returned by the FB driver though is big enough for more than 54 screens!!! Probably a bit bigger than we need. This looks to be like a problem with the imx driver but it's not the reason that I'm not getting double buffering. That doesn't seem to me to be implemented in Qt5.8.