You are not logged in.

#1 2019-02-17 20:03:01

markg85
Member
Registered: 2009-06-27
Posts: 149

[solved] Ryzen 2400g (Vega11) and hardware accelerated HEVC decoding?

Hi,

This APU seems to be able to handle 10 bit HEVC hardware decoding just fine, just see https://www.guru3d.com/articles-pages/a … ew,16.html
I have VDPAU and VA-API working, but am suspecting them to be some software fallback in the state driver. Here's the vainfo output:

vainfo: VA-API version: 1.4 (libva 2.4.0)
vainfo: Driver version: Mesa Gallium driver 18.3.3 for AMD RAVEN (DRM 3.27.0, 4.20.8-arch1-1-ARCH, LLVM 7.0.1)
vainfo: Supported profile and entrypoints
      VAProfileMPEG2Simple            : VAEntrypointVLD
      VAProfileMPEG2Main              : VAEntrypointVLD
      VAProfileVC1Simple              : VAEntrypointVLD
      VAProfileVC1Main                : VAEntrypointVLD
      VAProfileVC1Advanced            : VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointVLD
      VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
      VAProfileH264Main               : VAEntrypointVLD
      VAProfileH264Main               : VAEntrypointEncSlice
      VAProfileH264High               : VAEntrypointVLD
      VAProfileH264High               : VAEntrypointEncSlice
      VAProfileHEVCMain               : VAEntrypointVLD
      VAProfileHEVCMain               : VAEntrypointEncSlice
      VAProfileHEVCMain10             : VAEntrypointVLD
      VAProfileJPEGBaseline           : VAEntrypointVLD
      VAProfileVP9Profile0            : VAEntrypointVLD
      VAProfileVP9Profile2            : VAEntrypointVLD
      VAProfileNone                   : VAEntrypointVideoProc

Usually vainfo tells a little more about the driver if it's not mesa.
Other then that, AMDGPU seems to be working really fine. See the dmesg output when grepping for amdgpu.

╰─ dmesg | grep amdgpu
2:[    0.000000] Command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=LABEL=arch_root rw amdgpu.dc=1
234:[    0.000000] Kernel command line: initrd=\intel-ucode.img initrd=\initramfs-linux.img root=LABEL=arch_root rw amdgpu.dc=1
701:[    0.941082] [drm] amdgpu kernel modesetting enabled.
707:[    0.941258] fb0: switching to amdgpudrmfb from EFI VGA
727:[    0.965592] amdgpu 0000:38:00.0: VRAM: 2048M 0x000000F400000000 - 0x000000F47FFFFFFF (2048M used)
728:[    0.965593] amdgpu 0000:38:00.0: GART: 1024M 0x0000000000000000 - 0x000000003FFFFFFF
729:[    0.965594] amdgpu 0000:38:00.0: AGP: 267419648M 0x000000F800000000 - 0x0000FFFFFFFFFFFF
736:[    0.965732] [drm] amdgpu: 2048M of VRAM memory ready
737:[    0.965733] [drm] amdgpu: 3072M of GTT memory ready.
749:[    1.183099] WARNING: CPU: 1 PID: 224 at drivers/gpu/drm/amd/amdgpu/../display/dc/calcs/dcn_calcs.c:1380 dcn_bw_update_from_pplib+0x16b/0x280 [amdgpu]
750:[    1.183099] Modules linked in: amdgpu(+) chash amd_iommu_v2 gpu_sched i2c_algo_bit drm_kms_helper syscopyarea sysfillrect sysimgblt fb_sys_fops ttm drm agpgart
753:[    1.183165] RIP: 0010:dcn_bw_update_from_pplib+0x16b/0x280 [amdgpu]
765:[    1.183235]  dcn10_create_resource_pool+0x7d5/0xac0 [amdgpu]
766:[    1.183290]  ? dal_aux_engine_dce110_create+0x39/0x70 [amdgpu]
767:[    1.183345]  dc_create_resource_pool+0x42/0x180 [amdgpu]
769:[    1.183401]  dc_create+0x20f/0x620 [amdgpu]
770:[    1.183455]  ? amdgpu_cgs_create_device+0x23/0x50 [amdgpu]
771:[    1.183509]  dm_hw_init+0xcb/0x140 [amdgpu]
772:[    1.183562]  amdgpu_device_init.cold.17+0x11ff/0x1375 [amdgpu]
773:[    1.183605]  amdgpu_driver_load_kms+0x86/0x330 [amdgpu]
775:[    1.183655]  amdgpu_pci_probe+0xbd/0x120 [amdgpu]
825:[    1.269653] amdgpu 0000:38:00.0: ring 0(gfx) uses VM inv eng 4 on hub 0
826:[    1.269655] amdgpu 0000:38:00.0: ring 1(comp_1.0.0) uses VM inv eng 5 on hub 0
827:[    1.269656] amdgpu 0000:38:00.0: ring 2(comp_1.1.0) uses VM inv eng 6 on hub 0
828:[    1.269658] amdgpu 0000:38:00.0: ring 3(comp_1.2.0) uses VM inv eng 7 on hub 0
829:[    1.269659] amdgpu 0000:38:00.0: ring 4(comp_1.3.0) uses VM inv eng 8 on hub 0
830:[    1.269660] amdgpu 0000:38:00.0: ring 5(comp_1.0.1) uses VM inv eng 9 on hub 0
831:[    1.269662] amdgpu 0000:38:00.0: ring 6(comp_1.1.1) uses VM inv eng 10 on hub 0
832:[    1.269663] amdgpu 0000:38:00.0: ring 7(comp_1.2.1) uses VM inv eng 11 on hub 0
833:[    1.269664] amdgpu 0000:38:00.0: ring 8(comp_1.3.1) uses VM inv eng 12 on hub 0
834:[    1.269665] amdgpu 0000:38:00.0: ring 9(kiq_2.1.0) uses VM inv eng 13 on hub 0
835:[    1.269666] amdgpu 0000:38:00.0: ring 10(sdma0) uses VM inv eng 4 on hub 1
836:[    1.269668] amdgpu 0000:38:00.0: ring 11(vcn_dec) uses VM inv eng 5 on hub 1
837:[    1.269669] amdgpu 0000:38:00.0: ring 12(vcn_enc0) uses VM inv eng 6 on hub 1
838:[    1.269670] amdgpu 0000:38:00.0: ring 13(vcn_enc1) uses VM inv eng 7 on hub 1
839:[    1.269671] amdgpu 0000:38:00.0: ring 14(vcn_jpeg) uses VM inv eng 8 on hub 1
840:[    1.276427] [drm] Initialized amdgpu 3.27.0 20150101 for 0000:38:00.0 on minor 0
845:[    1.299803] [drm] amdgpu_dm_irq_schedule_work FAILED src 7
847:[    1.307520] [drm] amdgpu_dm_irq_schedule_work FAILED src 7
848:[    1.319405] [drm] amdgpu_dm_irq_schedule_work FAILED src 7
850:[    1.327124] [drm] amdgpu_dm_irq_schedule_work FAILED src 7
856:[    1.329283] fbcon: amdgpudrmfb (fb0) is primary device
961:[    1.828027] amdgpu 0000:38:00.0: fb0: amdgpudrmfb frame buffer device

