i.MX8X C0 CMA errors during Qt application, not present in B0

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

i.MX8X C0 CMA errors during Qt application, not present in B0

5,903 Views
gabrielvalcazar
Contributor IV

Hi, a customer of ours having a CMA-related issue using a Digi i.MX8QXP SOM-based custom board running custom Yocto Embedded OS based on the v5.4.70 2.3.3 BXP. The use case consists of a Qt application that is launched as a weston desktop, providing a GUI on a 7 or 10 inch touchscreen. At the moment, there are boards with both B0 and C0 SOCs, both running the same software (except for the imx-boot binary, which requires a different image depending on the SOC revision).

The SOM has a RAM size of 2 GiB and a default CMA region size of 640 MiB.

The problem is, we can observe memory issues on the C0 boards (and only the C0 boards). When the application is launched, we can see constant "alloc_contig_range" messages:

 

[ 152.966630] alloc_contig_range: 1398 callbacks suppressed
[ 152.966645] alloc_contig_range: [a7b00, a7ee8) PFNs busy
[ 152.978177] alloc_contig_range: [a7c00, a7fe8) PFNs busy
[ 152.983834] alloc_contig_range: [a7c00, a80e8) PFNs busy
[ 152.989454] alloc_contig_range: [a7e00, a81e8) PFNs busy
[ 152.995137] alloc_contig_range: [a7f00, a82e8) PFNs busy
[ 153.000783] alloc_contig_range: [a8000, a83e8) PFNs busy
[ 153.006439] alloc_contig_range: [a8000, a84e8) PFNs busy
[ 153.012226] alloc_contig_range: [a8200, a85e8) PFNs busy
[ 153.033159] alloc_contig_range: [a7b00, a7ee8) PFNs busy
[ 153.039166] alloc_contig_range: [a7c00, a7fe8) PFNs busy

 

Sometimes, the application even hangs indefinitely. Note that a board with a B0 SOC running the exact same software (kernel + device tree + rootfs + application) doesn't have these symptoms at all. When the CMA size is increased manually to 1280 MiB, the problem still appears.

However, during one of my tests, I tried using the same CMA size as the one used in the i.MX8QXP MEK (960 MiB) and with this size, the behavior is vastly improved. The alloc_contig_range messages aren't completely gone, but they are far less frequent that before and I haven't seen the application hang since.

My two main questions are the following:

  • Why does a CMA size of 960 MiB seem to improve the issue and a size of 1280 MiB doesn't? This makes me think this is a kind of hardcoded alignment issue in the graphical libraries, but I'm not sure.
  • Why does this only happen on a C0 SOC and not a B0 one, even though all of the relevant components (GPU driver, GPU libraries, Qt libraries, application) are the same in both cases? Do the GPU libraries do things differently depending on the SOC revision?

Many thanks in advance,
Gabriel

0 Kudos
28 Replies

1,658 Views
gabrielvalcazar
Contributor IV

Hi team,

The two displays are 10" 1280x800 and 7" 800x480.

Here are the logs of the B0 and C0 boards with the same setup and memblock=debug enabled.

Gabriel

0 Kudos

1,525 Views
igorpadykov
NXP Employee
NXP Employee

team:

------------------

1280x800 display definitely requires more graphic memory than 800x480 setup, which mostly allocated from CMA. This means 1280x800 will eat more CMA memory, which brings the warning customer found.

-----------------

Best regards
igor

0 Kudos

998 Views
gabrielvalcazar
Contributor IV

Hi Igor,

The customer has confirmed that the issue does not depend on the display size. They now have a set up with a B0 target and a C0 one, both on the same board and using the same display. The CMA errors only appear on the C0 target.

They are currently trying different combinations of displays and SOC revisions to understand if the issue is caused strictly by the SOC revision alone or by a combination of SOC revision and display size.

0 Kudos

969 Views
gabrielvalcazar
Contributor IV

Hi @igorpadykov ,

Any advice moving forward with this? Again, the only difference between both setups now is the SOC revision, and the issue only happens on the C0 version.

0 Kudos

953 Views
igorpadykov
NXP Employee
NXP Employee

from team:

------------------

..will continue with the follow-up next week.

------------------

Best regards
igor

0 Kudos

942 Views
igorpadykov
NXP Employee
NXP Employee

internal team provided answer below:

----------------

As I said, I really cannot see any clue to connect CMA warning with C0/B0 differences.

Again, the CMA warning is not an issue if you still can get CMA memory without any "cma out of memory" error.

----------------

 

Best regards
igor

0 Kudos

916 Views
gabrielvalcazar
Contributor IV

Apologies, I posted the reply twice, ignore this one

0 Kudos

918 Views
gabrielvalcazar
Contributor IV

Hi @igorpadykov ,

We have more information from the customer, find the logs attached to this reply.

Using four different combinations of SOC revisions and display size, the issue only happens on the combination with a large display and a C0 SOC. The fact that it doesn't occur with the large display and the B0 SOC is confusing, but at least we can confirm that the display size is also at fault.

We will try to make some tests on our end to understand the issue better, such as using smaller resolutions.

0 Kudos