summarylogtreecommitdiffstats
diff options
context:
space:
mode:
authorMaxim Baz2020-02-15 10:56:01 +0100
committerMaxim Baz2020-02-15 10:56:01 +0100
commit2e0fce5ccb6b9da850d74b25006b4708570ff15f (patch)
tree8283ea519bd472f9a8588deda8275276e99b8fe7
parent527fc2143a721d95353a60a79fd0889618efaed0 (diff)
downloadaur-2e0fce5ccb6b9da850d74b25006b4708570ff15f.tar.gz
chromium-vaapi: add patch for wayland
-rw-r--r--.SRCINFO4
-rw-r--r--PKGBUILD5
-rw-r--r--vaapi-fix-wayland-init.patch82
3 files changed, 89 insertions, 2 deletions
diff --git a/.SRCINFO b/.SRCINFO
index d3ddd4a3568e..c069aa4bf67e 100644
--- a/.SRCINFO
+++ b/.SRCINFO
@@ -1,7 +1,7 @@
pkgbase = chromium-vaapi
pkgdesc = Chromium with VA-API support to enable hardware acceleration
pkgver = 80.0.3987.106
- pkgrel = 1
+ pkgrel = 2
url = https://www.chromium.org/Home
install = chromium.install
arch = x86_64
@@ -61,6 +61,7 @@ pkgbase = chromium-vaapi
source = chromium-launcher-6.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v6.tar.gz
source = chromium-drirc-disable-10bpc-color-configs.conf
source = vaapi-fix.patch
+ source = vaapi-fix-wayland-init.patch
source = cros-search-service-Include-cmath-for-std-pow.patch
source = move-RemoteTreeNode-declaration.patch
source = sync-enable-USSPasswords-by-default.patch
@@ -76,6 +77,7 @@ pkgbase = chromium-vaapi
sha256sums = 04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1
sha256sums = babda4f5c1179825797496898d77334ac067149cac03d797ab27ac69671a7feb
sha256sums = 0ec6ee49113cc8cc5036fa008519b94137df6987bf1f9fbffb2d42d298af868a
+ sha256sums = a4c022263b474ae14abd899b8e453f7d9ed9c0715b0b248b8a423aa2777095c4
sha256sums = 0a8d1af2a3734b5f99ea8462940e332db4acee7130fe436ad3e4b7ad133e5ae5
sha256sums = 21f631851cdcb347f40793485b168cb5d0da65ae26ae39ba58d624c66197d0a5
sha256sums = 08ef82476780e0864b5bf7f20eb19db320e73b9a5d4f595351e12e97dda8746f
diff --git a/PKGBUILD b/PKGBUILD
index 37530413d7fb..4fbc4e750d82 100644
--- a/PKGBUILD
+++ b/PKGBUILD
@@ -11,7 +11,7 @@
pkgname=chromium-vaapi
pkgver=80.0.3987.106
-pkgrel=1
+pkgrel=2
_launcher_ver=6
pkgdesc="Chromium with VA-API support to enable hardware acceleration"
arch=('x86_64')
@@ -34,6 +34,7 @@ source=(https://commondatastorage.googleapis.com/chromium-browser-official/chrom
chromium-launcher-$_launcher_ver.tar.gz::https://github.com/foutrelis/chromium-launcher/archive/v$_launcher_ver.tar.gz
chromium-drirc-disable-10bpc-color-configs.conf
vaapi-fix.patch
+ vaapi-fix-wayland-init.patch
cros-search-service-Include-cmath-for-std-pow.patch
move-RemoteTreeNode-declaration.patch
sync-enable-USSPasswords-by-default.patch
@@ -49,6 +50,7 @@ sha256sums=('2ead924b4414a8a5f085fa0e0df56563ef41bd4290cc403c05d5beec238cbe82'
'04917e3cd4307d8e31bfb0027a5dce6d086edb10ff8a716024fbb8bb0c7dccf1'
'babda4f5c1179825797496898d77334ac067149cac03d797ab27ac69671a7feb'
'0ec6ee49113cc8cc5036fa008519b94137df6987bf1f9fbffb2d42d298af868a'
+ 'a4c022263b474ae14abd899b8e453f7d9ed9c0715b0b248b8a423aa2777095c4'
'0a8d1af2a3734b5f99ea8462940e332db4acee7130fe436ad3e4b7ad133e5ae5'
'21f631851cdcb347f40793485b168cb5d0da65ae26ae39ba58d624c66197d0a5'
'08ef82476780e0864b5bf7f20eb19db320e73b9a5d4f595351e12e97dda8746f'
@@ -111,6 +113,7 @@ prepare() {
# Fix VA-API on Intel and Nvidia
patch -Np1 -i ../vaapi-fix.patch
+ patch -Np1 -i ../vaapi-fix-wayland-init.patch
# https://crbug.com/957519
patch -Np1 -i ../cros-search-service-Include-cmath-for-std-pow.patch
diff --git a/vaapi-fix-wayland-init.patch b/vaapi-fix-wayland-init.patch
new file mode 100644
index 000000000000..a07814969f41
--- /dev/null
+++ b/vaapi-fix-wayland-init.patch
@@ -0,0 +1,82 @@
+From 4a04af6bbd5b1a55e2e1a7c22f13f8571c2dd7ed Mon Sep 17 00:00:00 2001
+From: Julien Isorce <julien.isorce@chromium.org>
+Date: Fri, 24 Jan 2020 00:30:33 +0000
+Subject: [PATCH] Reland "Call PreSandboxStartup after GL initialization in GpuInit"
+
+This is a reland of d17c53b341adcfc9e2626162536a08c9f3e24017
+
+Original change's description:
+> Call PreSandboxStartup after GL initialization in GpuInit
+>
+> Fixes "vaInitialize failed: unknown libva error"
+> on Wayland with LIBVA_DRIVER_NAME=i965
+>
+> VaapiWrapper relies on the GL implementation to decide
+> which display to use. If the GL implementation is none,
+> then VaapiWrapper is likely to do the wrong guess resulting
+> in the above error.
+>
+> Bug: 1041229
+> Change-Id: I1255a032a5e14b3aaffe3026a886de7e6d9ff0d7
+> Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2011640
+> Reviewed-by: Maggie Chen <magchen@chromium.org>
+> Reviewed-by: Kenneth Russell <kbr@chromium.org>
+> Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
+> Cr-Commit-Position: refs/heads/master@{#733847}
+
+Bug: 1041229
+Change-Id: I8e268596a1e2a1b3da7d7e75b8943accc85dd2d7
+Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2013806
+Reviewed-by: Alexandre Courbot <acourbot@chromium.org>
+Reviewed-by: Maggie Chen <magchen@chromium.org>
+Reviewed-by: Kenneth Russell <kbr@chromium.org>
+Commit-Queue: Julien Isorce <julien.isorce@chromium.org>
+Cr-Commit-Position: refs/heads/master@{#734746}
+---
+
+diff --git a/gpu/ipc/service/gpu_init.cc b/gpu/ipc/service/gpu_init.cc
+index 04883fc..4e63f7a 100644
+--- a/gpu/ipc/service/gpu_init.cc
++++ b/gpu/ipc/service/gpu_init.cc
+@@ -221,10 +221,16 @@
+ delayed_watchdog_enable = true;
+ #endif
+
++#if defined(OS_LINUX)
+ // PreSandbox is mainly for resource handling and not related to the GPU
+ // driver, it doesn't need the GPU watchdog. The loadLibrary may take long
+ // time that killing and restarting the GPU process will not help.
+- sandbox_helper_->PreSandboxStartup();
++ if (gpu_preferences_.gpu_sandbox_start_early) {
++ // The sandbox will be started earlier than usual (i.e. before GL) so
++ // execute the pre-sandbox steps now.
++ sandbox_helper_->PreSandboxStartup();
++ }
++#endif
+
+ // Start the GPU watchdog only after anything that is expected to be time
+ // consuming has completed, otherwise the process is liable to be aborted.
+@@ -320,6 +326,23 @@
+ }
+ }
+
++ // The ContentSandboxHelper is currently the only one implementation of
++ // gpu::GpuSandboxHelper and it has no dependency. Except on Linux where
++ // VaapiWrapper checks the GL implementation to determine which display
++ // to use. So call PreSandboxStartup after GL initialization. But make
++ // sure the watchdog is paused as loadLibrary may take a long time and
++ // restarting the GPU process will not help.
++ if (!attempted_startsandbox) {
++ if (watchdog_thread_)
++ watchdog_thread_->PauseWatchdog();
++
++ // The sandbox is not started yet.
++ sandbox_helper_->PreSandboxStartup();
++
++ if (watchdog_thread_)
++ watchdog_thread_->ResumeWatchdog();
++ }
++
+ bool gl_disabled = gl::GetGLImplementation() == gl::kGLImplementationDisabled;
+
+ // Compute passthrough decoder status before ComputeGpuFeatureInfo below.