Commit 622b4c1f authored by Alexandre Courbot's avatar Alexandre Courbot Committed by Commit Bot

Revert "Call PreSandboxStartup after GL initialization in GpuInit"

This reverts commit d17c53b3.

Reason for revert: This makes the GPU process crash on startup on Krane (and probably many other ChromeOS devices).

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}

TBR=kbr@chromium.org,julien.isorce@chromium.org,magchen@chromium.org

Change-Id: Ic536f47506a2e9a3f6db8f946732030295a8d63f
No-Presubmit: true
No-Tree-Checks: true
No-Try: true
Bug: 1041229
Reviewed-on: https://chromium-review.googlesource.com/c/chromium/src/+/2014351Reviewed-by: default avatarAlexandre Courbot <acourbot@chromium.org>
Commit-Queue: Alexandre Courbot <acourbot@chromium.org>
Cr-Commit-Position: refs/heads/master@{#733901}
parent 91d04092
......@@ -221,6 +221,11 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
delayed_watchdog_enable = true;
#endif
// 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();
// Start the GPU watchdog only after anything that is expected to be time
// consuming has completed, otherwise the process is liable to be aborted.
if (enable_watchdog && !delayed_watchdog_enable) {
......@@ -303,14 +308,6 @@ bool GpuInit::InitializeAndStartSandbox(base::CommandLine* command_line,
return false;
}
// 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 still in pause as loadLibrary may take a long time
// and restarting the GPU process will not help.
sandbox_helper_->PreSandboxStartup();
if (watchdog_thread_)
watchdog_thread_->ResumeWatchdog();
if (gl::GetGLImplementation() != gl::kGLImplementationDisabled) {
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment