sdm: Drop idle timeout event if refresh is in progress.

- Drop idle timeout event if it occurs between prepare()
  and commit() i.e. device is not really in idle state
  since a new refresh cycle has already started.

Change-Id: If66353ac38bd3a5463fb7fa002e61fb8ed7c80d8
CRs-Fixed: 2181941
diff --git a/sdm/libs/hwc2/hwc_display_builtin.cpp b/sdm/libs/hwc2/hwc_display_builtin.cpp
index cc02ad6..568bdfe 100644
--- a/sdm/libs/hwc2/hwc_display_builtin.cpp
+++ b/sdm/libs/hwc2/hwc_display_builtin.cpp
@@ -230,6 +230,7 @@
   }
 
   status = PrepareLayerStack(out_num_types, out_num_requests);
+  pending_commit_ = true;
   return status;
 }
 
@@ -251,6 +252,7 @@
   }
 
   CloseFd(&output_buffer_.acquire_fence_fd);
+  pending_commit_ = false;
   return status;
 }