Bug 1870180 - [VA-API] Silence some vaapitest warnings, r=stransky

The library not being installed or initialization failing - for example
because no VA driver is available - is common and expected on an
increasing number of setups, notably most ARM devices with V4L2
decoders.
Thus tone down the warnings. The logs are still available when setting
`MOZ_GFX_DEBUG=1`.

Also fix a typo - searching for `sVaGetDisplayDRM` will be rather
disappointing.

Note that some users also run into the `failed to open renderDeviceFD`
case. That's an actual bug, however, and only happens when we guessed a
wrong path. The affected devices (ignoring setups with very old Mesa)
are split display/render SoCs where `EGL_EXT_device_drm_render_node`
is not exposed yet - which is finally fixed in Mesa 23.3.

Differential Revision: https://phabricator.services.mozilla.com/D196525
This commit is contained in:
Robert Mader 2023-12-15 10:22:50 +00:00
parent ceba504d3a
commit f83e34640e

View file

@ -105,7 +105,7 @@ static void vaapitest(const char* aRenderDevicePath) {
libDrm = dlopen("libva-drm.so.2", RTLD_LAZY);
if (!libDrm) {
record_error("VA-API test failed: libva-drm.so.2 is missing.");
log("vaapitest failed: libva-drm.so.2 is missing\n");
return;
}
@ -118,7 +118,7 @@ static void vaapitest(const char* aRenderDevicePath) {
display = sVaGetDisplayDRM(renderDeviceFD);
if (!display) {
record_error("VA-API test failed: sVaGetDisplayDRM failed.");
record_error("VA-API test failed: vaGetDisplayDRM failed.");
return;
}
@ -126,7 +126,6 @@ static void vaapitest(const char* aRenderDevicePath) {
VAStatus status = vaInitialize(display, &major, &minor);
if (status != VA_STATUS_SUCCESS) {
log("vaInitialize failed %d\n", status);
record_error("VA-API test failed: failed to initialise VAAPI connection.");
return;
} else {
log("vaInitialize finished\n");