iris: Unable to import I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS surfaces produced by iHD vaapi driver
System information
System: Host: fido7 Kernel: 5.16.2-051602-generic x86_64 bits: 64 compiler: gcc v: 11.2.0 Desktop: GNOME 40.5
tk: GTK 3.24.30 wm: gnome-shell dm: GDM3 Distro: Ubuntu 21.10 (Impish Indri)
CPU: Info: 12-Core model: 12th Gen Intel Core i9-12900K bits: 64 type: MT MCP arch: Alder Lake rev: 2 cache: L1: 1.4 MiB
L2: 30 MiB L3: 60 MiB
flags: avx avx2 lm nx pae sse sse2 sse3 sse4_1 sse4_2 ssse3 vmx bogomips: 152985
Speed: 600 MHz min/max: 800/6500 MHz Core speeds (MHz): 1: 600 2: 801 3: 929 4: 805 5: 663 6: 600 7: 600 8: 600
9: 800 10: 1309 11: 801 12: 800 13: 600 14: 800 15: 800 16: 801 17: 801 18: 601 19: 853 20: 700 21: 695 22: 700
23: 810 24: 600
Graphics: Device-1: Intel AlderLake-S GT1 vendor: ASRock driver: i915 v: kernel bus-ID: 00:02.0 chip-ID: 8086:4680
Device-2: NVIDIA GA102 [GeForce RTX 3090] driver: nvidia v: 495.46 bus-ID: 01:00.0 chip-ID: 10de:2204
Display: server: X.Org 1.20.13 compositor: gnome-shell driver: loaded: modesetting,nvidia
unloaded: fbdev,nouveau,vesa resolution: 3840x2160~60Hz s-dpi: 96
OpenGL: renderer: Mesa Intel Graphics (ADL-S GT1) v: 4.6 Mesa 21.3.5 - kisak-mesa PPA direct render: Yes
iHD Driver: 22.1.0+ds1-1
Describe the issue
Attempts to import vaapi surfaces exported via vaExportSurface
fail with EGL_BAD_MATCH
even though !6486 (merged) should have implemented this ability.
Exported vaapi surfaces are identified with drm modifier I915_FORMAT_MOD_Y_TILED_GEN12_MC_CCS
I've tested this in mpv, which I work on, and also in firefox with vaapi enabled. Both worked fine on my old Coffeelake system.
The relevant code in mpv is here: https://github.com/mpv-player/mpv/blob/master/video/out/hwdec/hwdec_vaapi_gl.c#L158
mpv does not produce meaningful logging for this kind of failure, but I did local debug logging to verify that we were given surfaces using this format.
I also verified that if separate layers are requested from vaapi, you get two surfaces, each with two planes, and if composed layers are requested, you get one surface with four planes, and that matches the documentation for the drm format.
Regression
No evidence this ever worked.