OSDN Git Service

Release surfaces before disabling pipe in DisplayQueue.
authorKalyan Kondapally <kalyan.kondapally@intel.com>
Tue, 25 Apr 2017 06:03:01 +0000 (23:03 -0700)
committerKalyan Kondapally <kalyan.kondapally@intel.com>
Tue, 25 Apr 2017 06:13:13 +0000 (23:13 -0700)
We release all surfaces in DisplayPlaneManager once pipe is
disabled. In DisplayQueue however, we where trying to SetInUse
flag to false after disabling the pipe. Instead, just clear
the in_flight_surfaces before disabling the pipe in
HandleExit Call.

Jira: None.
Test: No crash after resuming system from Doze mode.

Signed-off-by: Kalyan Kondapally <kalyan.kondapally@intel.com>
common/display/displayqueue.cpp

index dd00f5a..6f00fc8 100644 (file)
@@ -413,18 +413,14 @@ void DisplayQueue::HandleExit() {
     ETRACE("Failed to set display to inactive");
     return;
   }
+
+  std::vector<NativeSurface*>().swap(in_flight_surfaces_);
   display_plane_manager_->DisablePipe(pset.get());
   drmModeConnectorSetProperty(gpu_fd_, connector_, dpms_prop_,
                               DRM_MODE_DPMS_OFF);
   std::vector<OverlayLayer>().swap(previous_layers_);
   previous_plane_state_.clear();
   compositor_.Reset();
-
-  for (NativeSurface* surface : in_flight_surfaces_) {
-    surface->SetInUse(false);
-  }
-
-  std::vector<NativeSurface*>().swap(in_flight_surfaces_);
 }
 
 void DisplayQueue::GetDrmObjectProperty(const char* name,