mpp icon indicating copy to clipboard operation
mpp copied to clipboard

4G limit on an 8G board

Open great9 opened this issue 10 months ago • 15 comments

There seems to be a memory limit of 4G even though my board is 8G. I've described it on nyanmisaka's ffmpeg-rockchip repo: https://github.com/nyanmisaka/ffmpeg-rockchip/issues/51

great9 avatar Mar 29 '24 20:03 great9

The 32bit iova space is hardware limit. But we still can use some tick in driver to workaround this problem. We are trying.

HermanChen avatar Apr 08 '24 07:04 HermanChen

The 32bit iova space is hardware limit. But we still can use some tick in driver to workaround this problem. We are trying.

Thank you!

Lots of people have this issue. At one point I was considering of getting a secondary board with 16GB but then I found out more people had this problem.

great9 avatar Apr 08 '24 07:04 great9

The 32bit iova space is hardware limit. But we still can use some tick in driver to workaround this problem. We are trying.

any updates?

great9 avatar Apr 19 '24 09:04 great9

@HermanChen

great9 avatar May 21 '24 19:05 great9

It is not fixed yet.

HermanChen avatar May 22 '24 01:05 HermanChen

It is not fixed yet.

just pinging in the hopes of getting a message back from you saying that 4 devs are working on a fix. :)

from design perspective, why was this ever limited to 32 bit? Vendors marketed the board as a multi-realtime-stream encoder/decoder. It's very easy to hit that limit.

great9 avatar May 22 '24 09:05 great9

any updates @HermanChen ?

great9 avatar Jun 12 '24 12:06 great9

0001-DEBUG-video-rockchip-mpp-disable-CONFIG_DMABUF_CACHE.patch To disable DMABUF_CACHE so that iova will be instantly unmaped after every encoder/decoder task finished. Please apply this patch on kernel6.1 or kernel5.10 and recompile kernel boot and retry. @great9

chencl9410 avatar Jun 13 '24 01:06 chencl9410

0001-DEBUG-video-rockchip-mpp-disable-CONFIG_DMABUF_CACHE.patch To disable DMABUF_CACHE so that iova will be instantly unmaped after every encoder/decoder task finished. Please apply this patch on kernel6.1 or kernel5.10 and recompile kernel boot and retry. @great9

this patch doesn't apply with 5.10 rkr3.4 (aka the latest 5.10 from radxa)

great9 avatar Jun 28 '24 14:06 great9

0001-DEBUG-video-rockchip-mpp-disable-CONFIG_DMABUF_CACHE.patch To disable DMABUF_CACHE so that iova will be instantly unmaped after every encoder/decoder task finished. Please apply this patch on kernel6.1 or kernel5.10 and recompile kernel boot and retry. @great9

this patch doesn't apply with 5.10 rkr3.4 (aka the latest 5.10 from radxa)

It‘s okay to ignore the code conflict between different branch and commit. you may just mannually copy the code of the patch to following two files. drivers/dma-buf/Kconfig | 14 +++++++------- drivers/video/rockchip/mpp/mpp_iommu.c | 6 +++--- then rebuild and try

chencl9410 avatar Jul 08 '24 09:07 chencl9410

Hey, did anyone successfully try out the patch above? I spent some time figuring out how to compile the kernel but I had no success.

@HermanChen @chencl9410 please prioritize this issue. It is known for a long time and not fixed yet. Please apply the fix to the BSP kernel so that it lands in all distributions. This issue is critical and the reason why I can't use my Rockchip board. I would have recommended Rockchip board to friends, but I can't recommend it with this issue. Please fix it fast.

MarcA711 avatar Aug 20 '24 11:08 MarcA711