OSDN Git Service

Dont query for KMS fence when doing modeset.
authorKalyan Kondapally <kalyan.kondapally@intel.com>
Sun, 26 Feb 2017 03:14:19 +0000 (19:14 -0800)
committerKalyan Kondapally <kalyan.kondapally@intel.com>
Sun, 26 Feb 2017 03:14:19 +0000 (19:14 -0800)
We do a blocking Modeset and fence should be already invalid by
end of this operation.Let's not bother about fence in this case.

Jira: IAHWC-46.
Test: No regressions on Linux and Android.

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

index a16adaa..914e402 100644 (file)
@@ -272,12 +272,15 @@ void DisplayQueue::HandleUpdateRequest(DisplayQueueItem& queue_item) {
     return;
   }
 
-  if (needs_modeset_ && !ApplyPendingModeset(pset.get())) {
-    ETRACE("Failed to Modeset.");
-    return;
+  if (needs_modeset_) {
+    if (!ApplyPendingModeset(pset.get())) {
+      ETRACE("Failed to Modeset.");
+      return;
+    }
+  } else {
+    GetFence(pset, &fence);
   }
 
-  GetFence(pset, &fence);
   if (!display_plane_manager_->CommitFrame(
           current_composition_planes, pset.get(), flags,
           queue_item.sync_object_, out_fence_)) {
@@ -292,14 +295,14 @@ void DisplayQueue::HandleUpdateRequest(DisplayQueueItem& queue_item) {
     return;
 
   current_sync_.reset(queue_item.sync_object_.release());
-#ifndef DISABLE_EXPLICIT_SYNC
-  compositor_.InsertFence(dup(fence));
-#else
+#ifdef DISABLE_EXPLICIT_SYNC
   compositor_.InsertFence(fence);
-#endif
-
-  if (fence > 0)
+#else
+  if (fence > 0) {
+    compositor_.InsertFence(dup(fence));
     out_fence_.Reset(fence);
+  }
+#endif
 }
 
 void DisplayQueue::HandleRoutine() {