New issue
Advanced search Search tips

Issue 742069 link

Starred by 3 users

Issue metadata

Status: Fixed
Owner:
Closed: Jul 2017
Cc:
Components:
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 1
Type: Feature



Sign in to add a comment

Remove third_party/libva

Project Member Reported by acourbot@chromium.org, Jul 13 2017

Issue description

Feature description:
third_party/libva is just made of headers that should anyway be present on the target system if libva is being used. We should use the system headers to make sure there are no mismatch between the ABI we compile for and the one we actually use (unexpected libva ABI breakages have occurred several times in the past).

 
Components: OS>Kernel>Video
https://chromium-review.googlesource.com/c/569509/ performs the header fix that was done in Chromium's copy of the headers to the system headers used by ChromeOS builds.
I thought the headers in third_party are required for stand alone Chrome builds (in the chrome CQ etc)?
Chrome CQ builds will have vaapi-related Chrome source code/files excluded for non-CrOS non-simplechrome builds. The simplechrome compile-only builder in Chrome CQ will still build it, pulling from CrOS sysroot.
so the chrome CQ will never even build-test the vaapi code?
It will, via the simplechrome CQ builder (chromeos_amd64-generic_chromium_compile_only_ng).
Project Member

Comment 7 by bugdroid1@chromium.org, Jul 14 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/30ea0005f50ded5ba8990b963b7e9336442d45f0

commit 30ea0005f50ded5ba8990b963b7e9336442d45f0
Author: Alexandre Courbot <acourbot@chromium.org>
Date: Fri Jul 14 16:44:37 2017

chromeos-chrome: define use_vaapi when vaapi is used

As part of the plan to remove the libva headers from Chromium's source,
we need to selectively enable compilation of VA-dependent files when
libva is actually used. This patch makes sure the vaapi USE tag is
reflected into the GN_ARGS in such a case.

BUG= chromium:742069 
TEST=Ran local emerge on chromeos-chrome, confirmed that use_vaapi was
defined in GN args and that related vaapi files were compiled.

Change-Id: I17ae9edd1b67cd4a38f275706cec35a9a3f820b8
Reviewed-on: https://chromium-review.googlesource.com/571620
Commit-Ready: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[modify] https://crrev.com/30ea0005f50ded5ba8990b963b7e9336442d45f0/chromeos-base/chromeos-chrome/metadata.xml
[modify] https://crrev.com/30ea0005f50ded5ba8990b963b7e9336442d45f0/chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild

Project Member

Comment 8 by bugdroid1@chromium.org, Jul 15 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/1c469854c810f2f632b5143449d347a2adac4d0b

commit 1c469854c810f2f632b5143449d347a2adac4d0b
Author: Alexandre Courbot <acourbot@chromium.org>
Date: Sat Jul 15 06:22:07 2017

libva: fix header ambiguous to C++ compiler

We intent to switch to system headers when building Chromium. For that
purpose, fixes that were usually made in the chromium-hosted headers
now need to be applied here. Add a patch that fixes a public header
inconsistency with libva 1.7.1.

BUG= chromium:742069 
TEST=emerged libva and checked the installed header was as expected.

Change-Id: Ib997cd990397a8a21aa51ccb5431e47d4a3effe1
Reviewed-on: https://chromium-review.googlesource.com/569509
Commit-Ready: Alexandre Courbot <acourbot@chromium.org>
Tested-by: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Mike Frysinger <vapier@chromium.org>

[rename] https://crrev.com/1c469854c810f2f632b5143449d347a2adac4d0b/x11-libs/libva/libva-1.7.1-r2.ebuild
[add] https://crrev.com/1c469854c810f2f632b5143449d347a2adac4d0b/x11-libs/libva/files/libva-1.7.1_Remove-zero-size-union-ambiguous-to-C-compiler.patch
[modify] https://crrev.com/1c469854c810f2f632b5143449d347a2adac4d0b/x11-libs/libva/libva-1.7.1.ebuild

Project Member

Comment 9 by bugdroid1@chromium.org, Jul 20 2017

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

commit 064e7ba0f1f0e70fa8f470ebab4bedc29051facd
Author: Alexandre Courbot <acourbot@chromium.org>
Date: Thu Jul 20 11:26:54 2017

media: declare use_vaapi arg

The newer CrOS toolchains declare a new use_vaapi argument. Unless this
argument is declared in Chromium as well, gn gen will display this error
message:

ERROR at the command-line "--args":3:13: Build argument has no effect.
use_vaapi = true

The ninja files will be successfully generated nonetheless, but this is
still disturbing, so fix this by declaring this argument.

