Merge changes from topic "hwcomposer-cleanup"

* changes:
  fakehwc, libvr_hwc-hal: update for ComposerHal changes
  fakehwc, libvr_hwc-hal: ComposerClient is moved
  libvr_hwc-hal: ComposerClient::CommandReader is replaced
  fakehwc, libvr_hwc-hal: ComposerBase is moved
  libhwc2on{1,fb}adapter: move to hardware/interfaces
diff --git a/services/surfaceflinger/SurfaceFlinger.cpp b/services/surfaceflinger/SurfaceFlinger.cpp
index 135bfbe..ea43c58 100644
--- a/services/surfaceflinger/SurfaceFlinger.cpp
+++ b/services/surfaceflinger/SurfaceFlinger.cpp
@@ -1289,6 +1289,11 @@
 
     mPendingHotplugEvents.emplace_back(HotplugEvent{display, connection});
 
+    if (std::this_thread::get_id() == mMainThreadId) {
+        // Process all pending hot plug events immediately if we are on the main thread.
+        processDisplayHotplugEventsLocked();
+    }
+
     setTransactionFlags(eDisplayTransactionNeeded);
 }