From b47c9f5fb6b669b27e055ab8b305309170849732 Mon Sep 17 00:00:00 2001 From: alexst Date: Wed, 15 Apr 2015 15:28:42 -0700 Subject: [ozone] Keep track of pending frames on drm_window when hardware display controller is disabled or when in headless mode. When display controller is disabled, it used to stop tracking which buffer was the considered front. Surface would fast ack all incoming buffers without presenting them, which means that any one of them could be getting painted into while display controller is off. Upon wakeup, the controller would grab what it thought was the last front buffer, but in practice it was not because of the fast acks. Net result is that it may try to modeset with the buffer GL is painting into, making it hang on a fence in the driver. This patch removes all knowledge of front buffers from the display controller and explicitly sets it on the window, which tracks it while the controller is off. BUG=473831 Review URL: https://codereview.chromium.org/1078183003 Cr-Commit-Position: refs/heads/master@{#325326} --- ui/ozone/platform/drm/gpu/gbm_surface.cc | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) (limited to 'ui/ozone/platform/drm/gpu/gbm_surface.cc') diff --git a/ui/ozone/platform/drm/gpu/gbm_surface.cc b/ui/ozone/platform/drm/gpu/gbm_surface.cc index 80c84f9..8b5b167 100644 --- a/ui/ozone/platform/drm/gpu/gbm_surface.cc +++ b/ui/ozone/platform/drm/gpu/gbm_surface.cc @@ -150,8 +150,7 @@ bool GbmSurface::OnSwapBuffersAsync(const SwapCompletionCallback& callback) { } // The primary buffer is a special case. - if (window_delegate_->GetController()) - window_delegate_->GetController()->QueueOverlayPlane(OverlayPlane(primary)); + window_delegate_->QueueOverlayPlane(OverlayPlane(primary)); if (!GbmSurfaceless::OnSwapBuffersAsync( base::Bind(&GbmSurface::OnSwapBuffersCallback, -- cgit v1.1