radeonsi: VA-API/VDPAU: no hardware acceleration available for HEVC, h.264, etc. with NAVI22
System information
System:
Host: citadel Kernel: 5.18.1-citadel arch: x86_64 bits: 64 compiler: gcc
v: 11.3.0 Desktop: KDE Plasma v: 5.24.5 tk: Qt v: 5.15.2 wm: kwin_x11
dm: SDDM Distro: Debian GNU/Linux bookworm/sid
CPU:
Info: 12-core model: AMD Ryzen 9 5900X bits: 64 type: MT MCP arch: Zen 3
rev: 2 cache: L1: 768 KiB L2: 6 MiB L3: 64 MiB
Speed (MHz): avg: 2812 high: 3593 min/max: 2200/4950 boost: enabled
cores: 1: 2515 2: 3590 3: 2195 4: 2354 5: 2868 6: 2461 7: 2873 8: 2869
9: 2873 10: 2874 11: 2442 12: 2871 13: 2354 14: 3593 15: 2483 16: 3216
17: 2257 18: 2874 19: 2874 20: 2871 21: 2872 22: 2870 23: 3587 24: 2874
bogomips: 177269
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Navi 22 [Radeon RX 6700/6700 XT/6750 XT / 6800M]
vendor: Sapphire driver: amdgpu v: kernel pcie: speed: 16 GT/s lanes: 16
ports: active: DP-3 empty: DP-1,DP-2,HDMI-A-1 bus-ID: 07:00.0
chip-ID: 1002:73df
Display: x11 server: X.Org v: 1.21.1.3 compositor: kwin_x11 driver: X:
loaded: amdgpu unloaded: fbdev,modesetting,radeon,vesa gpu: amdgpu
display-ID: :0 screens: 1
Screen-1: 0 s-res: 2560x1440 s-dpi: 96
Monitor-1: DP-3 mapped: DisplayPort-2 model: Samsung SMS27A850
res: 2560x1440 dpi: 126 diag: 611mm (24.1")
OpenGL:
renderer: AMD Radeon RX 6700 XT (navi22 LLVM 15.0.0 DRM 3.46 5.18.1-citadel)
v: 4.6 Mesa 22.2.0-devel (git-3e679219a1) direct render: Yes
Describe the issue
There is only very limited hardware video acceleration available with a current Mesa build (3e679219) on a NAVI22 GPU.
- VA-API:
$ vainfo
libva info: VA-API version 1.14.0
libva info: Trying to open /usr/lib/x86_64-linux-gnu/dri/radeonsi_drv_video.so
libva info: Found init function __vaDriverInit_1_14
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.14 (libva 2.12.0)
vainfo: Driver version: Mesa Gallium driver 22.2.0-devel for AMD Radeon RX 6700 XT (navi22, LLVM 15.0.0, DRM 3.46, 5.18.1-citadel)
vainfo: Supported profile and entrypoints
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD
VAProfileAV1Profile0 : VAEntrypointVLD
VAProfileNone : VAEntrypointVideoProc
- Even worse with
VDPAU
:
$ vdpauinfo
display: :0 screen: 0
API version: 1
Information string: G3DVL VDPAU Driver Shared Library version 1.0
Video surface:
name width height types
-------------------------------------------
420 16384 16384 NV12 YV12
422 16384 16384 UYVY YUYV
444 16384 16384 Y8U8V8A8 V8U8Y8A8
420_16 16384 16384
422_16 16384 16384
444_16 16384 16384
Decoder capabilities:
name level macbs width height
----------------------------------------------------
MPEG1 --- not supported ---
MPEG2_SIMPLE 3 78336 4096 4906
MPEG2_MAIN 3 78336 4096 4906
H264_BASELINE --- not supported ---
H264_MAIN --- not supported ---
H264_HIGH --- not supported ---
VC1_SIMPLE --- not supported ---
VC1_MAIN --- not supported ---
VC1_ADVANCED --- not supported ---
MPEG4_PART2_SP 3 78336 4096 4906
MPEG4_PART2_ASP 5 78336 4096 4906
DIVX4_QMOBILE --- not supported ---
DIVX4_MOBILE --- not supported ---
DIVX4_HOME_THEATER --- not supported ---
DIVX4_HD_1080P --- not supported ---
DIVX5_QMOBILE --- not supported ---
DIVX5_MOBILE --- not supported ---
DIVX5_HOME_THEATER --- not supported ---
DIVX5_HD_1080P --- not supported ---
H264_CONSTRAINED_BASELINE --- not supported ---
H264_EXTENDED --- not supported ---
H264_PROGRESSIVE_HIGH --- not supported ---
H264_CONSTRAINED_HIGH --- not supported ---
H264_HIGH_444_PREDICTIVE --- not supported ---
VP9_PROFILE_0 --- not supported ---
VP9_PROFILE_1 --- not supported ---
VP9_PROFILE_2 --- not supported ---
VP9_PROFILE_3 --- not supported ---
HEVC_MAIN --- not supported ---
HEVC_MAIN_10 --- not supported ---
HEVC_MAIN_STILL --- not supported ---
HEVC_MAIN_12 --- not supported ---
HEVC_MAIN_444 --- not supported ---
HEVC_MAIN_444_10 --- not supported ---
HEVC_MAIN_444_12 --- not supported ---
Output surface:
name width height nat types
----------------------------------------------------
B8G8R8A8 16384 16384 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8
R8G8B8A8 16384 16384 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8
R10G10B10A2 16384 16384 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8
B10G10R10A2 16384 16384 y NV12 YV12 UYVY YUYV Y8U8V8A8 V8U8Y8A8 P010 P016 A8I8 I8A8
Bitmap surface:
name width height
------------------------------
B8G8R8A8 16384 16384
R8G8B8A8 16384 16384
R10G10B10A2 16384 16384
B10G10R10A2 16384 16384
A8 16384 16384
Video mixer:
feature name sup
------------------------------------
DEINTERLACE_TEMPORAL y
DEINTERLACE_TEMPORAL_SPATIAL -
INVERSE_TELECINE -
NOISE_REDUCTION y
SHARPNESS y
LUMA_KEY y
HIGH QUALITY SCALING - L1 y
HIGH QUALITY SCALING - L2 -
HIGH QUALITY SCALING - L3 -
HIGH QUALITY SCALING - L4 -
HIGH QUALITY SCALING - L5 -
HIGH QUALITY SCALING - L6 -
HIGH QUALITY SCALING - L7 -
HIGH QUALITY SCALING - L8 -
HIGH QUALITY SCALING - L9 -
parameter name sup min max
-----------------------------------------------------
VIDEO_SURFACE_WIDTH y 48 4096
VIDEO_SURFACE_HEIGHT y 48 4096
CHROMA_TYPE y
LAYERS y 0 4
attribute name sup min max
-----------------------------------------------------
BACKGROUND_COLOR y
CSC_MATRIX y
NOISE_REDUCTION_LEVEL y 0.00 1.00
SHARPNESS_LEVEL y -1.00 1.00
LUMA_KEY_MIN_LUMA y
LUMA_KEY_MAX_LUMA y
I did see that almost all hardware acceleration is gated behind >= GFX11
, but that shouldn't matter because I do have a GFX 10.3 GPU.
AMD_DEBUG=info
shows vcn_decode
(and vcn_encode
) available:
$ AMD_DEBUG=info glxgears
Device info:
pci (domain:bus:dev.func): 0000:07:00.0
name = NAVI22
lowercase_name = navi22
marketing_name = AMD Radeon RX 6700 XT
is_pro_graphics = 0
pci_id = 0x73df
pci_rev_id = 0xc5
family = 79
gfx_level = 13
family_id = 143
chip_external_rev = 50
clock_crystal_freq = 100000 KHz
Features:
IP GFX 10.3 queues:1
IP COMP 10.3 queues:4
IP SDMA 5.2 queues:2
IP VCN_DEC 3.0 queues:1
IP VCN_ENC 3.0 queues:1
IP VCN_JPG 3.0 queues:1
has_graphics = 1
has_clear_state = 1
has_distributed_tess = 1
has_dcc_constant_encode = 1
has_rbplus = 1
rbplus_allowed = 1
has_load_ctx_reg_pkt = 1
has_out_of_order_rast = 0
cpdma_prefetch_writes_memory = 0
has_gfx9_scissor_bug = 0
has_tc_compat_zrange_bug = 0
has_msaa_sample_loc_bug = 0
has_ls_vgpr_init_bug = 0
has_32bit_predication = 1
has_3d_cube_border_color_mipmap = 1
never_stop_sq_perf_counters = 1
has_sqtt_rb_harvest_bug = 0
has_sqtt_auto_flush_mode_bug = 1
never_send_perfcounter_stop = 0
discardable_allows_big_page = 0
Display features:
use_display_dcc_unaligned = 0
use_display_dcc_with_retile_blit = 1
Memory info:
pte_fragment_size = 2097152
gart_page_size = 4096
gart_size = 50266112 MB
vram_size = 12288 MB
vram_vis_size = 12272 MB
vram_type = 9
vram_bit_width = 192
max_alloc_size = 9831 MB
min_alloc_size = 256
address32_hi = 0xffff8000
has_dedicated_vram = 1
all_vram_visible = 1
smart_access_memory = 1
max_tcc_blocks = 12
num_tcc_blocks = 12
tcc_cache_line_size = 128
tcc_rb_non_coherent = 1
pc_lines = 1024
lds_size_per_workgroup = 131072
lds_alloc_granularity = 1024
lds_encode_granularity = 512
max_memory_clock = 1000 MHz
l1_cache_size = 16384
l2_cache_size = 3145728
CP info:
gfx_ib_pad_with_type2 = 0
ib_alignment = 1024
me_fw_version = 64
me_fw_feature = 41
mec_fw_version = 98
mec_fw_feature = 41
pfp_fw_version = 95
pfp_fw_feature = 41
Multimedia info:
uvd_decode = 0
vcn_decode = 1
jpeg_decode = 1
vce_encode = 0
uvd_encode = 0
vcn_encode = 1
uvd_fw_version = 0
vce_fw_version = 0
vce_harvest_config = 0
Kernel & winsys capabilities:
drm = 3.46.0
has_userptr = 1
has_syncobj = 1
has_timeline_syncobj = 1
has_fence_to_handle = 1
has_local_buffers = 0
kernel_flushes_hdp_before_ib = 1
htile_cmask_support_1d_tiling = 1
si_TA_CS_BC_BASE_ADDR_allowed = 1
has_bo_metadata = 1
has_gpu_reset_status_query = 1
has_eqaa_surface_allocator = 1
has_format_bc1_through_bc7 = 1
kernel_flushes_tc_l2_after_ib = 1
has_indirect_compute_dispatch = 1
has_unaligned_shader_loads = 1
has_sparse_vm_mappings = 1
has_2d_tiling = 1
has_read_registers_query = 1
has_stable_pstate = 1
has_scheduled_fence_dependency = 1
mid_command_buffer_preemption_enabled = 0
has_tmz_support = 0
Shader core info:
cu_mask[SE0][SA0] = 0x3ff (10) CU_EN = 0x3ff
cu_mask[SE0][SA1] = 0x3ff (10) CU_EN = 0x3ff
cu_mask[SE1][SA0] = 0x3ff (10) CU_EN = 0x3ff
cu_mask[SE1][SA1] = 0x3ff (10) CU_EN = 0x3ff
spi_cu_en_has_effect = 0
max_shader_clock = 2725 MHz
num_good_compute_units = 40
max_good_cu_per_sa = 10
min_good_cu_per_sa = 10
max_se = 2
num_se = 2
max_sa_per_se = 2
max_wave64_per_simd = 16
num_physical_sgprs_per_simd = 2048
num_physical_wave64_vgprs_per_simd = 512
num_simd_per_compute_unit = 2
min_sgpr_alloc = 128
max_sgpr_alloc = 104
sgpr_alloc_granularity = 128
min_wave64_vgpr_alloc = 4
max_vgpr_alloc = 256
wave64_vgpr_alloc_granularity = 4
max_scratch_waves = 1280
Render backend info:
pa_sc_tile_steering_override = 0x0
max_render_backends = 8
num_tile_pipes = 16
pipe_interleave_bytes = 256
enabled_rb_mask = 0xff
max_alignment = 262144
pbb_max_alloc_count = 341
GB_ADDR_CONFIG: 0x00000344
num_pipes = 16
pipe_interleave_size = 256
max_compressed_frags = 2
num_pkrs = 8
Regression
Probably, yes: due to #6615 (closed) I briefly used a Mesa 22.1.0 build from Debian and with that I did get all the HEVC, h.264, etc. entry points on the same kernel with the same firmware. Therefore it seems likely, that this is a regression. But I really only used the 22.2.0-devel versions with my NAVI22 GPU, so I am not entirely sure.
Edited by Kai Wasserbäch