RPi4: switch to KMS driver and enable v4l2 HEVC decoding#4288
RPi4: switch to KMS driver and enable v4l2 HEVC decoding#4288CvH merged 10 commits intoLibreELEC:masterfrom
Conversation
acca0f8 to
e4c13f2
Compare
|
RPi kernel now supports setting the CMA memory size via DT, I've updated the PR to use that in distroconfig.txt instead of the earlier cmdline approach. Being able to change it via (distro)config.txt makes things a lot easier for us as changes can be rolled out via updates). As some 4k HEVC files didn't seem to play with 256MB CMA I've kept the 512MB default for now, we can probably reduce it to 384MB or so later (needs some extensive testing though) |
|
I've cleaned things up a bit, popcornmix's WIP KMS linux and kodi changes are now included as patches and I dropped the experimental alsa-lib patches for now. Common kernel config changes are now in the 5.4 kernel PR #4399 I've archived the previous version here https://github.com/HiassofT/LibreELEC.tv/tree/le10-rpi4-v4l2-v1 in case we need some stuff later (eg alsa-lib iec958 formatter changes). To build you need the current kodi bump PR #4350 , linux bump PR #4399 and for matching kodi addons also PR #4349 I've updated my le10-rpi4-v4l2-test-full branch which includes all of these https://github.com/HiassofT/LibreELEC.tv/tree/le10-rpi4-v4l2-test-full |
b1e1f1a to
8fddfa6
Compare
12cb364 to
c1c8242
Compare
Signed-off-by: Matthias Reichl <[email protected]>
The default 256MB CMA memory can be too small for 4k HEVC decoding. Signed-off-by: Matthias Reichl <[email protected]>
H264 V4L2 decoder needs a bit of GPU memory, the default of 76 MB is enough. H265 V4L2 decoder and vc4/v3d kms drivers all use CMA memory. Signed-off-by: Matthias Reichl <[email protected]>
Signed-off-by: Matthias Reichl <[email protected]>
Signed-off-by: Matthias Reichl <[email protected]>
Signed-off-by: Matthias Reichl <[email protected]>
Signed-off-by: Matthias Reichl <[email protected]>
picked from https://github.com/popcornmix/xbmc/tree/gbm Signed-off-by: Matthias Reichl <[email protected]>
sourced from https://github.com/popcornmix/xbmc/blob/gbm/tools/depends/target/ffmpeg/0001-rpi-Add-hevc-acceleration.patch Signed-off-by: Matthias Reichl <[email protected]>
sourced from https://github.com/popcornmix/linux/tree/kodi/rpi4-kms Signed-off-by: Matthias Reichl <[email protected]>
|
I've cleaned up the kodi patch, dropped the ffmpeg patches (which aren't needed there, as we already have that separately, for ffmpeg) and kept only what's really useful: "0001-popcornmix-DVDVideoCodecDRMPRIME-Increase-thread-count-for-hevc.patch" should probably go upstream, the other two are temporary workarounds (disable H264 decoding because of seek issue and try to hide vc4 kms issue with pixel shift). ffmpeg is the biggest WIP area, the patch is huge and actually we only need a small part of it - the v4l2 hevc request stuff. Hopefully this can be simplified and/or merged with our v4l2 request patches in the future. There are still several bits missing but I think the changes are now in a state where they can be merged intto master. |
This is very WIP, meant for early testing only. Lots of rough edges and stuff missing so you have been warned :-)
Note: #4286 is also needed to get the kernel KMS driver patches