Home
last modified time | relevance | path

Searched hist:"1 d60f76b92164133879385413f77ec02b06b187d" (Results 1 – 1 of 1) sorted by relevance

/rk3399_rockchip-uboot/drivers/video/
H A Dvideo-uclass.c1d60f76b92164133879385413f77ec02b06b187d Tue Mar 04 09:23:43 UTC 2025 Xuhui Lin <xuhui.lin@rock-chips.com> drivers: video: Fix CMA Memory Mapping Stalling in Kernel Init

Fail log in Kernel Init:
Starting kernel ...

[ 0.866142] Booting Linux on physical CPU 0xf00
[ 0.866162] Linux version 6.1.99 (zjh@ubuntu-191) (arm-none-linux-gnueabihf-gcc (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 10.3.1 20210621, GNU ld (GNU Toolchain for the A-profile Architecture 10.3-2021.07 (arm-10.29)) 2.36.1.20210621) #76 SMP PREEMPT Fri Feb 21 17:52:06 CST 2025
[ 0.866173] CPU: ARMv7 Processor [410fc075] revision 5 (ARMv7), cr=50c5387d
[ 0.866183] CPU: div instructions available: patching division code
[ 0.866188] CPU: PIPT / VIPT nonaliasing data cache, VIPT aliasing instruction cache
[ 0.866500] OF: fdt: Machine model: Rockchip RK3506G(QFN128) EVB1 V10 Board
[ 0.868656] earlycon: uart8250 at MMIO32 0xff0a0000 (options '')
[ 0.874664] printk: bootconsole [uart8250] enabled
[ 0.875183] Memory policy: Data cache writealloc
[ 0.875888] Reserved memory: created CMA memory pool at 0x05100000, size 32 MiB
[ 0.876563] OF: reserved mem: initialized node linux,cma, compatible id shared-dma-pool
[ 0.877380] Reserved memory: created DMA memory pool at 0x03d00000, size 1 MiB
[ 0.878045] OF: reserved mem: initialized node rpmsg-dma@3d00000, compatible id shared-dma-pool

Why have this problem?
1. The ARMv7 kernel encountered a deadlock during initialization when creating CMA mappings.
U-Boot reserved DRM logo region starting at 0x7100000, leaving insufficient space above
0x7100000 for a 22MB CMA allocation. So CMA will attempt to allocate downward from
0x5d00000 to 0x7100000.
2. Since PGTABLE_LEVELS=2 by default, kernel will create mapping every 2M, and will adjust
the second region start address to 2M alignment, apparently the first region in this case
is 0x5d00000-0x5e00000.
3. However, kernel can't adjust the last region less than 2M, and it will only wait for the
start and the end to be equal. So the CMA Memory Mapping Stalling happened.

Change-Id: Ib196df8c8ce1f1a19cd6943d2e6cb1c9910752ba
Signed-off-by: Xuhui Lin <xuhui.lin@rock-chips.com>