doc:appunti:hardware:raspberrypi_3
Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revisionNext revision | Previous revisionLast revisionBoth sides next revision | ||
doc:appunti:hardware:raspberrypi_3 [2024/03/21 22:53] – niccolo | doc:appunti:hardware:raspberrypi_3 [2024/03/22 07:12] – niccolo | ||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== Kodi on the Raspberry Pi 3 ====== | + | ====== Kodi on the Raspberry Pi 3 and CMA problems |
- | Running | + | I installed |
The error messages are revealed by the **dmesg** output: | The error messages are revealed by the **dmesg** output: | ||
< | < | ||
+ | [ 628.433140] cma: cma_alloc: linux,cma: alloc failed, req-size: 338 pages, ret: -12 | ||
+ | [ 628.433195] bcm2835-codec bcm2835-codec: | ||
+ | ... | ||
[ 848.225919] [drm: | [ 848.225919] [drm: | ||
[ 848.226063] vc4-drm soc:gpu: [drm] V3D: 210408kb BOs (1132) | [ 848.226063] vc4-drm soc:gpu: [drm] V3D: 210408kb BOs (1132) | ||
Line 14: | Line 17: | ||
</ | </ | ||
- | As you can see the V3D used 210408 kb of the DRM memory, | + | As you can see the V3D used 210408 kb of the DRM memory, |
- | + | ||
- | With the default settings you can read the following using **dmesg**: | + | |
< | < | ||
[ 0.000000] Reserved memory: created CMA memory pool at 0x1ec00000, size 256 MiB | [ 0.000000] Reserved memory: created CMA memory pool at 0x1ec00000, size 256 MiB | ||
+ | </ | ||
+ | |||
+ | In **/ | ||
+ | |||
+ | < | ||
+ | # Enable DRM VC4 V3D driver | ||
+ | dtoverlay=vc4-kms-v3d | ||
+ | max_framebuffers=2 | ||
</ | </ | ||
Line 25: | Line 34: | ||
< | < | ||
- | # Default cma reserved memory is 256 Mb, use 480 instead. | + | # Default cma reserved memory is 256 Mb, use 512 instead. |
- | dtoverlay=cma, | + | dtoverlay=cma, |
</ | </ | ||
- | Because the total memory is limited to 1 Gb, it is advisable to reserve | + | Because the total memory is limited to 1 Gb, it is advisable to reserve |
< | < | ||
- | gpu_mem=128 | + | gpu_mem=92 |
</ | </ | ||
+ | |||
+ | With 128 Mb of GPU memory I'm still able to play 1920x1080 videos without issues. Many features of the VideoCore IV GPU use the CMA reserved memory, not this GPU reserver one. | ||
+ | |||
+ | You can check how many GPU memory is used during Kodi normal operation, just launch the {{.raspberrypi: | ||
+ | |||
+ | < | ||
+ | ./ | ||
+ | </ | ||
At next reboot I verified that the new setting is in place, checking the **dmesg** output: | At next reboot I verified that the new setting is in place, checking the **dmesg** output: | ||
< | < | ||
- | [ 0.000000] Reserved memory: created CMA memory pool at 0x13c00000, size 432 MiB | + | [ 0.000000] Reserved memory: created CMA memory pool at 0x0ec00000, size 512 MiB |
- | [ 0.000000] Memory: | + | [ 0.000000] Memory: |
- | 2900K rodata, 1024K init, 613K bss, 26416K | + | 2900K rodata, 1024K init, 613K bss, 28052K |
</ | </ | ||
- | Verify also that the system has enough free memory once the Kodi program is started, use the **free** commando to get: | + | Verify also that the system has enough free memory once the Kodi program is started, use the **free** commando to get it: |
< | < | ||
+ | | ||
+ | Mem: 927340 | ||
+ | Swap: | ||
</ | </ | ||
+ | |||
+ | About **300 Mb of free memory** should suffice for normal operations. | ||
doc/appunti/hardware/raspberrypi_3.txt · Last modified: 2024/03/22 07:13 by niccolo