i.MX8MM Kernel crashes on 3D scene

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

i.MX8MM Kernel crashes on 3D scene

2,989 Views
Eric1994
Contributor III

We are using the Yocto Project BSP 5.10.72_2.2.1 Release;

We've been running some field tests on i.MX8M Mini, and we have found what seems to be a video driver issue. Since the application uses a lot of triangles in our 3D scene, when the number of triangles reaches a specific amount of video memory usage, the kernel crashes. No other geometric form, such as squares or lines, seems to cause this issue.

We developed a Qt application that reproduces the same behavior we've encountered running our main application. It's a simple 3D scene with a slider that increases the triangle count and, consequently, the video memory.

Kernel log files attached.

0 Kudos
Reply
19 Replies

2,712 Views
Eric1994
Contributor III

@Zhiming_Liu Any update?

0 Kudos
Reply

2,683 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Eric1994 

NXP is waiting for patch from VeriSilicon, then we can release new gpu driver/library for you.

0 Kudos
Reply

2,565 Views
Eric1994
Contributor III

How long will it take for VeriSilicon to update the gpu driver/library?

 
0 Kudos
Reply

2,546 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Not sure, VSI is still debugging this issue.

0 Kudos
Reply

2,442 Views
Eric1994
Contributor III

@Zhiming_Liu  Is it possible that we get a update solution within this week?

Tags (1)
0 Kudos
Reply

2,397 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Eric1994 

We are waiting reply from VSI, but unfortunately, no reply from them until now.

We have already asked them for many times.

 

Best Regards

Zhiming

0 Kudos
Reply

2,280 Views
Eric1994
Contributor III

Hi @Zhiming_Liu 

    Any update on the gpu bsp?

0 Kudos
Reply

2,076 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

@Eric1994 

Please check your email inbox.

0 Kudos
Reply

2,081 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Eric1994 

Fixed this issue, we will provide you library after finishing release process.

0 Kudos
Reply

2,152 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Eric1994 

Update: VSI found issue is coming from GPU userspace driver. We are waiting for solution.

0 Kudos
Reply

2,951 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

Hi @Eric1994 

What is the size of the RAM used on your i.MX8MM board?

Can you share the 3Dtest tool? 

0 Kudos
Reply

2,945 Views
Eric1994
Contributor III

The size of RAM if 2GB.

3Dtest application and kms.conf file in the attachment, run the application like this:

 

root@imx8mmevk:~# export QT_QPA_PLATFORM=eglfs
root@imx8mmevk:~# export QT_QPA_EGLFS_INTEGRATION=eglfs_kms
root@imx8mmevk:~# export QT_QPA_EGLFS_ALWAYS_SET_MODE=1
root@imx8mmevk:~# export QT_QPA_EGLFS_KMS_CONFIG=/etc/kms.conf
root@imx8mmevk:~# export QT_LOGGING_RULES=qt.qpa.input=true
root@imx8mmevk:~# export QT_QPA_EVDEV_TOUCHSCREEN_PARAMETERS=/dev/input/event1
root@imx8mmevk:~# export QT_QPA_EVDEV_MOUSE_PARAMETERS=/dev/input/event1
root@imx8mmevk:~# export QT_QPA_FB_HIDECURSOR=1
root@imx8mmevk:~# export QT_QWS_FONTDIR=/usr/share/fonts
root@imx8mmevk:~#
root@imx8mmevk:~# ./3DTEST  -platform eglfs

 

 

 

 
0 Kudos
Reply

2,933 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

I can't reproduce same issue on i.MX8MM EVK

Zhiming_Liu_0-1704777447087.png

 

Here is memory information after using 400000 triangles.

root@imx8mmevk:/sys/kernel/debug/gc# cat meminfo
VIDEO MEMORY:
  POOL SYSTEM:
    Free :      26274148 B
    Used :     107943580 B
    MinFree :   10762236 B
    MaxUsed :  123455492 B
    Total :    134217728 B
  POOL VIRTUAL:
    Used :      24883200 B
    MaxUsed :   24883200 B

 

Are you using same cma size in your dts?

resmem: reserved-memory {
		#address-cells = <2>;
		#size-cells = <2>;
		ranges;

		/* global autoconfigured region for contiguous allocations */
		linux,cma {
			compatible = "shared-dma-pool";
			reusable;
			size = <0 0x28000000>;
			alloc-ranges = <0 0x80000000 0 0x40000000>;
			linux,cma-default;
		};
	};

 From the crash log, it relates to memory. 

0 Kudos
Reply

2,920 Views
Eric1994
Contributor III

Memory information when triangle is 0:

root@imx8mmevk:gc# cat meminfo 
VIDEO MEMORY:
  POOL SYSTEM:
    Free :     107181520 B
    Used :      27036208 B
    MinFree :   27508744 B
    MaxUsed :  106708984 B
    Total :    134217728 B
  POOL VIRTUAL:
    Used :      12304384 B
    MaxUsed :   12304384 B

when triangles increase to 40000:

root@imx8mmevk:gc# cat meminfo 
VIDEO MEMORY:
  POOL SYSTEM:
    Free :      51040464 B
    Used :      83177264 B
    MinFree :   27508744 B
    MaxUsed :  106708984 B
    Total :    134217728 B
  POOL VIRTUAL:
    Used :      12304384 B
    MaxUsed :   12304384 B

 

0 Kudos
Reply

2,928 Views
Eric1994
Contributor III

Yes, we use the same cma size in our dts.

After increasing to 400000 triangles, drag the screen a few times, then it will freeze, watch the video in the attachment.

2,914 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

I find MIPI PANEL has same issue, but MIPI-HDMI bridge will not.

@Eric1994 

Can you give me the test source code? I want to test it on latest BSP.

 

 

0 Kudos
Reply

2,816 Views
Eric1994
Contributor III

Hi, @Zhiming_Liu 

Any update on the latest BSP?

 
0 Kudos
Reply

2,808 Views
Zhiming_Liu
NXP TechSupport
NXP TechSupport

@Eric1994 

 

Internal team are handling this crash issue.

0 Kudos
Reply

2,911 Views
Eric1994
Contributor III

Here is the source code of QT program.

0 Kudos
Reply