mainline kernel hardware acceleration - Printable Version +- PINE64 (https://forum.pine64.org) +-- Forum: Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=111) +--- Forum: Linux on Pinebook Pro (https://forum.pine64.org/forumdisplay.php?fid=114) +--- Thread: mainline kernel hardware acceleration (/showthread.php?tid=9171) |
mainline kernel hardware acceleration - xmixahlx - 02-14-2020 collecting information and projects regarding hardware acceleration in mainline kernel, ffmpeg, and vaapi. STATUS: drm hwaccel working with hantro (mpeg2, vp8, h264) and rkvdec (vp9, h264 8+10bit, h265 8+10bit) ffmpeg 4.2.3 with v4l2-request-hwaccel-4.2.2-rkvdec patch working well, except decoders listing is broken (i.e. mpv and others will be broken) kodi supports all hantro and rkvdec hwaccel, including plugins (youtube and jellyfin confirmed) *see kodi-git thread* gstreamer supports vp8 and h264 via v4l2codecs in gstreamer-plugins-bad vaapi hwaccel working with hantro (mpeg2) firefox 75 supports initial vaapi on wayland, v76 expands vaapi support to all supported codecs, no X11 support chrome supports vaapi with unofficial patch that will never be upstreamed, but included in some linux distros (fedora, etc.) PBP-TOOLS pinebook pro tools, including installation scripts, patches, and configs, now on git. also see forum thread. https://github.com/xmixahlx/pbp-tools https://forum.pine64.org/showthread.php?tid=10190 REFERENCES linux patchwork - linux-media: https://patchwork.kernel.org/project/linux-media/list/ linux patchwork - linux-rockchip: https://patchwork.kernel.org/project/linux-rockchip/list/ libreelec/kwiboo mainline kernel patches: https://github.com/LibreELEC/LibreELEC.tv/tree/master/projects/Rockchip/patches/linux/default libreelec/kwiboo mainline kernel testing patches: https://github.com/Kwiboo/LibreELEC.tv kwiboo's rockchip-linux repos: https://github.com/Kwiboo/linux-rockchip/ bbrezillon's rockchip-linux repos: https://github.com/bbrezillon/linux/ ph5's libva patch: https://github.com/intel/libva/pull/332 libva-v4l2-request; https://github.com/bootlin/libva-v4l2-request/ ph5's libva-v4l2-request patches: https://github.com/bootlin/libva-v4l2-request/pulls kwiboo's ffmpeg v4l2-request branch: https://github.com/Kwiboo/FFmpeg/tree/v4l2-request-hwaccel-4.2.2 https://github.com/Kwiboo/FFmpeg/tree/v4l2-request-hwaccel-4.2.2-rkvdec gstreamer v4l2codecs: https://gitlab.freedesktop.org/gstreamer/gst-plugins-bad/-/merge_requests/1141 gstreamer vaapi: https://gitlab.freedesktop.org/gstreamer/gstreamer-vaapi/merge_requests/171 firefox vaapi: https://bugzilla.mozilla.org/show_bug.cgi?id=1610199 chrome vaapi: https://chromium-review.googlesource.com/c/chromium/src/+/532294 https://github.com/saiarcot895/chromium-ubuntu-build/tree/master/debian/patches https://aur.archlinux.org/packages/chromium-vaapi/ OTHER allwinner cedrus hwaccel project: https://linux-sunxi.org/Sunxi-Cedrus LibreElec - Early Mainline Images for <...> RK3399: https://forum.libreelec.tv/thread/17540-early-mainline-images-for-rk3288-rk3328-and-rk3399/ LibreElec - Not Official LE Version for <...> RK3399 https://forum.libreelec.tv/thread/20823-not-official-le-version-for-rk3328-rk3399/ Armbian - early VPU work: https://forum.armbian.com/topic/4806-the-vpu-driver/ Armbian - Mainline VPU https://forum.armbian.com/topic/13622-mainline-vpu/ RE: mainline kernel hardware acceleration - xmixahlx - 02-18-2020 mpeg2video hwaccel is tested working. testing requirements: patched kernel (libreelec; optionally kwiboo v4l2 5.5 wip and rkvdec, plus bbrezillon patches) patched libva (plus pulls 332,340) patched libva-v4l2-request (plus pulls 28,29,30) patched ffmpeg (v4l2-request-hwaccel) -- recommend 4.2.2 or -master > build with --enable-v4l2-request --enable-libdrm --enable-libudev --enable-pic --enable-shared (plus optional config) determine video decoder: dmesg | grep rk3399-vpu-dec note video device (i.e. /dev/video1) export variables: export LIBVA_DRIVER_NAME=v4l2_request export LIBVA_V4L2_REQUEST_VIDEO_PATH=/dev/video1 vainfo output: Quote:libva info: VA-API version 1.6.1 vlc abbreviated output: > opengl video, vaapi hwaccel Quote:libva info: VA-API version 1.6.1 ffmpeg -decoders | grep v4l2request output: Quote: V..... h263_v4l2request h263 (v4l2request) (codec h263) screenshot eye candy RE: mainline kernel hardware acceleration - vrabac - 02-19-2020 @xmixahlx great work, I was looking for something like this to as I was going to test Kodi on my PBP with but with VPU support and using USB-C to DVI (HDMI) on Manjaro KDE. But seems there is no already package for these kinde of support on Manjaro KDE jet. Do you have some sources for your PKGBUILDs or you are building packages without PKGBUILDs? From arbian forum I have these information (from 2019), the kwiboo's rockchip-linux repos you already linked. Code: The VPU in rk3288 (vpu1) should have VP8 support, same as the VPU in rk3328/rk3399 (vpu2) RE: mainline kernel hardware acceleration - xmixahlx - 02-19-2020 (02-19-2020, 12:38 AM)vrabac Wrote: @xmixahlx great work, I was looking for something like this to as I was going to test Kodi on my PBP with but with VPU support and using USB-C to DVI (HDMI) on Manjaro KDE. But seems there is no already package for these kinde of support on Manjaro KDE jet. i'm on debian sid arm64 and following guidance from kernel patches and commentary. keep an eye out for av's arch patches. we're collaborating on pine64 irc occasionally. https://aur.archlinux.org/packages/?O=0&SeB=m&K=AndreVallestero&outdated=&SB=n&SO=a&PP=50&do_Search=Go RE: mainline kernel hardware acceleration - amiraeva - 02-19-2020 Fantastic! I haven't been able to replace my Thinkpad just yet because of a lack of video acceleration in Manjaro. Looks like it won't be too long until it'll be plug and play. RE: mainline kernel hardware acceleration - mamboman777 - 02-22-2020 (02-19-2020, 08:20 AM)amiraeva Wrote: Fantastic! I haven't been able to replace my Thinkpad just yet because of a lack of video acceleration in Manjaro. Looks like it won't be too long until it'll be plug and play. The last blog post had a panfrost installation script that got hardware acceleration working on my pine book pro. RE: mainline kernel hardware acceleration - xmixahlx - 02-22-2020 panfrost hwaccel and hantro/rkvdec hwaccel are different. hantro/rkvdec are the rockchip hwaccel kernel modules for video decoding (VPU). there are numerous capabilities of the rockchip VPU that are not yet utilized, and development is ongoing. one of the main developers, kwiboo, also is on the libreelec team and their distro is the most advanced in this regard. other distros will use this as a base until accepted upstream to provide similar support. RE: mainline kernel hardware acceleration - vrabac - 02-27-2020 is the patched kernel an must to or optional? I used under Manjaro Arm 20.02 the AndreVallestero PKGBUILDs but having problem to compile ffmpeg but i just compiled and installed these to prior to compile ffmpeg: libva-hantro-h264-git and libva-v4l2-request-hantro-h264-git Code: CC libavcodec/v4l2_m2m.o RE: mainline kernel hardware acceleration - xmixahlx - 02-27-2020 the patched kernel provides necessary kernel headers for ffmpeg-v4l2-request, although mpeg2video hwaccel is now working with mainline kernel. (i tested with 5.6.0-rc3+tsys). i recommend applying the libreelec kernel patches if you want to test. things are picking up momentum. it looks like 5.7 will include many hwaccel improvements. see: https://patchwork.kernel.org/patch/11403025/ RE: mainline kernel hardware acceleration - xmixahlx - 03-04-2020 a good read on firefox wayland: https://mastransky.wordpress.com/2020/03/03/webgl-and-fgx-acceleration-on-wayland/ |