Correct libva driver for Intel Comet Lake

126 views
Skip to first unread message

Kevin Oberman

unread,
Jun 23, 2021, 1:49:15 AM6/23/21
to x11-list freebsd
The Intel page on libva-media-driver states that it supports all i915
processors broadwell or newer. Comet Lake is 10th Gen, so much newer than
Broadwell, but it also lists supported processors and Comet Lake is not on
the list.

Any ideas on whether I should install it? If Comet Lake is not supported,
will it fall back to the libva-intel-hybrid-driver?

If I don't get an answer, I guess I'll just try it and see what happens. It
looks much better than the hybrid driver... if it works with my system.
--
Kevin Oberman, Part time kid herder and retired Network Engineer
E-mail: rkob...@gmail.com
PGP Fingerprint: D03FB98AFA78E3B78C1694B318AB39EF1B055683

Jan Beich

unread,
Jun 23, 2021, 3:07:17 AM6/23/21
to Kevin Oberman, x11-list freebsd
Kevin Oberman <rkob...@gmail.com> writes:

> The Intel page on libva-media-driver states that it supports all i915
> processors broadwell or newer. Comet Lake is 10th Gen, so much newer than
> Broadwell, but it also lists supported processors and Comet Lake is not on
> the list.

What PCI ID does it have? For 0x9B?? use libva-intel-media-driver.

> Any ideas on whether I should install it? If Comet Lake is not supported,
> will it fall back to the libva-intel-hybrid-driver?

libva-intel-hybrid-driver can only be used via libva-intel-driver which
doesn't support 0x9B?? but maybe try the following:

diff --git a/multimedia/libva-intel-driver/Makefile b/multimedia/libva-intel-driver/Makefile
index e29648b6f2dd..edba9fbbfe3c 100644
--- a/multimedia/libva-intel-driver/Makefile
+++ b/multimedia/libva-intel-driver/Makefile
@@ -1,5 +1,6 @@
PORTNAME= libva-intel-driver
DISTVERSION= 2.4.1
+PORTREVISION= 1
CATEGORIES= multimedia

