New issue
Advanced search Search tips

Issue 905814 link

Starred by 4 users

Issue metadata

Status: Assigned
Owner:
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug

Blocked on:
issue 913118



Sign in to add a comment

Update libva to 2.3.0

Reported by azhar.sh...@intel.com, Nov 15

Issue description

UserAgent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.77 Safari/537.36

Steps to reproduce the problem:
1. Update libva to 2.3.0
2. Pull in the media driver https://github.com/intel/media-driver, build and install on system
3. /var/log/chrome/chrome shows this error

[2192:2192:1115/130507.493909:ERROR:vaapi_wrapper.cc(337)] This build of Chromium requires VA-API version 1.1, system version: 1.3

and HW acceleration does not work.

What is the expected behavior?
With the updated libva-2.3.0 on the system, chromimum should be able to do HW acceleration.

What went wrong?
Since the chromimum OS libva is still at 2.0.0, updating the libva on system to 2.3 causes this conflict.

Did this work before? No 

Does this work in other browsers? Yes

Chrome version: R72-11264.0.0  Channel: dev
OS Version: R72
Flash Version:
 
Components: Internals>Media>Hardware
Cc: hiroh@chromium.org acourbot@chromium.org posciak@chromium.org
If I just pull in the browser source code, make no changes to it and build the browser alongwith uprev'd libva-2.3.0, I do not see the error mentioned from vaapi_wrapper.cc file.

Hardware acceleration works! So does this mean that if the libva-2.3.0 is merged, then browser would pull it in, while building and the browser would not need any change? Could you please confirm if this understanding is correct?

Below is the output of chrome://version

Chromium: 72.0.3618.0 (Developer Build) (64-bit)
Revision: 405c64c5cdcb9ffa7a870c4e326f0570bdd1c06e-refs/heads/master@{#610249}
Platform: 11291.0.2018-11-24-0828 (Test Build - azharsha) developer-build
If you merge libva 2.3.0, then the next Chromium build will indeed pick it up.

The problem is that it can take some time before it happens, during which HW acceleration will not be available.

One thing that we could do is relax the error on vaapi_wrapper.cc(337), since VA-API 1.3 seems to be ABI-compatible with 1.1. We could just use VA_CHECK_VERSION() to check that we are using an up-to-date version. The strict requirement was from the time when VA-API broke ABI compatibility on a regular basis.
So to clarify my suggestion, we could proceed that way:

1) Relax the VA-API requirement to use VA_CHECK_VERSION(), so newer versions on VA-API can be used.

2) Wait until the CL implementing 1) is in the Chromium binary used for Chrome OS builds

3) Update libva to 2.3.0 in Chrome OS, ensuring the video acceleration won't be broken.
Thanks for the suggestion Alexandre!

I will work on a patch and submit it for review.
Project Member

Comment 7 by bugdroid1@chromium.org, Nov 30

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/6f1309ef8fe10965e4d0018b4f1b80ac6deccdaa

commit 6f1309ef8fe10965e4d0018b4f1b80ac6deccdaa
Author: Azhar Shaikh <azhar.shaikh@intel.com>
Date: Fri Nov 30 23:11:57 2018

media/gpu/vaapi: Relax the version check for VA-API

Since the newer versions of VA-API are ABI compatible, relax the
version checks for VA-API, by using VA_CHECK_VERSION().
This will help in updating the libva to the latest releases,
while still supporting the old versions, till the new version of
libva is merged and picked by the builds. Thus ensuring that
hardware accleration is not broken while updating the libva.

Bug: 905814
TEST=libva-2.3.0 and libva-2.1.0 are able to do hardware acceleration.

Suggested-by: Alexandre Courbot <acourbot@chromium.org>
Signed-off-by: Azhar Shaikh <azhar.shaikh@intel.com>
Change-Id: I510549f72290d20676927eeeeb89a87199c062af
Reviewed-on: https://chromium-review.googlesource.com/c/1352519
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Hirokazu Honda <hiroh@chromium.org>
Commit-Queue: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#612832}
[modify] https://crrev.com/6f1309ef8fe10965e4d0018b4f1b80ac6deccdaa/AUTHORS
[modify] https://crrev.com/6f1309ef8fe10965e4d0018b4f1b80ac6deccdaa/media/gpu/vaapi/vaapi_wrapper.cc

FYI: The patch#7 is landed on the latest Chrome OS canary image.
Blockedon: 913118
Owner: hiroh@chromium.org
Status: Assigned (was: Unconfirmed)
Assigning to hiroh to track the complete solution.
Project Member

Comment 11 by bugdroid1@chromium.org, Jan 11

The following revision refers to this bug:
  https://chromium.googlesource.com/chromium/src.git/+/674fb0486a1b525cb850530c4cdc79506338bd37

commit 674fb0486a1b525cb850530c4cdc79506338bd37
Author: Azhar Shaikh <azhar.shaikh@intel.com>
Date: Fri Jan 11 07:44:38 2019

media/gpu/vaapi: Fix the VA_CHECK_VERSION

commit 6f1309ef8fe109 ("media/gpu/vaapi: Relax the version
check for VA-API") added the VA_CHECK_VERSION to relax the
VA-API version check. But it still does the same thing as
the previous check. VA_CHECK_VERSION will return 'true', only
when the VA-API version is greater than or equal to the
parameters passed to it. So in this case when the major and
minor version were passed from vaInitialize() output, it did
the same strict check as earlier. When trying to update libva
to a newer version, there will still be a mismatch, since
vaInitialize() would return the updated/newer libva version
installed on the system, but the chromium would still be built
with older version (libva-2.1.0 as of now).
To fix this and actually relax the check, make sure the system
version of libva is greater than the libva version with which
the browser is built, since libva is backward compatible. This
will allow any future libva updates without breaking existing code.

Fixes: 6f1309ef8fe109 ("media/gpu/vaapi: Relax the version check for VA-API")

Bug: 905814
TEST=Below scenarios were tested and h/w acceleration is working successfully.
TEST=Build chromium with libva-2.3.0 and system version 2.3.0
TEST=Build chromium with libva-2.1.0 and system version 2.3.0
TEST=Build chromium with libva 2.1.0 and system version 2.1.0

Signed-off-by: Azhar Shaikh <azhar.shaikh@intel.com>
Change-Id: I1ec14aabed21b7d6b6fc55080bbac17233c40ec0
Reviewed-on: https://chromium-review.googlesource.com/c/1376716
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Miguel Casas <mcasas@chromium.org>
Cr-Commit-Position: refs/heads/master@{#621940}
[modify] https://crrev.com/674fb0486a1b525cb850530c4cdc79506338bd37/media/gpu/vaapi/vaapi_wrapper.cc

Owner: acourbot@chromium.org
Alex is much more familiar with this process than me.
Assigned to Alex.

Comment 13 by acourbot@chromium.org, Yesterday (29 hours ago)

Status: Fixed (was: Assigned)
We are having some regressions with the iHD driver, but libva itself is updated to 2.3.0:

http://crrev.com/c/1339059
http://crrev.com/c/1372294
http://crrev.com/c/1374992

Closing this bug.

Comment 14 by acourbot@chromium.org, Yesterday (29 hours ago)

Cc: dstaessens@chromium.org
Status: Assigned (was: Fixed)
Actually reopening as it seems the uprev to 2.3.0, not the switch to iHD, is what caused the regression. :/

Sign in to add a comment