Anyone any clue how i can get hardware accelerated 10-bit HEVC to work?
Right now it does work somewhat with vdpau (with va-api too, but mega stuttering), but that is with all cores at near 80%...

Cheers,
Mark

Last edited by markg85 (2019-02-17 21:14:36)

Offline

#2 2019-02-17 20:10:56

2ManyDogs
Forum Fellow
Registered: 2012-01-15
Posts: 4,645

Re: [solved] Ryzen 2400g (Vega11) and hardware accelerated HEVC decoding?

Please edit your post and use [ code ] tags (not quote tags) when posting output.

https://wiki.archlinux.org/index.php/Co … s_and_code
https://bbs.archlinux.org/help.php#bbcode


How to post. A sincere effort to use modest and proper language and grammar is a sign of respect toward the community.

Offline

#3 2019-02-17 21:00:24

Gusar
Member
Registered: 2009-08-25
Posts: 3,605

Re: [solved] Ryzen 2400g (Vega11) and hardware accelerated HEVC decoding?

VDPAU doesn't support 10bit video. VAAPI does. Your vainfo output looks fine.

What application are you using? VLC supports VAAPI only on Intel GPUs. I'd recommend mpv, where it's important to set both hwdec and gpu-context or you'll get software decoding, so do this:

mpv --hwdec=vaapi --gpu-context=x11egl your_10bit_hevc_video.mp4

That's for X, if you're using wayland, then --gpu-context=wayland

Last edited by Gusar (2019-02-17 21:06:31)

Offline

#4 2019-02-17 21:14:12

markg85
Member
Registered: 2009-06-27
Posts: 149

Re: [solved] Ryzen 2400g (Vega11) and hardware accelerated HEVC decoding?

Gusar wrote:

VDPAU doesn't support 10bit video. VAAPI does. Your vainfo output looks fine.

What application are you using? VLC supports VAAPI only on Intel GPUs. I'd recommend mpv, where it's important to set both hwdec and gpu-context or you'll get software decoding, so do this:

mpv --hwdec=vaapi --gpu-context=x11egl your_10bit_hevc_video.mp4

That's for X, if you're using wayland, then --gpu-context=wayland

Wow, seriously!

--gpu-context=x11egl

That's all i needed to add. That made the cpu usage drop to expected levels and be smooth!
I have no clue how i could've get that hint without your help. The mpv documentation tells exactly nothing about that being a possible hardware thingy: https://mpv.io/manual/master/
Neither does it show clearly in the wiki for AMDGPU not MPV... I might edit those later to help others smile

Thanks a lot for your reply!
Marking as solved.

Offline

Board footer

Powered by FluxBB