MAINTAINER= jbe...@FreeBSD.org
diff --git a/multimedia/libva-intel-driver/files/patch-cml-pciids b/multimedia/libva-intel-driver/files/patch-cml-pciids
new file mode 100644
index 000000000000..b5dc3784f458
--- /dev/null
+++ b/multimedia/libva-intel-driver/files/patch-cml-pciids
@@ -0,0 +1,30 @@
+--- src/i965_pciids.h.orig 2020-06-01 01:17:45 UTC
++++ src/i965_pciids.h
+@@ -207,6 +207,27 @@ CHIPSET(0x3E98, cfl, cfl, "Intel(R) Coffee Lake"
+ CHIPSET(0x3E99, cfl, cfl, "Intel(R) Coffee Lake")
+ CHIPSET(0x3E9A, cfl, cfl, "Intel(R) Coffee Lake")
+ CHIPSET(0x3E9B, cfl, cfl, "Intel(R) Coffee Lake")
++CHIPSET(0x9B21, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BAA, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BAB, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BAC, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BA0, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BA5, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BA8, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BA4, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BA2, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9B41, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BCA, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BCB, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BCC, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BC0, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BC5, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BC8, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BC4, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BC2, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BC6, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BE6, cfl, cfl, "Intel(R) Comet Lake")
++CHIPSET(0x9BF6, cfl, cfl, "Intel(R) Comet Lake")
+ CHIPSET(0x5A40, cnl, cnl, "Intel(R) CannonLake")
+ CHIPSET(0x5A41, cnl, cnl, "Intel(R) CannonLake")
+ CHIPSET(0x5A42, cnl, cnl, "Intel(R) CannonLake")

Evgeniy Khramtsov via freebsd-x11

unread,
Jun 23, 2021, 4:18:09 AM6/23/21
to Kevin Oberman, freeb...@freebsd.org
"libva-media-driver" does not exist as a $PORTNAME.

There are:
libva-intel-driver: for Intel GMA 4500 to UHD 630
libva-intel-hybrid-driver: Haswell to Braswell Hybrid VP{8,9} {en,de}decoder.
The two above are legacy drivers and were superseded by libva-intel-media-driver:
https://github.com/intel/intel-vaapi-driver/issues/499#issuecomment-638556599

intel-media-driver should support Comet Lake starting from tag intel-media-19.2.pre1:
https://github.com/intel/media-driver/commit/44ea2083b8f6c0afd6b7ee6b204a6017d1b67448
https://github.com/intel/media-driver/issues/771#issuecomment-769842424

Remove the legacy drivers if you have them installed, then install
libva-intel-media-driver, libva-utils (for vainfo) and mpv (for test).

See if you have VA-API profiles (example for Comet Lake ES that reports
as Coffee Lake 0x3E9B):

$ vainfo
libva info: VA-API version 1.12.0
libva info: Trying to open /usr/local/lib/dri/iHD_drv_video.so
libva info: Found init function __vaDriverInit_1_12
libva info: va_openDriver() returns 0
vainfo: VA-API version: 1.12 (libva 2.12.0)
vainfo: Driver version: Intel iHD driver for Intel(R) Gen Graphics - 21.2.2 (intel-media-21.2.2)
vainfo: Supported profile and entrypoints
VAProfileNone : VAEntrypointVideoProc
VAProfileNone : VAEntrypointStats
VAProfileMPEG2Simple : VAEntrypointVLD
VAProfileMPEG2Simple : VAEntrypointEncSlice
VAProfileMPEG2Main : VAEntrypointVLD
VAProfileMPEG2Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointVLD
VAProfileH264Main : VAEntrypointEncSlice
VAProfileH264Main : VAEntrypointFEI
VAProfileH264Main : VAEntrypointEncSliceLP
VAProfileH264High : VAEntrypointVLD
VAProfileH264High : VAEntrypointEncSlice
VAProfileH264High : VAEntrypointFEI
VAProfileH264High : VAEntrypointEncSliceLP
VAProfileVC1Simple : VAEntrypointVLD
VAProfileVC1Main : VAEntrypointVLD
VAProfileVC1Advanced : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointVLD
VAProfileJPEGBaseline : VAEntrypointEncPicture
VAProfileH264ConstrainedBaseline: VAEntrypointVLD
VAProfileH264ConstrainedBaseline: VAEntrypointEncSlice
VAProfileH264ConstrainedBaseline: VAEntrypointFEI
VAProfileH264ConstrainedBaseline: VAEntrypointEncSliceLP
VAProfileVP8Version0_3 : VAEntrypointVLD
VAProfileVP8Version0_3 : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointVLD
VAProfileHEVCMain : VAEntrypointEncSlice
VAProfileHEVCMain : VAEntrypointFEI
VAProfileHEVCMain10 : VAEntrypointVLD
VAProfileHEVCMain10 : VAEntrypointEncSlice
VAProfileVP9Profile0 : VAEntrypointVLD
VAProfileVP9Profile2 : VAEntrypointVLD

Then try hardware VA-API decoding using mpv:

$ mpv --no-config --msg-level=vo/gpu=v,vd=v --hwdec=vaapi --vo=gpu \
https://base-n.de/webm/out9.webm

Check for:
[vd] Selected codec: vp9 (Google VP9)
[vd] Pixel formats supported by decoder: vaapi_vld yuv420p
[vd] Codec profile: Profile 0 (0x0)
[vd] Requesting pixfmt 'vaapi_vld' from decoder.
Using hardware decoding (vaapi).

Kevin Oberman

unread,
Jun 26, 2021, 12:21:39 AM6/26/21
to Jan Beich, x11-list freebsd
Thanks, Jan!

My Comet Lake is 0x9b41, so it looks like intel-media-driver should work
with it. That leads me to wonder how I can determine which VA driver is
actually in use. I'm guessing it might be "VDPAU driver: va_gl", but I am
unsure what that means other than that VA is there (which I also know from
video performance). I now have all three Intel VA drivers installed. and
added the patch to include Comet Lake cards into libva-intel-driver.

Jan Beich

unread,
Jun 26, 2021, 12:40:07 AM6/26/21
to Kevin Oberman, x11-list freebsd
Kevin Oberman <rkob...@gmail.com> writes:

> My Comet Lake is 0x9b41, so it looks like intel-media-driver should work
> with it. That leads me to wonder how I can determine which VA driver is
> actually in use. I'm guessing it might be "VDPAU driver: va_gl", but I am
> unsure what that means other than that VA is there (which I also know from
> video performance). I now have all three Intel VA drivers installed. and
> added the patch to include Comet Lake cards into libva-intel-driver.

Install libva-utils then run vainfo:
- /usr/local/lib/dri/i965_drv_video.so is libva-intel-driver
- /usr/local/lib/dri/iHD_drv_video.so is libva-intel-media-driver

Kevin Oberman

unread,
Jun 26, 2021, 10:06:52 AM6/26/21
to Jan Beich, x11-list freebsd
Got it. I am running the intel-media-driver!

Thanks so much!
Reply all
Reply to author
Forward
0 new messages