BUG= 742069 
TEST=Made sure Chromium was compiling with use_vaapi declared or not.

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Ib10ac7d0762a09d13ba92391ba55585b786ad3f6
Reviewed-on: https://chromium-review.googlesource.com/579028
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488196}
[modify] https://crrev.com/064e7ba0f1f0e70fa8f470ebab4bedc29051facd/media/gpu/args.gni

Project Member

Comment 10 by bugdroid1@chromium.org, Jul 23 2017

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

commit c13a597516f19a1c7489b342cd8198ea173d5b68
Author: Alexandre Courbot <acourbot@chromium.org>
Date: Sun Jul 23 03:48:48 2017

Remove third_party/libva

There is no need to carry a copy of the libva headers when they are
supposed to be present on the system anyway (since we are linking
against the system library).

Relying on the system headers also reduces the risk of ABI mismatch,
and makes updating libva easier since it only needs to be done on the
system side.

Since the headers are removed, we must now make sure that the compiler
will not meet them in cases where they are irrelevant. To this end, add
a use_vaapi GN variable and USE_VAAPI compiler variable that control
whether VA-API related code will be included.

BUG= 742069 
TEST=Did two builds with use_vaapi set to true and false in the gn args.
Confirmed that VA-API related files were only compiled in the case
use_vaapi is true. Also confirmed that the video decode, video encode,
and jpeg decode accelerator unittests compiled in both cases and that the
tests actually use the VA-API when use_vaapi is defined.

Cq-Include-Trybots: master.tryserver.chromium.android:android_optional_gpu_tests_rel;master.tryserver.chromium.linux:linux_optional_gpu_tests_rel;master.tryserver.chromium.mac:mac_optional_gpu_tests_rel;master.tryserver.chromium.win:win_optional_gpu_tests_rel
Change-Id: Id4b8dbe31856344824023563d369735989562e82
Reviewed-on: https://chromium-review.googlesource.com/569529
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Reviewed-by: Nico Weber <thakis@chromium.org>
Reviewed-by: Pawel Osciak <posciak@chromium.org>
Reviewed-by: Paweł Hajdan Jr. <phajdan.jr@chromium.org>
Reviewed-by: Richard Coles <torne@chromium.org>
Reviewed-by: Kenneth Russell <kbr@chromium.org>
Cr-Commit-Position: refs/heads/master@{#488877}
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/content/gpu/BUILD.gn
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/content/gpu/gpu_main.cc
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/BUILD.gn
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/DEPS
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/args.gni
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/gpu_video_decode_accelerator_factory.cc
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/gpu_video_decode_accelerator_factory.h
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/gpu_video_encode_accelerator_factory.cc
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/ipc/service/BUILD.gn
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/ipc/service/gpu_jpeg_decode_accelerator_factory_provider.cc
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/jpeg_decode_accelerator_unittest.cc
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/va_stub_header.fragment
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/va_surface.h
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/vaapi_drm_picture.cc
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/vaapi_video_decode_accelerator.cc
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/vaapi_video_encode_accelerator.cc
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/vaapi_wrapper.cc
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/vaapi_wrapper.h
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/video_decode_accelerator_unittest.cc
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/media/gpu/video_encode_accelerator_unittest.cc
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/BUILD.gn
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/COPYING
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/OWNERS
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/README.chromium
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/drm/va_drm.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/drm/va_drm_auth.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/drm/va_drm_auth_x11.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/drm/va_drm_utils.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/egl/va_backend_egl.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/glx/va_backend_glx.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/glx/va_glx.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/glx/va_glx_impl.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/glx/va_glx_private.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/sysdeps.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_android.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_backend.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_backend_tpi.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_backend_vpp.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_compat.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_dec_hevc.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_dec_jpeg.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_dec_vp8.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_dec_vp9.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_drmcommon.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_enc_h264.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_enc_hevc.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_enc_jpeg.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_enc_mpeg2.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_enc_vp8.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_enc_vp9.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_fool.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_tpi.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_trace.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_version.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_vpp.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/va_x11.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/wayland/va_backend_wayland.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/wayland/va_wayland.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/wayland/va_wayland_drm.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/wayland/va_wayland_emgd.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/wayland/va_wayland_private.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/wayland/wayland-drm-client-protocol.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/x11/va_dri2.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/x11/va_dri2str.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/x11/va_dri2tokens.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/x11/va_dricommon.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/x11/va_fglrx.h
[delete] https://crrev.com/ebd65246aab3b4b1cb5bd462388344195420078d/third_party/libva/va/x11/va_nvctrl.h
[modify] https://crrev.com/c13a597516f19a1c7489b342cd8198ea173d5b68/tools/licenses.py

Status: Fixed (was: Started)
All required changes merged! Closing this for now.

Sign in to add a comment