6.6.0 i.mx6 Running Qt application with DRM

Hello,

with BSP version 5 I run two applications on different framebuffer layers. On top a Qt program with cutout and a video application in the background.

After switching to BSP version 6.6.0 with new kernel, I want to use DRM for that (framebuffer overlay does not exist anymore, I can’t use Weston).

I enabled the eglfs kms integration, but when starting a simple Qt (QML) application, it crashes with this message:

EGL_EXT_device_base missing
Aborted

When calling eglinfo, I get only this message:

EGL client extensions string:
    EGL_EXT_client_extensions EGL_EXT_platform_base

What could be the problem?

Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello,

The error message “EGL_EXT_device_base missing” indicates that the required EGL extension is not available on your system. This extension is crucial for enabling hardware acceleration through the Direct Rendering Manager (DRM) in environments where Wayland or X11 is not being used, such as with the eglfs backend in Qt.

Here are some steps to troubleshoot and potentially resolve the issue:

  1. Verify EGL and DRM Support: Ensure that the GPU drivers and EGL libraries in your BSP support DRM and the necessary EGL extensions. For i.MX6 platforms, this typically involves Vivante GPU drivers. Check if there are updates or patches available for these drivers that include support for the required extensions.

  2. Qt Configuration: Make sure your Qt environment is correctly set up to use the eglfs backend. You might need to explicitly specify the backend when launching your application, using the -platform eglfs argument. Additionally, verify that your Qt build includes the eglfs module and it’s configured to use DRM/KMS.

  3. Kernel Configuration: The kernel must be configured with DRM support enabled. This includes enabling the Direct Rendering Manager (DRM) and the specific DRM driver for your GPU. For the i.MX6, this would typically be the etnaviv DRM driver. Check your kernel configuration (/proc/config.gz or the kernel config file) to ensure these options are enabled.

  4. Debugging EGL: Use tools like eglinfo to check the available EGL configurations and extensions. Since you mentioned eglinfo only shows limited extensions, this might indicate an issue with the EGL implementation or initialization. Ensure that the EGL libraries used by eglinfo and your Qt application are the ones provided with your BSP or GPU drivers.

  5. Environment Variables: Some GPU drivers require specific environment variables to be set for DRM/EGL to work correctly. For example, setting EGL_PLATFORM=drm can force EGL to use DRM. Check the documentation for your GPU drivers for any such requirements.

  6. Update Qt: If you’re not using the latest version of Qt supported by your BSP, consider updating. Newer versions of Qt have improved support for various backends and might include fixes for issues like the one you’re encountering.

If after following these steps the issue persists, it might be necessary to delve deeper into the specific GPU driver and EGL library implementation on your system. Since direct modifications to hardware or low-level driver code are beyond the scope of this support,

Please, also check if these links can help you solve your problem:

2D/3D Graphics Acceleration (GPU) | Toradex Developer Center.

Hi @sst

Thanks for contacting us. Can you give us some more information about the software you are using? Did you build the image on your own or use the multimedia image we provided?

Further, can you check if the display is working properly? Can you provide us the output of the following commands:

find /sys/class/drm/
modetest
for status in /sys/class/drm/card*-*; do echo $status; cat $status/status; done
wget https://raw.githubusercontent.com/toradex/tdx-info/master/tdx-info --output-document=tdx-info && sh ./tdx-info

You also have to have a kms configuration file in your file system. You can set it via QT_QPA_EGLFS_KMS_CONFIG. The options and how it has too look like is written in this article:

It should look something like this, depending on the display you use (/etc/kms.config):

{
  "device": "/dev/dri/card0",
    {
      "name": "HDMI1",
      "mode": "1920x1080"
    }
  ]
}

Before you start the application you might also want to increase the log level as follows:

export QT_LOGGING_RULES=qt.qpa.*=true
export QT_QPA_EGLFS_KMS_CONFIG=/etc/kms.config
export QT_QPA_PLATFORM=eglfs
export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
./your-application

Regards,
Stefan

Hello @stefan_e.tx

thank you for your reply.
It is our own image, I am not aware of a Toradex image with eglfs / kms qt plugin installed.
The display works in general (HDMI and LVDS version). Writing data to /dev/fb shows some content.

