Weston doesn't start with g2d enabled on a custom imx93 board with MIPI display

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Weston doesn't start with g2d enabled on a custom imx93 board with MIPI display

跳至解决方案
1,246 次查看
abt
Contributor III

Hi,

I have deployed Linux (based on IMX Yocto Project LF6.1.55_2.2.0) on a custom iMX93 board. A MIPI (4 lanes) LCD Display is connected to the board. I am using a custom DTS with the kernel. The panel driver has been updated with manufacturer's provided initialization code and timing settings have been addressed. The panel shows the correct testing bar image when running the following modetest command:
modetest -M imx-drm -D 1 -a -s 35@33:800x1280 -P 31@33:800x1280

Weston, however, doesn't start with 'use-g2d=true' (weston.ini).
With 'use-g2d' disabled, weston will start, however all the windows will render very slow on the display panel.  When I test with '/usr/bin/weston-simple-egl', it reports ~8 fps, instead of ~60 fps (as I would expect when using g2d). 

Here is the extract from the weston.log with g2d related errors:

 

 

[10:02:08.254] weston 11.0.3
               https://wayland.freedesktop.org
               Bug reports to: https://gitlab.freedesktop.org/wayland/weston/issues/
               Build: 10.0.0-661-ga509c319+
[10:02:08.255] Command line: /usr/bin/weston --log=/run/user/0/weston.log --modules=systemd-notify.so
[10:02:08.255] OS: Linux, 6.1.55-00011-g95af9f676d77-dirty, #109 SMP PREEMPT Mon Apr  8 11:44:52 CDT 2024, aarch64
[10:02:08.255] Flight recorder: enabled
[10:02:08.255] Using config file '/etc/xdg/weston/weston.ini'
[10:02:08.255] Output repaint window is 16 ms maximum.
[10:02:08.255] Loading module '/usr/lib/libweston-11/drm-backend.so'
[10:02:08.259] initializing drm backend
[10:02:08.259] Trying logind launcher...
[10:02:08.275] logind: session control granted
[10:02:08.281] using /dev/dri/card0
[10:02:08.281] DRM: supports atomic modesetting
[10:02:08.281] DRM: does not support GBM modifiers
[10:02:08.281] DRM: supports picture aspect ratio
[10:02:08.282] Loading module '/usr/lib/libweston-11/g2d-renderer.so'
[10:02:08.314] g2d_open fail.
[10:02:08.314] g2d_renderer_create faile.
[10:02:08.315] failed to initialize g2d render

 

 

My /etc/xdg/weston/weston.ini:

 

 

[core]
use-g2d=true
repaint-window=16
gbm-format=argb8888
idle-time=0
#enable-overlay-view=1

[shell]

[libinput]
touchscreen_calibrator=true

#[output]
#name=HDMI-A-1
#mode=1920x1080@60
#transform=rotate-90

#[output]
#name=HDMI-A-2
#mode=off
#       WIDTHxHEIGHT    Resolution size width and height in pixels
#       off             Disables the output
#       preferred       Uses the preferred mode
#       current         Uses the current crt controller mode
#transform=rotate-90

[screen-share]
command=/usr/bin/weston --backend=rdp-backend.so --shell=fullscreen-shell.so --no-clients-resize
#start-on-startup=true

 

 

I am running an imx-image-multimedia that was built with fsl-imx-wayland distro for iMX93 MCU.

It seems like the following call fails within g2d-renderer.c :

if(g2d_open(&gr->handle))
{
	weston_log("g2d_open fail.\n");
	return -1;
}

 

Any idea why weston crashes at start when trying to open a g2d handle ? Has anyone experienced a similar issue? 

Any input appreciated.

0 项奖励
回复
1 解答
1,175 次查看
abt
Contributor III
I figured it out. I was missing a setting in the device tree.

在原帖中查看解决方案

0 项奖励
回复
5 回复数
427 次查看
abt
Contributor III

Hi elFunko,

As tim_cargt mentioned, this is the DT entry that I was missing:

&epxp {
	status = "okay";
};

 

0 项奖励
回复
400 次查看
elFunko
Contributor II
Hi Abt, thank you for the response. Unfortunately, I've already tried adding this node to the DT, but I'm still encountering the same issue. I'll will have to keep looking into this. If I find the cause i will share it here!
0 项奖励
回复
765 次查看
tim_cargt
Contributor III

Make sure the pixel pipleline is enabled in the device tree.

 

&epxp {
	status = "okay";
};
0 项奖励
回复
1,176 次查看
abt
Contributor III
I figured it out. I was missing a setting in the device tree.
0 项奖励
回复
483 次查看
elFunko
Contributor II
Hi Abt,
I'm currently facing the same issue. Could you perhaps share what the missing setting in the device tree was? That would be appreciated!
0 项奖励
回复