drm_hwcomposer: Add statistics on flattening to dump message

We need some way to verify that current composition is not failed to
compose, but instead sent to flatten on GPU.

Dump message shows current flattening state. It also displays how
often do compositor switches into flattening.

Signed-off-by: Roman Kovalivskyi <roman.kovalivskyi@globallogic.com>
diff --git a/include/drmhwctwo.h b/include/drmhwctwo.h
index 43f1fce..2bbe334 100644
--- a/include/drmhwctwo.h
+++ b/include/drmhwctwo.h
@@ -260,9 +260,11 @@
     struct Stats {
       Stats minus(Stats b) {
         return {total_frames_ - b.total_frames_,
-                total_pixops_ - b.total_pixops_, gpu_pixops_ - b.gpu_pixops_,
+                total_pixops_ - b.total_pixops_,
+                gpu_pixops_ - b.gpu_pixops_,
                 failed_kms_validate_ - b.failed_kms_validate_,
-                failed_kms_present_ - b.failed_kms_present_};
+                failed_kms_present_ - b.failed_kms_present_,
+                frames_flattened_ - b.frames_flattened_};
       }
 
       uint32_t total_frames_ = 0;
@@ -270,6 +272,7 @@
       uint64_t gpu_pixops_ = 0;
       uint32_t failed_kms_validate_ = 0;
       uint32_t failed_kms_present_ = 0;
+      uint32_t frames_flattened_ = 0;
     } total_stats_, prev_stats_;
     std::string DumpDelta(DrmHwcTwo::HwcDisplay::Stats delta);
   };