sdm: Add flag to indicate default strategy usage

In case default strategy is used, add and update a new flag
to indicate it. This flag can be used in policy making decisions
such as IWE which can't be used if default strategy is used.

Change-Id: Ib44260bba3bcb819c70791b819157117e1161de4
diff --git a/sdm/include/core/layer_stack.h b/sdm/include/core/layer_stack.h
index ae25760..5995739 100644
--- a/sdm/include/core/layer_stack.h
+++ b/sdm/include/core/layer_stack.h
@@ -402,6 +402,8 @@
       bool use_metadata_refresh_rate : 1;
 
       uint32_t iwe_present : 1;  //!< This flag shall be set to true to indicate stack has iwe layer
+
+      bool default_strategy: 1;  //!< This flag indicates the default strategy usage.
     };
 
     uint32_t flags = 0;               //!< For initialization purpose only.
diff --git a/sdm/libs/core/strategy.cpp b/sdm/libs/core/strategy.cpp
index 0224484..cb4550c 100644
--- a/sdm/libs/core/strategy.cpp
+++ b/sdm/libs/core/strategy.cpp
@@ -101,13 +101,14 @@
     error = strategy_intf_->Start(disp_layer_stack_, max_attempts, constraints);
     if (error == kErrorNone || error == kErrorNeedsValidate || error == kErrorNeedsLutRegen) {
       extn_start_success_ = true;
-      return error;
+    } else {
+      *max_attempts = 1;
+      error = kErrorNeedsValidate;
     }
   }
 
-  *max_attempts = 1;
-
-  return kErrorNeedsValidate;
+  disp_layer_stack_->stack->flags.default_strategy = !extn_start_success_;
+  return error;
 }
 
 DisplayError Strategy::Stop() {