VA-API accelerated videos are displayed all red w/ Encoder format conversion (EFC) support for AMD VCN2.0 devices patch
System information
System:
Host: bluestang-pc Kernel: 5.16.14-200.fc35.x86_64 x86_64 bits: 64
compiler: gcc v: 2.37-10.fc35 Desktop: KDE Plasma 5.24.2 tk: Qt 5.15.2
wm: kwin_wayland dm: SDDM Distro: Fedora release 35 (Thirty Five)
CPU:
Info: 12-core model: AMD Ryzen 9 5900X bits: 64 type: MT MCP arch: Zen 3
rev: 0 cache: L1: 768 KiB L2: 6 MiB L3: 64 MiB
Speed (MHz): avg: 2388 high: 3596 min/max: 2200/4950 boost: enabled
cores: 1: 2663 2: 2199 3: 2869 4: 3592 5: 2873 6: 3596 7: 2200 8: 2197
9: 2194 10: 2191 11: 2196 12: 2199 13: 2194 14: 2193 15: 2194 16: 2197
17: 2195 18: 2200 19: 2199 20: 2197 21: 2195 22: 2195 23: 2195 24: 2196
bogomips: 177605
Flags: avx avx2 ht lm nx pae sse sse2 sse3 sse4_1 sse4_2 sse4a ssse3 svm
Graphics:
Device-1: AMD Navi 21 [Radeon RX 6800/6800 XT / 6900 XT] vendor: ASRock
driver: amdgpu v: kernel pcie: speed: 16 GT/s lanes: 16 ports: active: DP-2
empty: DP-1,DP-3,HDMI-A-1 bus-ID: 2f:00.0 chip-ID: 1002:73bf
Display: wayland server: X.org v: 1.20.14 with: Xwayland v: 21.1.4
compositor: kwin_wayland driver: X: loaded: amdgpu,ati
unloaded: fbdev,modesetting,radeon,vesa gpu: amdgpu display-ID: 0
Monitor-1: DP-2 res: 2560x1440 size: N/A
OpenGL: renderer: AMD Radeon RX 6800 XT (sienna_cichlid LLVM 13.0.0 DRM
3.44 5.16.14-200.fc35.x86_64)
v: 4.6 Mesa 22.1.0-devel direct render: Yes
Describe the issue
Using Chrome w/ video hw-acclerated VA-API results in videos being displayed in a all red color. This is easily reproducible with any HD/4K videos in YouTube.
In order to get VA-API video acceleration to work you must run Chrome with the following options and this MR !15381 (closed) to fix vsync during playback:
google-chrome-stable --use-gl=egl --enable-features=VaapiVideoDecoder,VaapiVideoEncoder --disable-features=UseChromeOSDirectVideoDecoder --ignore-gpu-blocklist
In order to validate that VA-API hw-acceleration is working you can look at the output of chrome://gpu
and it will report:
Video Acceleration Information
Decoding (VideoDecoder)
Decode h264 baseline 16x16 to 4096x4906 pixels
Decode h264 main 16x16 to 4096x4906 pixels
Decode h264 high 16x16 to 4096x4906 pixels
Decode vp9 profile0 16x16 to 8192x4352 pixels
Decoding (Legacy VideoDecodeAccelerator)
Decode h264 baseline 16x16 to 4096x4906 pixels
Decode h264 main 16x16 to 4096x4906 pixels
Decode h264 high 16x16 to 4096x4906 pixels
Decode vp9 profile0 16x16 to 8192x4352 pixels
Encoding
Encode h264 baseline 321x241 to 4096x2304 pixels, and/or 30.000 fps
Encode h264 main 321x241 to 4096x2304 pixels, and/or 30.000 fps
Encode h264 high 321x241 to 4096x2304 pixels, and/or 30.000 fps
During video playback you can also look at the Developer Tools -> Media and the Video Decoder will report as:
Decoder Name VDAVideoDecoder
Hardware Decoder true
Regression
This is definitely a regression as reverting all the commits of !15196 (merged) fixes the issue.