We are currently working on porting the platform to Android 12 (android-12.0.0_2.0.0) for our i.MX8MM custom board with LPDDR4 4GB RAM. The source code was downloaded from the NXP website:
The build and flashing process completed successfully.
Initial Issue – GPU Crash and Kernel Panic
During the 4GB flash, we encountered:
GPU crash
Kernel panic
Memory abort issue
Logs I have been attached for your reference (gpu_crash_logs.txt)
Based on discussions in the NXP community forum, it was suggested to modify the reserved memory and GPU CMA size.
Accordingly, we updated:
Reserved memory (linux,cma) in imx8mm.dtsi by modifying the alloc-ranges.
GPU node reg configuration by updating the contiguous_mem region.
BoardConfig.mk by increasing CMASIZE:
After these changes, the board boots successfully and we are able to enter adb shell without any kernel panic or memory abort.
Current Issue – Display and GPU Failure
After stabilizing the boot:
We added our custom display driver ILI9881C and built it as a module (.ko).
The driver loads successfully.
The probe function executes properly.
Reset GPIOs and pinctrl configurations are correct.
However:
The ili9881c_prepare() function is not being called in the normal boot scenario.
No kernel logo is displayed.
The screen remains black after Android initialization.
surfaceflinger and hwcomposer services keep restarting continuously.
Galcore probe is failing again. Attached Surfaceflinger logs (Surfaceflinger.txt)
Additional Observation with CMA=512M
When we explicitly pass CMA as 512M in boot arguments:
setenv bootargs ${bootargs} cma=512M saveenv
In this case, the device boots into recovery mode, and the ili9881c_prepare() function is invoked successfully.
We observe the following logs:
SAN inside imx_sec_dsim_encoder_atomic_check SAN inside imx_sec_dsim_encoder_atomic_enable SAN inside imx_sec_dsim_encoder_get_new_crtc imx_sec_dsim_drv 32e10000.mipi_dsi: SAN atomic_enable called! panel=(____ptrval____) enabled=0 ili9881c-dsi 32e10000.mipi_dsi.0: Inside Prepare ili9881c-dsi 32e10000.mipi_dsi.0: ili9881c_enable: Set 4-lane mode ; Color 7
At this stage, the panel initialization sequence runs, and display output is partially visible (attached Display image for reference). However, this behavior only occurs when CMA is set to 512M via bootargs.
Reference Attempt
We also tried GPU memory configuration changes based on the following NXP community discussion:
In that case:
GPU driver probe was successful.
However, the GPU crash still occurred.
The display issue remained unresolved.
Request
We kindly request your guidance on:
Proper GPU CMA and contiguous memory configuration for a 4GB LPDDR4 setup on Android 12.
Why ili9881c_prepare() is triggered only when CMA=512M is passed via bootargs.
The correct memory layout between CMA, GPU contiguous memory, and DDR mapping.
Resolving galcore crash and restoring stable kernel display output.
Stabilizing SurfaceFlinger and HWC initialization.
I have also attached our dts files and logs txt files for your refrence.
Your support would be greatly appreciated.
Thank you for your time and assistance.