Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • Users
  • Groups
  • Search
  • Get Qt Extensions
  • Unsolved
Collapse
Brand Logo
  1. Home
  2. Qt Development
  3. Mobile and Embedded
  4. Not able to render QT 5.6.3 and KMS/DRM backend on Nvidia TX2
Forum Updated to NodeBB v4.3 + New Features

Not able to render QT 5.6.3 and KMS/DRM backend on Nvidia TX2

Scheduled Pinned Locked Moved Unsolved Mobile and Embedded
1 Posts 1 Posters 587 Views
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • M Offline
    M Offline
    MarchMartin
    wrote on last edited by
    #1

    Hi,

    I have a QT QApplication on Nvidia TX2 that renders on HDMI.
    X11 is completely disabled and not present in system.
    I use KMS/DRM as plaform for rendering, hence my QT startup configuration is:

    QT_QPA_EGLFS_LAYER_INDEX = 2
    QT_QPA_EGLFS_KMS_PLANE_INDEX = 1
    QT_QPA_EGLFS_KMS_CONNECTOR_INDEX = 0
    QT_QPA_PLATFORM = eglfs
    QT_QPA_EGLFS_INTEGRATION = eglfs_kms_egldevice
    QT_QPA_EGLFS_KMS_ATOMIC = 1
    QT_QPA_EGLFS_ALWAYS_SET_MODE = 1
    QCoreApplication::setAttribute(Qt::AA_ShareOpenGLContexts);

    Whereas these setting work on QT 5.12.x I am not able to make it work using QT 5.6.3, which is QT version I have to finally use.

    I see that KMS/DRM is supported https://doc.qt.io/archives/qt-5.6/embedded-linux.html

    I also see in log correct startup, see following log excerpt:

    ...
    loaded library "/usr/lib/qt5/plugins/egldeviceintegrations/libqeglfs-kms-egldevice-integration.so"
    qt.qpa.eglfs.kms: New DRM/KMS on EGLDevice integration created
    qt.qpa.egldeviceintegration: Using EGL device integration "eglfs_kms_egldevice"
    qt.qpa.eglfs.kms: Found 1 EGL devices
    qt.qpa.eglfs.kms: Opening drm-nvdc
    qt.qpa.eglfs.kms: Using connector with type 11
    qt.qpa.eglfs.kms: Using crtc 1000 with mode 1920 x 1200 @ 59
    qt.qpa.eglfs.kms: DRM/KMS initialized
    qt.qpa.eglfs.kms: Creating display
    ...
    qt.qpa.eglfs.kms: Creating stream
    qt.qpa.eglfs.kms: Created stream 0x5588cecd91 on display 0x5588b15f00
    qt.qpa.eglfs.kms: Output has 6 layers
    qt.qpa.eglfs.kms:   [0] layer 0x5588b1e0e1 - crtc 1000
    qt.qpa.eglfs.kms:   [1] layer 0x5588b1fde1 - crtc 1001
    qt.qpa.eglfs.kms:   [2] layer 0x5588b1fa11 - plane 4001
    qt.qpa.eglfs.kms:   [3] layer 0x5588b1fa41 - plane 4002
    qt.qpa.eglfs.kms:   [4] layer 0x5588b1faf1 - plane 4004
    qt.qpa.eglfs.kms:   [5] layer 0x5588b1fb21 - plane 4005
    qt.qpa.eglfs.kms: Using layer 0x5588b1fa11
    qt.qpa.eglfs.kms: Stream producer format is QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 0, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 0, samples 0, swapBehavior 0, swapInterval 1, profile  0)
    qt.qpa.eglfs.kms: Creating stream producer surface of size 1920x1200
    qt.qpa.eglfs.kms: Created stream producer surface 0x5588b2d611
    Created context for format QSurfaceFormat(version 2.0, options QFlags(), depthBufferSize 0, redBufferSize 8, greenBufferSize 8, blueBufferSize 8, alphaBufferSize 0, stencilBufferSize 0, samples 0, swapBehavior 2, swapInterval 1, profile  0) with config:
    	EGL_BUFFER_SIZE: 24
    	EGL_ALPHA_SIZE: 0
    	EGL_BLUE_SIZE: 8
    	EGL_GREEN_SIZE: 8
    	EGL_RED_SIZE: 8
    	EGL_DEPTH_SIZE: 0
    	EGL_STENCIL_SIZE: 0
    	EGL_CONFIG_CAVEAT: 12344
    	EGL_CONFIG_ID: 20
    	EGL_LEVEL: 0
    	EGL_MAX_PBUFFER_HEIGHT: 32768
    	EGL_MAX_PBUFFER_PIXELS: 1073741824
    	EGL_MAX_PBUFFER_WIDTH: 32768
    	EGL_NATIVE_RENDERABLE: 0
    	EGL_NATIVE_VISUAL_ID: 0
    	EGL_NATIVE_VISUAL_TYPE: 12344
    	EGL_SAMPLES: 0
    	EGL_SAMPLE_BUFFERS: 0
    	EGL_SURFACE_TYPE: 2049
    	EGL_TRANSPARENT_TYPE: 12344
    	EGL_TRANSPARENT_BLUE_VALUE: 0
    	EGL_TRANSPARENT_GREEN_VALUE: 0
    	EGL_TRANSPARENT_RED_VALUE: 0
    	EGL_BIND_TO_TEXTURE_RGB: 0
    	EGL_BIND_TO_TEXTURE_RGBA: 0
    	EGL_MIN_SWAP_INTERVAL: 0
    	EGL_MAX_SWAP_INTERVAL: 0
    ..
    
    • I tried various combinations in env, but no rendering works. I see that not all are available in version 5.6 e.g. QT_QPA_EGLFS_KMS_PLANE_INDEX
    • I checked that on both QT 5.6.3 and QT 5.12.4 device drm-nvdc is opened and layer plane 4001 is used for renderning.
    • fb0 win_mask setting is in both cases 0x38, which is what we need.
    • in both cases we use yocto recipes to build against. QT5.6.3 is https://layers.openembedded.org/layerindex/branch/krogoth/layer/meta-qt5/
    • No useful logs in kernel
    • Nvidia forum is not able to help on this issue

    Can you help me understand if QT 5.6.3 DRM is maybe not supported on Nvidia TX2 or if there is some different settings I have to use ?

    Thanks
    Martin

    1 Reply Last reply
    0

    • Login

    • Login or register to search.
    • First post
      Last post
    0
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Groups
    • Search
    • Get Qt Extensions
    • Unsolved