QT5.3.1 QPainter/KMS Issues



  • Hello, I'm working on an embedded Linux ARM platform (KMS & OpenGL ES), and I'm currently working on moving from QT 5.1.0 to 5.3.1 (latest). There seems to be a few unexpected issues with this transistion because the QML, OpenGL and QPainter examples are no longer working. A few examples report the following errors: "no screens available, assuming 24-bit color", "Cannot create window: no screens available".

    I took it upon myself to debug this and determined the cause was during the udev device discovery. In the QKmsIntegration constructor both QDeviceDiscovery::Device_DRM and QDeviceDiscovery::Device_DRM_PrimaryGPU are set. As a result, the scan only returns the DRI device node if there is an associated PCI parent device (due to Device_DRM_PrimaryGPU). For my purposes, this is not the case because the primary GPU (only one present) is defined on-chip.

    I managed to fix this by removing the QDeviceDiscovery::Device_DRM_PrimaryGPU device type in the QKmsIntegration constructor. This issue was actually caused by the following bug fix: "Find primary GPU only" https://qt.gitorious.org/qt/tavestbos-qtbase/commit/888bfb09da4367a2eebe41a1a086a802449d2af6.

    Now this fixed most of the QML and OpenGL examples, but the QPainter examples (e.g. 2dpainting) are still not working as expected. The following output text is from the 2dpainting example (examples/opengl/2dpainting). As you can see the DRM and GBM modules are initialized as expected, but there seems to be plugin issues that may be difficult to understand.

    I'm hoping that someone can provide me with additional information to assist me in debugging. This did work in QT5.1!

    @

    ./2dpainting

    failed to load module: /usr/lib/gbm/gbm_dri.so: cannot open shared object file: No such file or directory
    failed to load module: /usr/lib/gbm/gbm_gallium_drm.so: cannot open shared object file: No such file or directory
    loaded module: gbm_pvr.so
    PVR:(Warning): PVRSRVOpenDCDevice: Warning - 138 returned [80, /bridged_pvr_dc_glue.c]
    kms initialized with geometry QRect(0,0 1280x720)
    created gbm surface 0x2b0d0 1280 720
    created window surface
    created window surface
    created window surface
    This plugin does not support setParent!
    created window surface
    created window surface
    This plugin does not support setParent!
    This plugin does not support setParent!
    This plugin does not support setParent!
    This plugin does not support setParent!
    This plugin does not support propagateSizeHints()
    created window surface
    created window surface
    PVR:(Error): PrepareToDraw: Invalid drawable [1058, /sgxif.c]
    PVR:(Error): glDrawArrays: Can't prepare to draw [2403, /drawvarray.c]
    QOpenGLContext::swapBuffers() called with non-exposed window, behavior is undefined
    failed to set cursor: -6
    QOpenGLContext::makeCurrent() called with non-opengl surface 0x33cb8
    QOpenGLContext::swapBuffers() called with non-opengl surface
    QOpenGLContext::makeCurrent() called with non-opengl surface 0x3c738
    QOpenGLContext::swapBuffers() called with non-opengl surface
    QOpenGLContext::makeCurrent() called with non-opengl surface 0x3cb88
    QOpenGLContext::swapBuffers() called with non-opengl surface
    @


Log in to reply
 

Looks like your connection to Qt Forum was lost, please wait while we try to reconnect.