tree /sys/class/drm/
/sys/class/drm/
|-- card0 -> ../../devices/platform/etnaviv/drm/card0
|-- card1 -> ../../devices/platform/display-subsystem/drm/card1
|-- card1-HDMI-A-1 -> ../../devices/platform/display-subsystem/drm/card1/card1-HDMI-A-1
|-- renderD128 -> ../../devices/platform/etnaviv/drm/renderD128
`-- version
modetest
./modetest  
trying to open device 'i915'...failed
trying to open device 'amdgpu'...failed
trying to open device 'radeon'...failed
trying to open device 'nouveau'...failed
trying to open device 'vmwgfx'...failed
trying to open device 'omapdrm'...failed
trying to open device 'exynos'...failed
trying to open device 'tilcdc'...failed
trying to open device 'msm'...failed
trying to open device 'sti'...failed
trying to open device 'tegra'...failed
trying to open device 'imx-drm'...done
Encoders:
id	crtc	type	possible crtcs	possible clones	
65	36	TMDS	0x0000000f	0x00000001

Connectors:
id	encoder	status		name		size (mm)	modes	encoders
66	65	connected	HDMI-A-1       	600x340		24	65
  modes:
	index name refresh (Hz) hdisp hss hse htot vdisp vss vse vtot
  #0 1920x1080 60.00 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: preferred, driver
  #1 1920x1080 59.94 1920 2008 2052 2200 1080 1084 1089 1125 148352 flags: phsync, pvsync; type: driver
  #2 1920x1080i 30.00 1920 2008 2052 2200 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
  #3 1920x1080i 29.97 1920 2008 2052 2200 1080 1084 1094 1125 74176 flags: phsync, pvsync, interlace; type: driver
  #4 1920x1080 50.00 1920 2448 2492 2640 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: driver
  #5 1920x1080i 25.00 1920 2448 2492 2640 1080 1084 1094 1125 74250 flags: phsync, pvsync, interlace; type: driver
  #6 1600x1200 60.00 1600 1664 1856 2160 1200 1201 1204 1250 162000 flags: phsync, pvsync; type: driver
  #7 1280x1024 75.02 1280 1296 1440 1688 1024 1025 1028 1066 135000 flags: phsync, pvsync; type: driver
  #8 1280x1024 60.02 1280 1328 1440 1688 1024 1025 1028 1066 108000 flags: phsync, pvsync; type: driver
  #9 1152x864 75.00 1152 1216 1344 1600 864 865 868 900 108000 flags: phsync, pvsync; type: driver
  #10 1280x720 60.00 1280 1390 1430 1650 720 725 730 750 74250 flags: phsync, pvsync; type: driver
  #11 1280x720 59.94 1280 1390 1430 1650 720 725 730 750 74176 flags: phsync, pvsync; type: driver
  #12 1280x720 50.00 1280 1720 1760 1980 720 725 730 750 74250 flags: phsync, pvsync; type: driver
  #13 1024x768 75.03 1024 1040 1136 1312 768 769 772 800 78750 flags: phsync, pvsync; type: driver
  #14 1024x768 60.00 1024 1048 1184 1344 768 771 777 806 65000 flags: nhsync, nvsync; type: driver
  #15 800x600 75.00 800 816 896 1056 600 601 604 625 49500 flags: phsync, pvsync; type: driver
  #16 800x600 60.32 800 840 968 1056 600 601 605 628 40000 flags: phsync, pvsync; type: driver
  #17 720x576 50.00 720 732 796 864 576 581 586 625 27000 flags: nhsync, nvsync; type: driver
  #18 720x480 60.00 720 736 798 858 480 489 495 525 27027 flags: nhsync, nvsync; type: driver
  #19 720x480 59.94 720 736 798 858 480 489 495 525 27000 flags: nhsync, nvsync; type: driver
  #20 640x480 75.00 640 656 720 840 480 481 484 500 31500 flags: nhsync, nvsync; type: driver
  #21 640x480 60.00 640 656 752 800 480 490 492 525 25200 flags: nhsync, nvsync; type: driver
  #22 640x480 59.94 640 656 752 800 480 490 492 525 25175 flags: nhsync, nvsync; type: driver
  #23 720x400 70.08 720 738 846 900 400 412 414 449 28320 flags: nhsync, pvsync; type: driver
  props:
	1 EDID:
		flags: immutable blob
		blobs:

		value:
			00ffffffffffff0010acd84053373936
			21190103803c2278ea6e35a855529f27
			0f5054a54b00714f8180a940d1c00101
			010101010101023a801871382d40582c
			450056502100001e000000ff00373630
			5048353844363937530a000000fc0044
			454c4c20534532373136480a000000fd
			00384c1e5311000a20202020202001d8
			020326f14f9005040302071601061112
			1513141f2309070765030c0010008301
			0000e3050301023a801871382d40582c
			450056502100001e011d8018711c1620
			582c250056502100009e011d007251d0
			1e206e28550056502100001e8c0ad08a
			20e02d10103e96005650210000180000
			00000000000000000000000000000059
	2 DPMS:
		flags: enum
		enums: On=0 Standby=1 Suspend=2 Off=3
		value: 0
	5 link-status:
		flags: enum
		enums: Good=0 Bad=1
		value: 0
	6 non-desktop:
		flags: immutable range
		values: 0 1
		value: 0
	4 TILE:
		flags: immutable blob
		blobs:

		value:
	67 max bpc:
		flags: range
		values: 8 16
		value: 0

CRTCs:
id	fb	pos	size
36	68	(0,0)	(1920x1080)
  #0 1920x1080 60.00 1920 2008 2052 2200 1080 1084 1089 1125 148500 flags: phsync, pvsync; type: preferred, driver
  props:
	24 VRR_ENABLED:
		flags: range
		values: 0 1
		value: 0
47	0	(0,0)	(0x0)
  #0  nan 0 0 0 0 0 0 0 0 0 flags: ; type: 
  props:
	24 VRR_ENABLED:
		flags: range
		values: 0 1
		value: 0
53	0	(0,0)	(0x0)
  #0  nan 0 0 0 0 0 0 0 0 0 flags: ; type: 
  props:
	24 VRR_ENABLED:
		flags: range
		values: 0 1
		value: 0
64	0	(0,0)	(0x0)
  #0  nan 0 0 0 0 0 0 0 0 0 flags: ; type: 
  props:
	24 VRR_ENABLED:
		flags: range
		values: 0 1
		value: 0

Planes:
id	crtc	fb	CRTC x,y	x,y	gamma size	possible crtcs
31	36	68	0,0		0,0	0       	0x00000001
  formats: AR15 XR15 AB15 XB15 RA15 BA15 AR12 AR24 XR24 AB24 XB24 RA24 RX24 BA24 BX24 UYVY VYUY YUYV YVYU YU12 YV12 YU16 YV16 YU24 YV24 NV12 NV16 RG16 R5A8 B5A8 R8A8 B8A8 RXA8 BXA8
  props:
	8 type:
		flags: immutable enum
		enums: Overlay=0 Primary=1 Cursor=2
		value: 1
	30 IN_FORMATS:
		flags: immutable blob
		blobs:

		value:
			01000000000000002200000018000000
			01000000a00000004152313558523135
			41423135584231355241313542413135
			41523132415232345852323441423234
			58423234524132345258323442413234
			42583234555956595659555959555956
			59565955595531325956313259553136
			5956313659553234595632344e563132
			4e563136524731365235413842354138
			52384138423841385258413842584138
			ffffffff030000000000000000000000
			0000000000000000
		in_formats blob decoded:
			 AR15:  LINEAR
			 XR15:  LINEAR
			 AB15:  LINEAR
			 XB15:  LINEAR
			 RA15:  LINEAR
			 BA15:  LINEAR
			 AR12:  LINEAR
			 AR24:  LINEAR
			 XR24:  LINEAR
			 AB24:  LINEAR
			 XB24:  LINEAR
			 RA24:  LINEAR
			 RX24:  LINEAR
			 BA24:  LINEAR
			 BX24:  LINEAR
			 UYVY:  LINEAR
			 VYUY:  LINEAR
			 YUYV:  LINEAR
			 YVYU:  LINEAR
			 YU12:  LINEAR
			 YV12:  LINEAR
			 YU16:  LINEAR
			 YV16:  LINEAR
			 YU24:  LINEAR
			 YV24:  LINEAR
			 NV12:  LINEAR
			 NV16:  LINEAR
			 RG16:  LINEAR
			 R5A8:  LINEAR
			 B5A8:  LINEAR
			 R8A8:  LINEAR
			 B8A8:  LINEAR
	33 zpos:
		flags: range
		values: 0 1
		value: 0
	34 COLOR_ENCODING:
		flags: enum
		enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1
		value: 0
	35 COLOR_RANGE:
		flags: enum
		enums: YCbCr limited range=0
		value: 0
37	0	0	0,0		0,0	0       	0x00000001
  formats: AR15 XR15 AB15 XB15 RA15 BA15 AR12 AR24 XR24 AB24 XB24 RA24 RX24 BA24 BX24 UYVY VYUY YUYV YVYU YU12 YV12 YU16 YV16 YU24 YV24 NV12 NV16 RG16 R5A8 B5A8 R8A8 B8A8 RXA8 BXA8
  props:
	8 type:
		flags: immutable enum
		enums: Overlay=0 Primary=1 Cursor=2
		value: 0
	30 IN_FORMATS:
		flags: immutable blob
		blobs:

		value:
			01000000000000002200000018000000
			01000000a00000004152313558523135
			41423135584231355241313542413135
			41523132415232345852323441423234
			58423234524132345258323442413234
			42583234555956595659555959555956
			59565955595531325956313259553136
			5956313659553234595632344e563132
			4e563136524731365235413842354138
			52384138423841385258413842584138
			ffffffff030000000000000000000000
			0000000000000000
		in_formats blob decoded:
			 AR15:  LINEAR
			 XR15:  LINEAR
			 AB15:  LINEAR
			 XB15:  LINEAR
			 RA15:  LINEAR
			 BA15:  LINEAR
			 AR12:  LINEAR
			 AR24:  LINEAR
			 XR24:  LINEAR
			 AB24:  LINEAR
			 XB24:  LINEAR
			 RA24:  LINEAR
			 RX24:  LINEAR
			 BA24:  LINEAR
			 BX24:  LINEAR
			 UYVY:  LINEAR
			 VYUY:  LINEAR
			 YUYV:  LINEAR
			 YVYU:  LINEAR
			 YU12:  LINEAR
			 YV12:  LINEAR
			 YU16:  LINEAR
			 YV16:  LINEAR
			 YU24:  LINEAR
			 YV24:  LINEAR
			 NV12:  LINEAR
			 NV16:  LINEAR
			 RG16:  LINEAR
			 R5A8:  LINEAR
			 B5A8:  LINEAR
			 R8A8:  LINEAR
			 B8A8:  LINEAR
	39 zpos:
		flags: range
		values: 0 1
		value: 1
	40 COLOR_ENCODING:
		flags: enum
		enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1
		value: 0
	41 COLOR_RANGE:
		flags: enum
		enums: YCbCr limited range=0
		value: 0
42	0	0	0,0		0,0	0       	0x00000002
  formats: AR15 XR15 AB15 XB15 RA15 BA15 AR12 AR24 XR24 AB24 XB24 RA24 RX24 BA24 BX24 RG16 R5A8 B5A8 R8A8 B8A8 RXA8 BXA8
  props:
	8 type:
		flags: immutable enum
		enums: Overlay=0 Primary=1 Cursor=2
		value: 1
	30 IN_FORMATS:
		flags: immutable blob
		blobs:

		value:
			01000000000000001600000018000000
			01000000700000004152313558523135
			41423135584231355241313542413135
			41523132415232345852323441423234
			58423234524132345258323442413234
			42583234524731365235413842354138
			52384138423841385258413842584138
			ffff3f00000000000000000000000000
			0000000000000000
		in_formats blob decoded:
			 AR15:  LINEAR
			 XR15:  LINEAR
			 AB15:  LINEAR
			 XB15:  LINEAR
			 RA15:  LINEAR
			 BA15:  LINEAR
			 AR12:  LINEAR
			 AR24:  LINEAR
			 XR24:  LINEAR
			 AB24:  LINEAR
			 XB24:  LINEAR
			 RA24:  LINEAR
			 RX24:  LINEAR
			 BA24:  LINEAR
			 BX24:  LINEAR
			 RG16:  LINEAR
			 R5A8:  LINEAR
			 B5A8:  LINEAR
			 R8A8:  LINEAR
			 B8A8:  LINEAR
			 RXA8:  LINEAR
			 BXA8:  LINEAR
	44 zpos:
		flags: immutable range
		values: 0 0
		value: 0
	45 COLOR_ENCODING:
		flags: enum
		enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1
		value: 0
	46 COLOR_RANGE:
		flags: enum
		enums: YCbCr limited range=0
		value: 0
48	0	0	0,0		0,0	0       	0x00000004
  formats: AR15 XR15 AB15 XB15 RA15 BA15 AR12 AR24 XR24 AB24 XB24 RA24 RX24 BA24 BX24 UYVY VYUY YUYV YVYU YU12 YV12 YU16 YV16 YU24 YV24 NV12 NV16 RG16 R5A8 B5A8 R8A8 B8A8 RXA8 BXA8
  props:
	8 type:
		flags: immutable enum
		enums: Overlay=0 Primary=1 Cursor=2
		value: 1
	30 IN_FORMATS:
		flags: immutable blob
		blobs:

		value:
			01000000000000002200000018000000
			01000000a00000004152313558523135
			41423135584231355241313542413135
			41523132415232345852323441423234
			58423234524132345258323442413234
			42583234555956595659555959555956
			59565955595531325956313259553136
			5956313659553234595632344e563132
			4e563136524731365235413842354138
			52384138423841385258413842584138
			ffffffff030000000000000000000000
			0000000000000000
		in_formats blob decoded:
			 AR15:  LINEAR
			 XR15:  LINEAR
			 AB15:  LINEAR
			 XB15:  LINEAR
			 RA15:  LINEAR
			 BA15:  LINEAR
			 AR12:  LINEAR
			 AR24:  LINEAR
			 XR24:  LINEAR
			 AB24:  LINEAR
			 XB24:  LINEAR
			 RA24:  LINEAR
			 RX24:  LINEAR
			 BA24:  LINEAR
			 BX24:  LINEAR
			 UYVY:  LINEAR
			 VYUY:  LINEAR
			 YUYV:  LINEAR
			 YVYU:  LINEAR
			 YU12:  LINEAR
			 YV12:  LINEAR
			 YU16:  LINEAR
			 YV16:  LINEAR
			 YU24:  LINEAR
			 YV24:  LINEAR
			 NV12:  LINEAR
			 NV16:  LINEAR
			 RG16:  LINEAR
			 R5A8:  LINEAR
			 B5A8:  LINEAR
			 R8A8:  LINEAR
			 B8A8:  LINEAR
	50 zpos:
		flags: range
		values: 0 1
		value: 0
	51 COLOR_ENCODING:
		flags: enum
		enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1
		value: 0
	52 COLOR_RANGE:
		flags: enum
		enums: YCbCr limited range=0
		value: 0
54	0	0	0,0		0,0	0       	0x00000004
  formats: AR15 XR15 AB15 XB15 RA15 BA15 AR12 AR24 XR24 AB24 XB24 RA24 RX24 BA24 BX24 UYVY VYUY YUYV YVYU YU12 YV12 YU16 YV16 YU24 YV24 NV12 NV16 RG16 R5A8 B5A8 R8A8 B8A8 RXA8 BXA8
  props:
	8 type:
		flags: immutable enum
		enums: Overlay=0 Primary=1 Cursor=2
		value: 0
	30 IN_FORMATS:
		flags: immutable blob
		blobs:

		value:
			01000000000000002200000018000000
			01000000a00000004152313558523135
			41423135584231355241313542413135
			41523132415232345852323441423234
			58423234524132345258323442413234
			42583234555956595659555959555956
			59565955595531325956313259553136
			5956313659553234595632344e563132
			4e563136524731365235413842354138
			52384138423841385258413842584138
			ffffffff030000000000000000000000
			0000000000000000
		in_formats blob decoded:
			 AR15:  LINEAR
			 XR15:  LINEAR
			 AB15:  LINEAR
			 XB15:  LINEAR
			 RA15:  LINEAR
			 BA15:  LINEAR
			 AR12:  LINEAR
			 AR24:  LINEAR
			 XR24:  LINEAR
			 AB24:  LINEAR
			 XB24:  LINEAR
			 RA24:  LINEAR
			 RX24:  LINEAR
			 BA24:  LINEAR
			 BX24:  LINEAR
			 UYVY:  LINEAR
			 VYUY:  LINEAR
			 YUYV:  LINEAR
			 YVYU:  LINEAR
			 YU12:  LINEAR
			 YV12:  LINEAR
			 YU16:  LINEAR
			 YV16:  LINEAR
			 YU24:  LINEAR
			 YV24:  LINEAR
			 NV12:  LINEAR
			 NV16:  LINEAR
			 RG16:  LINEAR
			 R5A8:  LINEAR
			 B5A8:  LINEAR
			 R8A8:  LINEAR
			 B8A8:  LINEAR
	56 zpos:
		flags: range
		values: 0 1
		value: 1
	57 COLOR_ENCODING:
		flags: enum
		enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1
		value: 0
	58 COLOR_RANGE:
		flags: enum
		enums: YCbCr limited range=0
		value: 0
59	0	0	0,0		0,0	0       	0x00000008
  formats: AR15 XR15 AB15 XB15 RA15 BA15 AR12 AR24 XR24 AB24 XB24 RA24 RX24 BA24 BX24 RG16 R5A8 B5A8 R8A8 B8A8 RXA8 BXA8
  props:
	8 type:
		flags: immutable enum
		enums: Overlay=0 Primary=1 Cursor=2
		value: 1
	30 IN_FORMATS:
		flags: immutable blob
		blobs:

		value:
			01000000000000001600000018000000
			01000000700000004152313558523135
			41423135584231355241313542413135
			41523132415232345852323441423234
			58423234524132345258323442413234
			42583234524731365235413842354138
			52384138423841385258413842584138
			ffff3f00000000000000000000000000
			0000000000000000
		in_formats blob decoded:
			 AR15:  LINEAR
			 XR15:  LINEAR
			 AB15:  LINEAR
			 XB15:  LINEAR
			 RA15:  LINEAR
			 BA15:  LINEAR
			 AR12:  LINEAR
			 AR24:  LINEAR
			 XR24:  LINEAR
			 AB24:  LINEAR
			 XB24:  LINEAR
			 RA24:  LINEAR
			 RX24:  LINEAR
			 BA24:  LINEAR
			 BX24:  LINEAR
			 RG16:  LINEAR
			 R5A8:  LINEAR
			 B5A8:  LINEAR
			 R8A8:  LINEAR
			 B8A8:  LINEAR
			 RXA8:  LINEAR
			 BXA8:  LINEAR
	61 zpos:
		flags: immutable range
		values: 0 0
		value: 0
	62 COLOR_ENCODING:
		flags: enum
		enums: ITU-R BT.601 YCbCr=0 ITU-R BT.709 YCbCr=1
		value: 0
	63 COLOR_RANGE:
		flags: enum
		enums: YCbCr limited range=0
		value: 0

Frame buffers:
id	size	pitch
$ for status in /sys/class/drm/card*-*; do echo $status; cat $status/status; done
/sys/class/drm/card1-HDMI-A-1
connected
sudo sh tdx-info
cat: /etc/hostname: No such file or directory

Software summary
------------------------------------------------------------
Bootloader:               U-Boot
Kernel version:           6.1.80+git.a3eb3a74aa8c #1 SMP Fri Mar  1 12:26:39 UTC 2024
Kernel command line:      enable_wait_mode=off vmalloc=400M dmfc=3 ip=off root=/dev/mmcblk0p2 ro rootfstype=ext4 rootwait fec_mac=00:14:2d:81:b6:53 consoleblank=0 no_console_suspend=1 console=,115200n8 vt.global_cursor_default=0 video=mxc_hdmi.only_cea=1 video=mxcfb1:dev=hdmi,1920x1080M@60,if=RGB24 fbmem=32M
Distro name:              NAME="elrond with TDX as base"
Distro version:           VERSION_ID=6.6.0-devel-20240327122627-build.0
Distro variant:           -
Hostname:                 -
------------------------------------------------------------

Hardware info
------------------------------------------------------------
HW model:                 Toradex Apalis iMX6Q/D Module on fpc-04 Board
Toradex version:          0027 V1.1B
Serial number:            08500819
Processor arch:           armv7l
------------------------------------------------------------
cat $QT_QPA_EGLFS_KMS_CONFIG
{
  "device": "/dev/dri/card1",
  "hwcursor": false,
  "outputs":
  [
    {
      "name": "HDMI-A-1",
      "mode": "1920x1080",
      "virtualIndex": 0
    }
  ]
}
$ echo $QT_QPA_PLATFORM
eglfs
$ echo $QT_QPA_EGLFS_INTEGRATION
eglfs_kms_egldevice

Starting the test program:

./qml-drm-test
qt.qpa.egldeviceintegration: EGL device integration plugin keys: ("eglfs_emu", "eglfs_kms_egldevice", "eglfs_viv")
qt.qpa.egldeviceintegration: EGL device integration plugin keys (sorted): ("eglfs_kms_egldevice", "eglfs_emu", "eglfs_viv")
qt.qpa.egldeviceintegration: Trying to load device EGL integration "eglfs_kms_egldevice"
qt.qpa.eglfs.kms: Loading KMS setup from "/etc/calumatouch-kms.conf"
qt.qpa.eglfs.kms: Requested configuration (some settings may be ignored):
 	headless: false 
 	hwcursor: false 
 	pbuffers: false 
 	separateScreens: false 
 	virtualDesktopLayout: 0 
 	outputs: QMap(("HDMI-A-1", QMap(("mode", QVariant(QString, "1920x1080"))("name", QVariant(QString, "HDMI-A-1"))("virtualIndex", QVariant(qlonglong, 0)))))
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: platformInit: Opening DRM device
EGL_EXT_device_base missing
Aborted

Hi @sst

I think Qt somehow uses a different name for the connectors. Can you try the following kms configuration:

{
  "device": "/dev/dri/card1",
  "hwcursor": false,
  "outputs": [
    { "name": "HDMI1", "mode": "1920x1080", "size": "1920x1080"}
  ]
}

Regards,
Stefan

Hi @sst

Did changing the connector name help?

Regards,
Stefan

Sorry for the delay, I forgot to click the “Reply” button after writing.

The main problem was a mismatch between kernel / driver and libraries.
IMX_DEFAULT_BSP = "mainline" in the Yocto recipes solved it for me.

However, I don’t know how to set the kms / drm layer for the applications.
I want the Qt application on the overlay layer (37) and the gstreamer application on the primary layer (31)

When the frame buffer emulation was enabled, the Qt test application and the gstreamer kmssink always used the overlay layer.

After disabling the framebuffer emulation, both applications always want to use the primary layer.
Example Qt:

QT_QPA_EGLFS_KMS_PLANE_INDEX=1 Qt seems not to use the plane IDs, but counts from 0(?)

Log:

qt.qpa.eglfs.kms: Output LVDS1 can use 2 planes: 31 37 
qt.qpa.eglfs.kms: Forcing plane index 1, plane id 37 (belongs to crtc id 0)
qt.qpa.eglfs.kms: Chose plane 37 for output LVDS1 (crtc id 36) (may not be applicable)
...
qt.qpa.eglfs.kms: Creating gbm_surface for screen LVDS1
qt.qpa.eglfs.kms: Got native format 34325258 from eglGetConfigAttrib() with return code true
qt.qpa.eglfs.kms: Adding FB, size 1280x800, DRM format 0x34325258
qt.qpa.eglfs.kms: Setting mode for screen LVDS1
Could not set DRM mode for screen LVDS1 (Permission denied)
Could not queue DRM page flip on screen LVDS1 (Permission denied)
qt.qpa.input: evdevtouch: Updating QInputDeviceManager device count: 1 touch devices, 0 pending handler(s)

In the current log, LVDS is used, but it’s the same problem with HDMI.

The log shows that plane 37 is used, but when checking with modetest, I can see that it uses plane 31. If the primary plane 31 is already in use, there is also a conflict leading to “permission denied”.

It is similar with gstreamer. When starting this pipeline
gst-launch-1.0 videotestsrc ! kmssink driver-name=imx-drm connector-id=66 plane-id=37
it still uses plane 31. But that’s not a big problem at the moment because I want it to use 31 anyway.

Hi @sst

This more looks like something Qt specific, maybe you can ask in their community forum if this is a known issue. From a short look at the code, I’m unsure if Qt can draw on an overlay plane or if it expects it to be a primary plane. However, you might also want to test if it works when you use the atomic API:

export QT_QPA_EGLFS_KMS_ATOMIC=1

What happens if you start your application normally and then start a video with kmssink? According to this kmssink ( force-modesetting) it should automatically select an overlay plane. However, not sure if this works.

Regards,
Stefan